os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/configure
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 #! /bin/sh
     2 
     3 # Guess values for system-dependent variables and create Makefiles.
     4 # Generated automatically using autoconf version 2.13 
     5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
     6 #
     7 # This configure script is free software; the Free Software Foundation
     8 # gives unlimited permission to copy, distribute and modify it.
     9 
    10 # Defaults:
    11 ac_help=
    12 ac_default_prefix=/usr/local
    13 # Any additions from configure.in:
    14 ac_help="$ac_help
    15   --enable-man-symlinks   use symlinks for the manpages"
    16 ac_help="$ac_help
    17   --enable-man-compression=PROG
    18 		      compress the manpages with PROG"
    19 ac_help="$ac_help
    20   --enable-man-suffix=STRING
    21 		      use STRING as a suffix to manpage file names
    22 		      (default: tcl)"
    23 ac_help="$ac_help
    24   --enable-threads        build with threads"
    25 ac_help="$ac_help
    26   --enable-shared         build and link with shared libraries [--enable-shared]"
    27 ac_help="$ac_help
    28   --enable-64bit          enable 64bit support (where applicable)"
    29 ac_help="$ac_help
    30   --enable-64bit-vis      enable 64bit Sparc VIS support"
    31 ac_help="$ac_help
    32   --enable-corefoundation use CoreFoundation API [--enable-corefoundation]"
    33 ac_help="$ac_help
    34   --disable-load          disallow dynamic loading and "load" command"
    35 ac_help="$ac_help
    36   --enable-symbols        build with debugging symbols [--disable-symbols]"
    37 ac_help="$ac_help
    38   --enable-langinfo	  use nl_langinfo if possible to determine
    39 			  encoding at startup, otherwise use old heuristic"
    40 ac_help="$ac_help
    41   --enable-framework      package shared libraries in MacOSX frameworks [--disable-framework]"
    42 
    43 # Initialize some variables set by options.
    44 # The variables have the same names as the options, with
    45 # dashes changed to underlines.
    46 build=NONE
    47 cache_file=./config.cache
    48 exec_prefix=NONE
    49 host=NONE
    50 no_create=
    51 nonopt=NONE
    52 no_recursion=
    53 prefix=NONE
    54 program_prefix=NONE
    55 program_suffix=NONE
    56 program_transform_name=s,x,x,
    57 silent=
    58 site=
    59 srcdir=
    60 target=NONE
    61 verbose=
    62 x_includes=NONE
    63 x_libraries=NONE
    64 bindir='${exec_prefix}/bin'
    65 sbindir='${exec_prefix}/sbin'
    66 libexecdir='${exec_prefix}/libexec'
    67 datadir='${prefix}/share'
    68 sysconfdir='${prefix}/etc'
    69 sharedstatedir='${prefix}/com'
    70 localstatedir='${prefix}/var'
    71 libdir='${exec_prefix}/lib'
    72 includedir='${prefix}/include'
    73 oldincludedir='/usr/include'
    74 infodir='${prefix}/info'
    75 mandir='${prefix}/man'
    76 
    77 # Initialize some other variables.
    78 subdirs=
    79 MFLAGS= MAKEFLAGS=
    80 SHELL=${CONFIG_SHELL-/bin/sh}
    81 # Maximum number of lines to put in a shell here document.
    82 ac_max_here_lines=12
    83 
    84 ac_prev=
    85 for ac_option
    86 do
    87 
    88   # If the previous option needs an argument, assign it.
    89   if test -n "$ac_prev"; then
    90     eval "$ac_prev=\$ac_option"
    91     ac_prev=
    92     continue
    93   fi
    94 
    95   case "$ac_option" in
    96   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    97   *) ac_optarg= ;;
    98   esac
    99 
   100   # Accept the important Cygnus configure options, so we can diagnose typos.
   101 
   102   case "$ac_option" in
   103 
   104   -bindir | --bindir | --bindi | --bind | --bin | --bi)
   105     ac_prev=bindir ;;
   106   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
   107     bindir="$ac_optarg" ;;
   108 
   109   -build | --build | --buil | --bui | --bu)
   110     ac_prev=build ;;
   111   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
   112     build="$ac_optarg" ;;
   113 
   114   -cache-file | --cache-file | --cache-fil | --cache-fi \
   115   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
   116     ac_prev=cache_file ;;
   117   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   118   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
   119     cache_file="$ac_optarg" ;;
   120 
   121   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
   122     ac_prev=datadir ;;
   123   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   124   | --da=*)
   125     datadir="$ac_optarg" ;;
   126 
   127   -disable-* | --disable-*)
   128     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
   129     # Reject names that are not valid shell variable names.
   130     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
   131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
   132     fi
   133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
   134     eval "enable_${ac_feature}=no" ;;
   135 
   136   -enable-* | --enable-*)
   137     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
   138     # Reject names that are not valid shell variable names.
   139     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
   140       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
   141     fi
   142     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
   143     case "$ac_option" in
   144       *=*) ;;
   145       *) ac_optarg=yes ;;
   146     esac
   147     eval "enable_${ac_feature}='$ac_optarg'" ;;
   148 
   149   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   150   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
   151   | --exec | --exe | --ex)
   152     ac_prev=exec_prefix ;;
   153   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   154   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   155   | --exec=* | --exe=* | --ex=*)
   156     exec_prefix="$ac_optarg" ;;
   157 
   158   -gas | --gas | --ga | --g)
   159     # Obsolete; use --with-gas.
   160     with_gas=yes ;;
   161 
   162   -help | --help | --hel | --he)
   163     # Omit some internal or obsolete options to make the list less imposing.
   164     # This message is too long to be a string in the A/UX 3.1 sh.
   165     cat << EOF
   166 Usage: configure [options] [host]
   167 Options: [defaults in brackets after descriptions]
   168 Configuration:
   169   --cache-file=FILE       cache test results in FILE
   170   --help                  print this message
   171   --no-create             do not create output files
   172   --quiet, --silent       do not print \`checking...' messages
   173   --version               print the version of autoconf that created configure
   174 Directory and file names:
   175   --prefix=PREFIX         install architecture-independent files in PREFIX
   176                           [$ac_default_prefix]
   177   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
   178                           [same as prefix]
   179   --bindir=DIR            user executables in DIR [EPREFIX/bin]
   180   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
   181   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
   182   --datadir=DIR           read-only architecture-independent data in DIR
   183                           [PREFIX/share]
   184   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
   185   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
   186                           [PREFIX/com]
   187   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
   188   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
   189   --includedir=DIR        C header files in DIR [PREFIX/include]
   190   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
   191   --infodir=DIR           info documentation in DIR [PREFIX/info]
   192   --mandir=DIR            man documentation in DIR [PREFIX/man]
   193   --srcdir=DIR            find the sources in DIR [configure dir or ..]
   194   --program-prefix=PREFIX prepend PREFIX to installed program names
   195   --program-suffix=SUFFIX append SUFFIX to installed program names
   196   --program-transform-name=PROGRAM
   197                           run sed PROGRAM on installed program names
   198 EOF
   199     cat << EOF
   200 Host type:
   201   --build=BUILD           configure for building on BUILD [BUILD=HOST]
   202   --host=HOST             configure for HOST [guessed]
   203   --target=TARGET         configure for TARGET [TARGET=HOST]
   204 Features and packages:
   205   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   206   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   207   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   208   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   209   --x-includes=DIR        X include files are in DIR
   210   --x-libraries=DIR       X library files are in DIR
   211 EOF
   212     if test -n "$ac_help"; then
   213       echo "--enable and --with options recognized:$ac_help"
   214     fi
   215     exit 0 ;;
   216 
   217   -host | --host | --hos | --ho)
   218     ac_prev=host ;;
   219   -host=* | --host=* | --hos=* | --ho=*)
   220     host="$ac_optarg" ;;
   221 
   222   -includedir | --includedir | --includedi | --included | --include \
   223   | --includ | --inclu | --incl | --inc)
   224     ac_prev=includedir ;;
   225   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   226   | --includ=* | --inclu=* | --incl=* | --inc=*)
   227     includedir="$ac_optarg" ;;
   228 
   229   -infodir | --infodir | --infodi | --infod | --info | --inf)
   230     ac_prev=infodir ;;
   231   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
   232     infodir="$ac_optarg" ;;
   233 
   234   -libdir | --libdir | --libdi | --libd)
   235     ac_prev=libdir ;;
   236   -libdir=* | --libdir=* | --libdi=* | --libd=*)
   237     libdir="$ac_optarg" ;;
   238 
   239   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   240   | --libexe | --libex | --libe)
   241     ac_prev=libexecdir ;;
   242   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   243   | --libexe=* | --libex=* | --libe=*)
   244     libexecdir="$ac_optarg" ;;
   245 
   246   -localstatedir | --localstatedir | --localstatedi | --localstated \
   247   | --localstate | --localstat | --localsta | --localst \
   248   | --locals | --local | --loca | --loc | --lo)
   249     ac_prev=localstatedir ;;
   250   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   251   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   252   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
   253     localstatedir="$ac_optarg" ;;
   254 
   255   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
   256     ac_prev=mandir ;;
   257   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
   258     mandir="$ac_optarg" ;;
   259 
   260   -nfp | --nfp | --nf)
   261     # Obsolete; use --without-fp.
   262     with_fp=no ;;
   263 
   264   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
   265   | --no-cr | --no-c)
   266     no_create=yes ;;
   267 
   268   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
   269   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
   270     no_recursion=yes ;;
   271 
   272   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
   273   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
   274   | --oldin | --oldi | --old | --ol | --o)
   275     ac_prev=oldincludedir ;;
   276   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   277   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   278   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
   279     oldincludedir="$ac_optarg" ;;
   280 
   281   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
   282     ac_prev=prefix ;;
   283   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
   284     prefix="$ac_optarg" ;;
   285 
   286   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   287   | --program-pre | --program-pr | --program-p)
   288     ac_prev=program_prefix ;;
   289   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   290   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
   291     program_prefix="$ac_optarg" ;;
   292 
   293   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   294   | --program-suf | --program-su | --program-s)
   295     ac_prev=program_suffix ;;
   296   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   297   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
   298     program_suffix="$ac_optarg" ;;
   299 
   300   -program-transform-name | --program-transform-name \
   301   | --program-transform-nam | --program-transform-na \
   302   | --program-transform-n | --program-transform- \
   303   | --program-transform | --program-transfor \
   304   | --program-transfo | --program-transf \
   305   | --program-trans | --program-tran \
   306   | --progr-tra | --program-tr | --program-t)
   307     ac_prev=program_transform_name ;;
   308   -program-transform-name=* | --program-transform-name=* \
   309   | --program-transform-nam=* | --program-transform-na=* \
   310   | --program-transform-n=* | --program-transform-=* \
   311   | --program-transform=* | --program-transfor=* \
   312   | --program-transfo=* | --program-transf=* \
   313   | --program-trans=* | --program-tran=* \
   314   | --progr-tra=* | --program-tr=* | --program-t=*)
   315     program_transform_name="$ac_optarg" ;;
   316 
   317   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   318   | -silent | --silent | --silen | --sile | --sil)
   319     silent=yes ;;
   320 
   321   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
   322     ac_prev=sbindir ;;
   323   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   324   | --sbi=* | --sb=*)
   325     sbindir="$ac_optarg" ;;
   326 
   327   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   328   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
   329   | --sharedst | --shareds | --shared | --share | --shar \
   330   | --sha | --sh)
   331     ac_prev=sharedstatedir ;;
   332   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
   333   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   334   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   335   | --sha=* | --sh=*)
   336     sharedstatedir="$ac_optarg" ;;
   337 
   338   -site | --site | --sit)
   339     ac_prev=site ;;
   340   -site=* | --site=* | --sit=*)
   341     site="$ac_optarg" ;;
   342 
   343   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
   344     ac_prev=srcdir ;;
   345   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
   346     srcdir="$ac_optarg" ;;
   347 
   348   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   349   | --syscon | --sysco | --sysc | --sys | --sy)
   350     ac_prev=sysconfdir ;;
   351   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   352   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
   353     sysconfdir="$ac_optarg" ;;
   354 
   355   -target | --target | --targe | --targ | --tar | --ta | --t)
   356     ac_prev=target ;;
   357   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
   358     target="$ac_optarg" ;;
   359 
   360   -v | -verbose | --verbose | --verbos | --verbo | --verb)
   361     verbose=yes ;;
   362 
   363   -version | --version | --versio | --versi | --vers)
   364     echo "configure generated by autoconf version 2.13"
   365     exit 0 ;;
   366 
   367   -with-* | --with-*)
   368     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
   369     # Reject names that are not valid shell variable names.
   370     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
   371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
   372     fi
   373     ac_package=`echo $ac_package| sed 's/-/_/g'`
   374     case "$ac_option" in
   375       *=*) ;;
   376       *) ac_optarg=yes ;;
   377     esac
   378     eval "with_${ac_package}='$ac_optarg'" ;;
   379 
   380   -without-* | --without-*)
   381     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
   382     # Reject names that are not valid shell variable names.
   383     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
   384       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
   385     fi
   386     ac_package=`echo $ac_package| sed 's/-/_/g'`
   387     eval "with_${ac_package}=no" ;;
   388 
   389   --x)
   390     # Obsolete; use --with-x.
   391     with_x=yes ;;
   392 
   393   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
   394   | --x-incl | --x-inc | --x-in | --x-i)
   395     ac_prev=x_includes ;;
   396   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   397   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
   398     x_includes="$ac_optarg" ;;
   399 
   400   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   401   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
   402     ac_prev=x_libraries ;;
   403   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   404   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
   405     x_libraries="$ac_optarg" ;;
   406 
   407   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
   408     ;;
   409 
   410   *)
   411     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
   412       echo "configure: warning: $ac_option: invalid host type" 1>&2
   413     fi
   414     if test "x$nonopt" != xNONE; then
   415       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
   416     fi
   417     nonopt="$ac_option"
   418     ;;
   419 
   420   esac
   421 done
   422 
   423 if test -n "$ac_prev"; then
   424   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
   425 fi
   426 
   427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
   428 
   429 # File descriptor usage:
   430 # 0 standard input
   431 # 1 file creation
   432 # 2 errors and warnings
   433 # 3 some systems may open it to /dev/tty
   434 # 4 used on the Kubota Titan
   435 # 6 checking for... messages and results
   436 # 5 compiler messages saved in config.log
   437 if test "$silent" = yes; then
   438   exec 6>/dev/null
   439 else
   440   exec 6>&1
   441 fi
   442 exec 5>./config.log
   443 
   444 echo "\
   445 This file contains any messages produced by compilers while
   446 running configure, to aid debugging if configure makes a mistake.
   447 " 1>&5
   448 
   449 # Strip out --no-create and --no-recursion so they do not pile up.
   450 # Also quote any args containing shell metacharacters.
   451 ac_configure_args=
   452 for ac_arg
   453 do
   454   case "$ac_arg" in
   455   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
   456   | --no-cr | --no-c) ;;
   457   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
   458   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
   459   *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
   460   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
   461   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
   462   esac
   463 done
   464 
   465 # NLS nuisances.
   466 # Only set these to C if already set.  These must not be set unconditionally
   467 # because not all systems understand e.g. LANG=C (notably SCO).
   468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
   469 # Non-C LC_CTYPE values break the ctype check.
   470 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
   471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
   472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
   473 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
   474 
   475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
   476 rm -rf conftest* confdefs.h
   477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
   478 echo > confdefs.h
   479 
   480 # A filename unique to this package, relative to the directory that
   481 # configure is in, which we can look for to find out if srcdir is correct.
   482 ac_unique_file=../generic/tcl.h
   483 
   484 # Find the source files, if location was not specified.
   485 if test -z "$srcdir"; then
   486   ac_srcdir_defaulted=yes
   487   # Try the directory containing this script, then its parent.
   488   ac_prog=$0
   489   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
   490   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   491   srcdir=$ac_confdir
   492   if test ! -r $srcdir/$ac_unique_file; then
   493     srcdir=..
   494   fi
   495 else
   496   ac_srcdir_defaulted=no
   497 fi
   498 if test ! -r $srcdir/$ac_unique_file; then
   499   if test "$ac_srcdir_defaulted" = yes; then
   500     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
   501   else
   502     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
   503   fi
   504 fi
   505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
   506 
   507 # Prefer explicitly selected file to automatically selected ones.
   508 if test -z "$CONFIG_SITE"; then
   509   if test "x$prefix" != xNONE; then
   510     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
   511   else
   512     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   513   fi
   514 fi
   515 for ac_site_file in $CONFIG_SITE; do
   516   if test -r "$ac_site_file"; then
   517     echo "loading site script $ac_site_file"
   518     . "$ac_site_file"
   519   fi
   520 done
   521 
   522 if test -r "$cache_file"; then
   523   echo "loading cache $cache_file"
   524   . $cache_file
   525 else
   526   echo "creating cache $cache_file"
   527   > $cache_file
   528 fi
   529 
   530 ac_ext=c
   531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   532 ac_cpp='$CPP $CPPFLAGS'
   533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   535 cross_compiling=$ac_cv_prog_cc_cross
   536 
   537 ac_exeext=
   538 ac_objext=o
   539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   540   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   541   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
   542     ac_n= ac_c='
   543 ' ac_t='	'
   544   else
   545     ac_n=-n ac_c= ac_t=
   546   fi
   547 else
   548   ac_n= ac_c='\c' ac_t=
   549 fi
   550 
   551 
   552 
   553 
   554 TCL_VERSION=8.4
   555 TCL_MAJOR_VERSION=8
   556 TCL_MINOR_VERSION=4
   557 TCL_PATCH_LEVEL=".15"
   558 VERSION=${TCL_VERSION}
   559 
   560 #------------------------------------------------------------------------
   561 # Handle the --prefix=... option
   562 #------------------------------------------------------------------------
   563 
   564 if test "${prefix}" = "NONE"; then
   565     prefix=/usr/local
   566 fi
   567 if test "${exec_prefix}" = "NONE"; then
   568     exec_prefix=$prefix
   569 fi
   570 # Make sure srcdir is fully qualified!
   571 srcdir=`cd $srcdir ; pwd`
   572 TCL_SRC_DIR=`cd $srcdir/..; pwd`
   573 
   574 #------------------------------------------------------------------------
   575 # Compress and/or soft link the manpages?
   576 #------------------------------------------------------------------------
   577 
   578 
   579     echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
   580 echo "configure:581: checking whether to use symlinks for manpages" >&5
   581     # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
   582 if test "${enable_man_symlinks+set}" = set; then
   583   enableval="$enable_man_symlinks"
   584   test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
   585 else
   586   enableval="no"
   587 fi
   588 
   589     echo "$ac_t""$enableval" 1>&6
   590 
   591     echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
   592 echo "configure:593: checking whether to compress the manpages" >&5
   593     # Check whether --enable-man-compression or --disable-man-compression was given.
   594 if test "${enable_man_compression+set}" = set; then
   595   enableval="$enable_man_compression"
   596   case $enableval in
   597 	    yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };;
   598 	    no)  ;;
   599 	    *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
   600 	esac
   601 else
   602   enableval="no"
   603 fi
   604 
   605     echo "$ac_t""$enableval" 1>&6
   606     if test "$enableval" != "no"; then
   607 	echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
   608 echo "configure:609: checking for compressed file suffix" >&5
   609 	touch TeST
   610 	$enableval TeST
   611 	Z=`ls TeST* | sed 's/^....//'`
   612 	rm -f TeST*
   613 	MAN_FLAGS="$MAN_FLAGS --extension $Z"
   614 	echo "$ac_t""$Z" 1>&6
   615     fi
   616 
   617     echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
   618 echo "configure:619: checking whether to add a package name suffix for the manpages" >&5
   619     # Check whether --enable-man-suffix or --disable-man-suffix was given.
   620 if test "${enable_man_suffix+set}" = set; then
   621   enableval="$enable_man_suffix"
   622   case $enableval in
   623 	    yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
   624 	    no)  ;;
   625 	    *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
   626 	esac
   627 else
   628   enableval="no"
   629 fi
   630 
   631     echo "$ac_t""$enableval" 1>&6
   632 
   633     
   634 
   635 
   636 #------------------------------------------------------------------------
   637 # Standard compiler checks
   638 #------------------------------------------------------------------------
   639 
   640 # If the user did not set CFLAGS, set it now to keep
   641 # the AC_PROG_CC macro from adding "-g -O2".
   642 if test "${CFLAGS+set}" != "set" ; then
   643     CFLAGS=""
   644 fi
   645 
   646 # Extract the first word of "gcc", so it can be a program name with args.
   647 set dummy gcc; ac_word=$2
   648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   649 echo "configure:650: checking for $ac_word" >&5
   650 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   651   echo $ac_n "(cached) $ac_c" 1>&6
   652 else
   653   if test -n "$CC"; then
   654   ac_cv_prog_CC="$CC" # Let the user override the test.
   655 else
   656   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   657   ac_dummy="$PATH"
   658   for ac_dir in $ac_dummy; do
   659     test -z "$ac_dir" && ac_dir=.
   660     if test -f $ac_dir/$ac_word; then
   661       ac_cv_prog_CC="gcc"
   662       break
   663     fi
   664   done
   665   IFS="$ac_save_ifs"
   666 fi
   667 fi
   668 CC="$ac_cv_prog_CC"
   669 if test -n "$CC"; then
   670   echo "$ac_t""$CC" 1>&6
   671 else
   672   echo "$ac_t""no" 1>&6
   673 fi
   674 
   675 if test -z "$CC"; then
   676   # Extract the first word of "cc", so it can be a program name with args.
   677 set dummy cc; ac_word=$2
   678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   679 echo "configure:680: checking for $ac_word" >&5
   680 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   681   echo $ac_n "(cached) $ac_c" 1>&6
   682 else
   683   if test -n "$CC"; then
   684   ac_cv_prog_CC="$CC" # Let the user override the test.
   685 else
   686   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   687   ac_prog_rejected=no
   688   ac_dummy="$PATH"
   689   for ac_dir in $ac_dummy; do
   690     test -z "$ac_dir" && ac_dir=.
   691     if test -f $ac_dir/$ac_word; then
   692       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
   693         ac_prog_rejected=yes
   694 	continue
   695       fi
   696       ac_cv_prog_CC="cc"
   697       break
   698     fi
   699   done
   700   IFS="$ac_save_ifs"
   701 if test $ac_prog_rejected = yes; then
   702   # We found a bogon in the path, so make sure we never use it.
   703   set dummy $ac_cv_prog_CC
   704   shift
   705   if test $# -gt 0; then
   706     # We chose a different compiler from the bogus one.
   707     # However, it has the same basename, so the bogon will be chosen
   708     # first if we set CC to just the basename; use the full file name.
   709     shift
   710     set dummy "$ac_dir/$ac_word" "$@"
   711     shift
   712     ac_cv_prog_CC="$@"
   713   fi
   714 fi
   715 fi
   716 fi
   717 CC="$ac_cv_prog_CC"
   718 if test -n "$CC"; then
   719   echo "$ac_t""$CC" 1>&6
   720 else
   721   echo "$ac_t""no" 1>&6
   722 fi
   723 
   724   if test -z "$CC"; then
   725     case "`uname -s`" in
   726     *win32* | *WIN32*)
   727       # Extract the first word of "cl", so it can be a program name with args.
   728 set dummy cl; ac_word=$2
   729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   730 echo "configure:731: checking for $ac_word" >&5
   731 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   732   echo $ac_n "(cached) $ac_c" 1>&6
   733 else
   734   if test -n "$CC"; then
   735   ac_cv_prog_CC="$CC" # Let the user override the test.
   736 else
   737   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   738   ac_dummy="$PATH"
   739   for ac_dir in $ac_dummy; do
   740     test -z "$ac_dir" && ac_dir=.
   741     if test -f $ac_dir/$ac_word; then
   742       ac_cv_prog_CC="cl"
   743       break
   744     fi
   745   done
   746   IFS="$ac_save_ifs"
   747 fi
   748 fi
   749 CC="$ac_cv_prog_CC"
   750 if test -n "$CC"; then
   751   echo "$ac_t""$CC" 1>&6
   752 else
   753   echo "$ac_t""no" 1>&6
   754 fi
   755  ;;
   756     esac
   757   fi
   758   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
   759 fi
   760 
   761 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
   762 echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
   763 
   764 ac_ext=c
   765 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   766 ac_cpp='$CPP $CPPFLAGS'
   767 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   768 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   769 cross_compiling=$ac_cv_prog_cc_cross
   770 
   771 cat > conftest.$ac_ext << EOF
   772 
   773 #line 774 "configure"
   774 #include "confdefs.h"
   775 
   776 main(){return(0);}
   777 EOF
   778 if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   779   ac_cv_prog_cc_works=yes
   780   # If we can't run a trivial program, we are probably using a cross compiler.
   781   if (./conftest; exit) 2>/dev/null; then
   782     ac_cv_prog_cc_cross=no
   783   else
   784     ac_cv_prog_cc_cross=yes
   785   fi
   786 else
   787   echo "configure: failed program was:" >&5
   788   cat conftest.$ac_ext >&5
   789   ac_cv_prog_cc_works=no
   790 fi
   791 rm -fr conftest*
   792 ac_ext=c
   793 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   794 ac_cpp='$CPP $CPPFLAGS'
   795 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   796 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   797 cross_compiling=$ac_cv_prog_cc_cross
   798 
   799 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
   800 if test $ac_cv_prog_cc_works = no; then
   801   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
   802 fi
   803 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   804 echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
   805 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
   806 cross_compiling=$ac_cv_prog_cc_cross
   807 
   808 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
   809 echo "configure:810: checking whether we are using GNU C" >&5
   810 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   811   echo $ac_n "(cached) $ac_c" 1>&6
   812 else
   813   cat > conftest.c <<EOF
   814 #ifdef __GNUC__
   815   yes;
   816 #endif
   817 EOF
   818 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   819   ac_cv_prog_gcc=yes
   820 else
   821   ac_cv_prog_gcc=no
   822 fi
   823 fi
   824 
   825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
   826 
   827 if test $ac_cv_prog_gcc = yes; then
   828   GCC=yes
   829 else
   830   GCC=
   831 fi
   832 
   833 ac_test_CFLAGS="${CFLAGS+set}"
   834 ac_save_CFLAGS="$CFLAGS"
   835 CFLAGS=
   836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
   837 echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
   838 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   839   echo $ac_n "(cached) $ac_c" 1>&6
   840 else
   841   echo 'void f(){}' > conftest.c
   842 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   843   ac_cv_prog_cc_g=yes
   844 else
   845   ac_cv_prog_cc_g=no
   846 fi
   847 rm -f conftest*
   848 
   849 fi
   850 
   851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
   852 if test "$ac_test_CFLAGS" = set; then
   853   CFLAGS="$ac_save_CFLAGS"
   854 elif test $ac_cv_prog_cc_g = yes; then
   855   if test "$GCC" = yes; then
   856     CFLAGS="-g -O2"
   857   else
   858     CFLAGS="-g"
   859   fi
   860 else
   861   if test "$GCC" = yes; then
   862     CFLAGS="-O2"
   863   else
   864     CFLAGS=
   865   fi
   866 fi
   867 
   868 
   869 #--------------------------------------------------------------------
   870 # Supply substitutes for missing POSIX header files.  Special notes:
   871 #	- stdlib.h doesn't define strtol, strtoul, or
   872 #	  strtod insome versions of SunOS
   873 #	- some versions of string.h don't declare procedures such
   874 #	  as strstr
   875 # Do this early, otherwise an autoconf bug throws errors on configure
   876 #--------------------------------------------------------------------
   877 
   878 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
   879 echo "configure:880: checking how to run the C preprocessor" >&5
   880 # On Suns, sometimes $CPP names a directory.
   881 if test -n "$CPP" && test -d "$CPP"; then
   882   CPP=
   883 fi
   884 if test -z "$CPP"; then
   885 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   886   echo $ac_n "(cached) $ac_c" 1>&6
   887 else
   888     # This must be in double quotes, not single quotes, because CPP may get
   889   # substituted into the Makefile and "${CC-cc}" will confuse make.
   890   CPP="${CC-cc} -E"
   891   # On the NeXT, cc -E runs the code through the compiler's parser,
   892   # not just through cpp.
   893   cat > conftest.$ac_ext <<EOF
   894 #line 895 "configure"
   895 #include "confdefs.h"
   896 #include <assert.h>
   897 Syntax Error
   898 EOF
   899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   900 { (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   902 if test -z "$ac_err"; then
   903   :
   904 else
   905   echo "$ac_err" >&5
   906   echo "configure: failed program was:" >&5
   907   cat conftest.$ac_ext >&5
   908   rm -rf conftest*
   909   CPP="${CC-cc} -E -traditional-cpp"
   910   cat > conftest.$ac_ext <<EOF
   911 #line 912 "configure"
   912 #include "confdefs.h"
   913 #include <assert.h>
   914 Syntax Error
   915 EOF
   916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   917 { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   919 if test -z "$ac_err"; then
   920   :
   921 else
   922   echo "$ac_err" >&5
   923   echo "configure: failed program was:" >&5
   924   cat conftest.$ac_ext >&5
   925   rm -rf conftest*
   926   CPP="${CC-cc} -nologo -E"
   927   cat > conftest.$ac_ext <<EOF
   928 #line 929 "configure"
   929 #include "confdefs.h"
   930 #include <assert.h>
   931 Syntax Error
   932 EOF
   933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   934 { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   936 if test -z "$ac_err"; then
   937   :
   938 else
   939   echo "$ac_err" >&5
   940   echo "configure: failed program was:" >&5
   941   cat conftest.$ac_ext >&5
   942   rm -rf conftest*
   943   CPP=/lib/cpp
   944 fi
   945 rm -f conftest*
   946 fi
   947 rm -f conftest*
   948 fi
   949 rm -f conftest*
   950   ac_cv_prog_CPP="$CPP"
   951 fi
   952   CPP="$ac_cv_prog_CPP"
   953 else
   954   ac_cv_prog_CPP="$CPP"
   955 fi
   956 echo "$ac_t""$CPP" 1>&6
   957 
   958 
   959     echo $ac_n "checking dirent.h""... $ac_c" 1>&6
   960 echo "configure:961: checking dirent.h" >&5
   961 if eval "test \"`echo '$''{'tcl_cv_dirent_h'+set}'`\" = set"; then
   962   echo $ac_n "(cached) $ac_c" 1>&6
   963 else
   964   
   965     cat > conftest.$ac_ext <<EOF
   966 #line 967 "configure"
   967 #include "confdefs.h"
   968 #include <sys/types.h>
   969 #include <dirent.h>
   970 int main() {
   971 
   972 #ifndef _POSIX_SOURCE
   973 #   ifdef __Lynx__
   974 	/*
   975 	 * Generate compilation error to make the test fail:  Lynx headers
   976 	 * are only valid if really in the POSIX environment.
   977 	 */
   978 
   979 	missing_procedure();
   980 #   endif
   981 #endif
   982 DIR *d;
   983 struct dirent *entryPtr;
   984 char *p;
   985 d = opendir("foobar");
   986 entryPtr = readdir(d);
   987 p = entryPtr->d_name;
   988 closedir(d);
   989 
   990 ; return 0; }
   991 EOF
   992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   993   rm -rf conftest*
   994   tcl_cv_dirent_h=yes
   995 else
   996   echo "configure: failed program was:" >&5
   997   cat conftest.$ac_ext >&5
   998   rm -rf conftest*
   999   tcl_cv_dirent_h=no
  1000 fi
  1001 rm -f conftest*
  1002 fi
  1003 
  1004 echo "$ac_t""$tcl_cv_dirent_h" 1>&6
  1005 
  1006     if test $tcl_cv_dirent_h = no; then
  1007 	cat >> confdefs.h <<\EOF
  1008 #define NO_DIRENT_H 1
  1009 EOF
  1010 
  1011     fi
  1012 
  1013     ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  1014 echo $ac_n "checking for errno.h""... $ac_c" 1>&6
  1015 echo "configure:1016: checking for errno.h" >&5
  1016 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1017   echo $ac_n "(cached) $ac_c" 1>&6
  1018 else
  1019   cat > conftest.$ac_ext <<EOF
  1020 #line 1021 "configure"
  1021 #include "confdefs.h"
  1022 #include <errno.h>
  1023 EOF
  1024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1025 { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1027 if test -z "$ac_err"; then
  1028   rm -rf conftest*
  1029   eval "ac_cv_header_$ac_safe=yes"
  1030 else
  1031   echo "$ac_err" >&5
  1032   echo "configure: failed program was:" >&5
  1033   cat conftest.$ac_ext >&5
  1034   rm -rf conftest*
  1035   eval "ac_cv_header_$ac_safe=no"
  1036 fi
  1037 rm -f conftest*
  1038 fi
  1039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1040   echo "$ac_t""yes" 1>&6
  1041   :
  1042 else
  1043   echo "$ac_t""no" 1>&6
  1044 cat >> confdefs.h <<\EOF
  1045 #define NO_ERRNO_H 1
  1046 EOF
  1047 
  1048 fi
  1049 
  1050     ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
  1051 echo $ac_n "checking for float.h""... $ac_c" 1>&6
  1052 echo "configure:1053: checking for float.h" >&5
  1053 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1054   echo $ac_n "(cached) $ac_c" 1>&6
  1055 else
  1056   cat > conftest.$ac_ext <<EOF
  1057 #line 1058 "configure"
  1058 #include "confdefs.h"
  1059 #include <float.h>
  1060 EOF
  1061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1062 { (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1064 if test -z "$ac_err"; then
  1065   rm -rf conftest*
  1066   eval "ac_cv_header_$ac_safe=yes"
  1067 else
  1068   echo "$ac_err" >&5
  1069   echo "configure: failed program was:" >&5
  1070   cat conftest.$ac_ext >&5
  1071   rm -rf conftest*
  1072   eval "ac_cv_header_$ac_safe=no"
  1073 fi
  1074 rm -f conftest*
  1075 fi
  1076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1077   echo "$ac_t""yes" 1>&6
  1078   :
  1079 else
  1080   echo "$ac_t""no" 1>&6
  1081 cat >> confdefs.h <<\EOF
  1082 #define NO_FLOAT_H 1
  1083 EOF
  1084 
  1085 fi
  1086 
  1087     ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
  1088 echo $ac_n "checking for values.h""... $ac_c" 1>&6
  1089 echo "configure:1090: checking for values.h" >&5
  1090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1091   echo $ac_n "(cached) $ac_c" 1>&6
  1092 else
  1093   cat > conftest.$ac_ext <<EOF
  1094 #line 1095 "configure"
  1095 #include "confdefs.h"
  1096 #include <values.h>
  1097 EOF
  1098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1099 { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1101 if test -z "$ac_err"; then
  1102   rm -rf conftest*
  1103   eval "ac_cv_header_$ac_safe=yes"
  1104 else
  1105   echo "$ac_err" >&5
  1106   echo "configure: failed program was:" >&5
  1107   cat conftest.$ac_ext >&5
  1108   rm -rf conftest*
  1109   eval "ac_cv_header_$ac_safe=no"
  1110 fi
  1111 rm -f conftest*
  1112 fi
  1113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1114   echo "$ac_t""yes" 1>&6
  1115   :
  1116 else
  1117   echo "$ac_t""no" 1>&6
  1118 cat >> confdefs.h <<\EOF
  1119 #define NO_VALUES_H 1
  1120 EOF
  1121 
  1122 fi
  1123 
  1124     ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
  1125 echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  1126 echo "configure:1127: checking for limits.h" >&5
  1127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1128   echo $ac_n "(cached) $ac_c" 1>&6
  1129 else
  1130   cat > conftest.$ac_ext <<EOF
  1131 #line 1132 "configure"
  1132 #include "confdefs.h"
  1133 #include <limits.h>
  1134 EOF
  1135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1136 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1138 if test -z "$ac_err"; then
  1139   rm -rf conftest*
  1140   eval "ac_cv_header_$ac_safe=yes"
  1141 else
  1142   echo "$ac_err" >&5
  1143   echo "configure: failed program was:" >&5
  1144   cat conftest.$ac_ext >&5
  1145   rm -rf conftest*
  1146   eval "ac_cv_header_$ac_safe=no"
  1147 fi
  1148 rm -f conftest*
  1149 fi
  1150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1151   echo "$ac_t""yes" 1>&6
  1152   cat >> confdefs.h <<\EOF
  1153 #define HAVE_LIMITS_H 1
  1154 EOF
  1155 
  1156 else
  1157   echo "$ac_t""no" 1>&6
  1158 cat >> confdefs.h <<\EOF
  1159 #define NO_LIMITS_H 1
  1160 EOF
  1161 
  1162 fi
  1163 
  1164     ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
  1165 echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  1166 echo "configure:1167: checking for stdlib.h" >&5
  1167 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1168   echo $ac_n "(cached) $ac_c" 1>&6
  1169 else
  1170   cat > conftest.$ac_ext <<EOF
  1171 #line 1172 "configure"
  1172 #include "confdefs.h"
  1173 #include <stdlib.h>
  1174 EOF
  1175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1176 { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1178 if test -z "$ac_err"; then
  1179   rm -rf conftest*
  1180   eval "ac_cv_header_$ac_safe=yes"
  1181 else
  1182   echo "$ac_err" >&5
  1183   echo "configure: failed program was:" >&5
  1184   cat conftest.$ac_ext >&5
  1185   rm -rf conftest*
  1186   eval "ac_cv_header_$ac_safe=no"
  1187 fi
  1188 rm -f conftest*
  1189 fi
  1190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1191   echo "$ac_t""yes" 1>&6
  1192   tcl_ok=1
  1193 else
  1194   echo "$ac_t""no" 1>&6
  1195 tcl_ok=0
  1196 fi
  1197 
  1198     cat > conftest.$ac_ext <<EOF
  1199 #line 1200 "configure"
  1200 #include "confdefs.h"
  1201 #include <stdlib.h>
  1202 EOF
  1203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1204   egrep "strtol" >/dev/null 2>&1; then
  1205   :
  1206 else
  1207   rm -rf conftest*
  1208   tcl_ok=0
  1209 fi
  1210 rm -f conftest*
  1211 
  1212     cat > conftest.$ac_ext <<EOF
  1213 #line 1214 "configure"
  1214 #include "confdefs.h"
  1215 #include <stdlib.h>
  1216 EOF
  1217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1218   egrep "strtoul" >/dev/null 2>&1; then
  1219   :
  1220 else
  1221   rm -rf conftest*
  1222   tcl_ok=0
  1223 fi
  1224 rm -f conftest*
  1225 
  1226     cat > conftest.$ac_ext <<EOF
  1227 #line 1228 "configure"
  1228 #include "confdefs.h"
  1229 #include <stdlib.h>
  1230 EOF
  1231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1232   egrep "strtod" >/dev/null 2>&1; then
  1233   :
  1234 else
  1235   rm -rf conftest*
  1236   tcl_ok=0
  1237 fi
  1238 rm -f conftest*
  1239 
  1240     if test $tcl_ok = 0; then
  1241 	cat >> confdefs.h <<\EOF
  1242 #define NO_STDLIB_H 1
  1243 EOF
  1244 
  1245     fi
  1246     ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
  1247 echo $ac_n "checking for string.h""... $ac_c" 1>&6
  1248 echo "configure:1249: checking for string.h" >&5
  1249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1250   echo $ac_n "(cached) $ac_c" 1>&6
  1251 else
  1252   cat > conftest.$ac_ext <<EOF
  1253 #line 1254 "configure"
  1254 #include "confdefs.h"
  1255 #include <string.h>
  1256 EOF
  1257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1258 { (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1260 if test -z "$ac_err"; then
  1261   rm -rf conftest*
  1262   eval "ac_cv_header_$ac_safe=yes"
  1263 else
  1264   echo "$ac_err" >&5
  1265   echo "configure: failed program was:" >&5
  1266   cat conftest.$ac_ext >&5
  1267   rm -rf conftest*
  1268   eval "ac_cv_header_$ac_safe=no"
  1269 fi
  1270 rm -f conftest*
  1271 fi
  1272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1273   echo "$ac_t""yes" 1>&6
  1274   tcl_ok=1
  1275 else
  1276   echo "$ac_t""no" 1>&6
  1277 tcl_ok=0
  1278 fi
  1279 
  1280     cat > conftest.$ac_ext <<EOF
  1281 #line 1282 "configure"
  1282 #include "confdefs.h"
  1283 #include <string.h>
  1284 EOF
  1285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1286   egrep "strstr" >/dev/null 2>&1; then
  1287   :
  1288 else
  1289   rm -rf conftest*
  1290   tcl_ok=0
  1291 fi
  1292 rm -f conftest*
  1293 
  1294     cat > conftest.$ac_ext <<EOF
  1295 #line 1296 "configure"
  1296 #include "confdefs.h"
  1297 #include <string.h>
  1298 EOF
  1299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1300   egrep "strerror" >/dev/null 2>&1; then
  1301   :
  1302 else
  1303   rm -rf conftest*
  1304   tcl_ok=0
  1305 fi
  1306 rm -f conftest*
  1307 
  1308 
  1309     # See also memmove check below for a place where NO_STRING_H can be
  1310     # set and why.
  1311 
  1312     if test $tcl_ok = 0; then
  1313 	cat >> confdefs.h <<\EOF
  1314 #define NO_STRING_H 1
  1315 EOF
  1316 
  1317     fi
  1318 
  1319     ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
  1320 echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
  1321 echo "configure:1322: checking for sys/wait.h" >&5
  1322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1323   echo $ac_n "(cached) $ac_c" 1>&6
  1324 else
  1325   cat > conftest.$ac_ext <<EOF
  1326 #line 1327 "configure"
  1327 #include "confdefs.h"
  1328 #include <sys/wait.h>
  1329 EOF
  1330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1331 { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1333 if test -z "$ac_err"; then
  1334   rm -rf conftest*
  1335   eval "ac_cv_header_$ac_safe=yes"
  1336 else
  1337   echo "$ac_err" >&5
  1338   echo "configure: failed program was:" >&5
  1339   cat conftest.$ac_ext >&5
  1340   rm -rf conftest*
  1341   eval "ac_cv_header_$ac_safe=no"
  1342 fi
  1343 rm -f conftest*
  1344 fi
  1345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1346   echo "$ac_t""yes" 1>&6
  1347   :
  1348 else
  1349   echo "$ac_t""no" 1>&6
  1350 cat >> confdefs.h <<\EOF
  1351 #define NO_SYS_WAIT_H 1
  1352 EOF
  1353 
  1354 fi
  1355 
  1356     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  1357 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  1358 echo "configure:1359: checking for dlfcn.h" >&5
  1359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1360   echo $ac_n "(cached) $ac_c" 1>&6
  1361 else
  1362   cat > conftest.$ac_ext <<EOF
  1363 #line 1364 "configure"
  1364 #include "confdefs.h"
  1365 #include <dlfcn.h>
  1366 EOF
  1367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1368 { (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1370 if test -z "$ac_err"; then
  1371   rm -rf conftest*
  1372   eval "ac_cv_header_$ac_safe=yes"
  1373 else
  1374   echo "$ac_err" >&5
  1375   echo "configure: failed program was:" >&5
  1376   cat conftest.$ac_ext >&5
  1377   rm -rf conftest*
  1378   eval "ac_cv_header_$ac_safe=no"
  1379 fi
  1380 rm -f conftest*
  1381 fi
  1382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1383   echo "$ac_t""yes" 1>&6
  1384   :
  1385 else
  1386   echo "$ac_t""no" 1>&6
  1387 cat >> confdefs.h <<\EOF
  1388 #define NO_DLFCN_H 1
  1389 EOF
  1390 
  1391 fi
  1392 
  1393 
  1394     # OS/390 lacks sys/param.h (and doesn't need it, by chance).
  1395     for ac_hdr in unistd.h sys/param.h
  1396 do
  1397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1399 echo "configure:1400: checking for $ac_hdr" >&5
  1400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1401   echo $ac_n "(cached) $ac_c" 1>&6
  1402 else
  1403   cat > conftest.$ac_ext <<EOF
  1404 #line 1405 "configure"
  1405 #include "confdefs.h"
  1406 #include <$ac_hdr>
  1407 EOF
  1408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1409 { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1411 if test -z "$ac_err"; then
  1412   rm -rf conftest*
  1413   eval "ac_cv_header_$ac_safe=yes"
  1414 else
  1415   echo "$ac_err" >&5
  1416   echo "configure: failed program was:" >&5
  1417   cat conftest.$ac_ext >&5
  1418   rm -rf conftest*
  1419   eval "ac_cv_header_$ac_safe=no"
  1420 fi
  1421 rm -f conftest*
  1422 fi
  1423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1424   echo "$ac_t""yes" 1>&6
  1425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1426   cat >> confdefs.h <<EOF
  1427 #define $ac_tr_hdr 1
  1428 EOF
  1429  
  1430 else
  1431   echo "$ac_t""no" 1>&6
  1432 fi
  1433 done
  1434 
  1435 
  1436 
  1437 #------------------------------------------------------------------------
  1438 # If we're using GCC, see if the compiler understands -pipe.  If so, use it.
  1439 # It makes compiling go faster.  (This is only a performance feature.)
  1440 #------------------------------------------------------------------------
  1441 
  1442 if test -z "$no_pipe" && test -n "$GCC"; then
  1443     echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
  1444 echo "configure:1445: checking if the compiler understands -pipe" >&5
  1445 if eval "test \"`echo '$''{'tcl_cv_cc_pipe'+set}'`\" = set"; then
  1446   echo $ac_n "(cached) $ac_c" 1>&6
  1447 else
  1448   
  1449 	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
  1450 	cat > conftest.$ac_ext <<EOF
  1451 #line 1452 "configure"
  1452 #include "confdefs.h"
  1453 
  1454 int main() {
  1455 
  1456 ; return 0; }
  1457 EOF
  1458 if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1459   rm -rf conftest*
  1460   tcl_cv_cc_pipe=yes
  1461 else
  1462   echo "configure: failed program was:" >&5
  1463   cat conftest.$ac_ext >&5
  1464   rm -rf conftest*
  1465   tcl_cv_cc_pipe=no
  1466 fi
  1467 rm -f conftest*
  1468 	CFLAGS=$hold_cflags
  1469 fi
  1470 
  1471 echo "$ac_t""$tcl_cv_cc_pipe" 1>&6
  1472     if test $tcl_cv_cc_pipe = yes; then
  1473 	CFLAGS="$CFLAGS -pipe"
  1474     fi
  1475 fi
  1476 
  1477 #------------------------------------------------------------------------
  1478 # Threads support
  1479 #------------------------------------------------------------------------
  1480 
  1481 
  1482     # Check whether --enable-threads or --disable-threads was given.
  1483 if test "${enable_threads+set}" = set; then
  1484   enableval="$enable_threads"
  1485   tcl_ok=$enableval
  1486 else
  1487   tcl_ok=no
  1488 fi
  1489 
  1490 
  1491     if test "${TCL_THREADS}" = 1; then
  1492 	tcl_threaded_core=1;
  1493     fi
  1494 
  1495     if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
  1496 	TCL_THREADS=1
  1497 	# USE_THREAD_ALLOC tells us to try the special thread-based
  1498 	# allocator that significantly reduces lock contention
  1499 	cat >> confdefs.h <<\EOF
  1500 #define USE_THREAD_ALLOC 1
  1501 EOF
  1502 
  1503 	cat >> confdefs.h <<\EOF
  1504 #define _REENTRANT 1
  1505 EOF
  1506 
  1507 	if test "`uname -s`" = "SunOS" ; then
  1508 	    cat >> confdefs.h <<\EOF
  1509 #define _POSIX_PTHREAD_SEMANTICS 1
  1510 EOF
  1511 
  1512 	fi
  1513 	cat >> confdefs.h <<\EOF
  1514 #define _THREAD_SAFE 1
  1515 EOF
  1516 
  1517 	echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1518 echo "configure:1519: checking for pthread_mutex_init in -lpthread" >&5
  1519 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1521   echo $ac_n "(cached) $ac_c" 1>&6
  1522 else
  1523   ac_save_LIBS="$LIBS"
  1524 LIBS="-lpthread  $LIBS"
  1525 cat > conftest.$ac_ext <<EOF
  1526 #line 1527 "configure"
  1527 #include "confdefs.h"
  1528 /* Override any gcc2 internal prototype to avoid an error.  */
  1529 /* We use char because int might match the return type of a gcc2
  1530     builtin and then its argument prototype would still apply.  */
  1531 char pthread_mutex_init();
  1532 
  1533 int main() {
  1534 pthread_mutex_init()
  1535 ; return 0; }
  1536 EOF
  1537 if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1538   rm -rf conftest*
  1539   eval "ac_cv_lib_$ac_lib_var=yes"
  1540 else
  1541   echo "configure: failed program was:" >&5
  1542   cat conftest.$ac_ext >&5
  1543   rm -rf conftest*
  1544   eval "ac_cv_lib_$ac_lib_var=no"
  1545 fi
  1546 rm -f conftest*
  1547 LIBS="$ac_save_LIBS"
  1548 
  1549 fi
  1550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1551   echo "$ac_t""yes" 1>&6
  1552   tcl_ok=yes
  1553 else
  1554   echo "$ac_t""no" 1>&6
  1555 tcl_ok=no
  1556 fi
  1557 
  1558 	if test "$tcl_ok" = "no"; then
  1559 	    # Check a little harder for __pthread_mutex_init in the same
  1560 	    # library, as some systems hide it there until pthread.h is
  1561 	    # defined.  We could alternatively do an AC_TRY_COMPILE with
  1562 	    # pthread.h, but that will work with libpthread really doesn't
  1563 	    # exist, like AIX 4.2.  [Bug: 4359]
  1564 	    echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1565 echo "configure:1566: checking for __pthread_mutex_init in -lpthread" >&5
  1566 ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
  1567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1568   echo $ac_n "(cached) $ac_c" 1>&6
  1569 else
  1570   ac_save_LIBS="$LIBS"
  1571 LIBS="-lpthread  $LIBS"
  1572 cat > conftest.$ac_ext <<EOF
  1573 #line 1574 "configure"
  1574 #include "confdefs.h"
  1575 /* Override any gcc2 internal prototype to avoid an error.  */
  1576 /* We use char because int might match the return type of a gcc2
  1577     builtin and then its argument prototype would still apply.  */
  1578 char __pthread_mutex_init();
  1579 
  1580 int main() {
  1581 __pthread_mutex_init()
  1582 ; return 0; }
  1583 EOF
  1584 if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1585   rm -rf conftest*
  1586   eval "ac_cv_lib_$ac_lib_var=yes"
  1587 else
  1588   echo "configure: failed program was:" >&5
  1589   cat conftest.$ac_ext >&5
  1590   rm -rf conftest*
  1591   eval "ac_cv_lib_$ac_lib_var=no"
  1592 fi
  1593 rm -f conftest*
  1594 LIBS="$ac_save_LIBS"
  1595 
  1596 fi
  1597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1598   echo "$ac_t""yes" 1>&6
  1599   tcl_ok=yes
  1600 else
  1601   echo "$ac_t""no" 1>&6
  1602 tcl_ok=no
  1603 fi
  1604 
  1605 	fi
  1606 
  1607 	if test "$tcl_ok" = "yes"; then
  1608 	    # The space is needed
  1609 	    THREADS_LIBS=" -lpthread"
  1610 	else
  1611 	    echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
  1612 echo "configure:1613: checking for pthread_mutex_init in -lpthreads" >&5
  1613 ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1614 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1615   echo $ac_n "(cached) $ac_c" 1>&6
  1616 else
  1617   ac_save_LIBS="$LIBS"
  1618 LIBS="-lpthreads  $LIBS"
  1619 cat > conftest.$ac_ext <<EOF
  1620 #line 1621 "configure"
  1621 #include "confdefs.h"
  1622 /* Override any gcc2 internal prototype to avoid an error.  */
  1623 /* We use char because int might match the return type of a gcc2
  1624     builtin and then its argument prototype would still apply.  */
  1625 char pthread_mutex_init();
  1626 
  1627 int main() {
  1628 pthread_mutex_init()
  1629 ; return 0; }
  1630 EOF
  1631 if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1632   rm -rf conftest*
  1633   eval "ac_cv_lib_$ac_lib_var=yes"
  1634 else
  1635   echo "configure: failed program was:" >&5
  1636   cat conftest.$ac_ext >&5
  1637   rm -rf conftest*
  1638   eval "ac_cv_lib_$ac_lib_var=no"
  1639 fi
  1640 rm -f conftest*
  1641 LIBS="$ac_save_LIBS"
  1642 
  1643 fi
  1644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1645   echo "$ac_t""yes" 1>&6
  1646   tcl_ok=yes
  1647 else
  1648   echo "$ac_t""no" 1>&6
  1649 tcl_ok=no
  1650 fi
  1651 
  1652 	    if test "$tcl_ok" = "yes"; then
  1653 		# The space is needed
  1654 		THREADS_LIBS=" -lpthreads"
  1655 	    else
  1656 		echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
  1657 echo "configure:1658: checking for pthread_mutex_init in -lc" >&5
  1658 ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1659 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1660   echo $ac_n "(cached) $ac_c" 1>&6
  1661 else
  1662   ac_save_LIBS="$LIBS"
  1663 LIBS="-lc  $LIBS"
  1664 cat > conftest.$ac_ext <<EOF
  1665 #line 1666 "configure"
  1666 #include "confdefs.h"
  1667 /* Override any gcc2 internal prototype to avoid an error.  */
  1668 /* We use char because int might match the return type of a gcc2
  1669     builtin and then its argument prototype would still apply.  */
  1670 char pthread_mutex_init();
  1671 
  1672 int main() {
  1673 pthread_mutex_init()
  1674 ; return 0; }
  1675 EOF
  1676 if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1677   rm -rf conftest*
  1678   eval "ac_cv_lib_$ac_lib_var=yes"
  1679 else
  1680   echo "configure: failed program was:" >&5
  1681   cat conftest.$ac_ext >&5
  1682   rm -rf conftest*
  1683   eval "ac_cv_lib_$ac_lib_var=no"
  1684 fi
  1685 rm -f conftest*
  1686 LIBS="$ac_save_LIBS"
  1687 
  1688 fi
  1689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1690   echo "$ac_t""yes" 1>&6
  1691   tcl_ok=yes
  1692 else
  1693   echo "$ac_t""no" 1>&6
  1694 tcl_ok=no
  1695 fi
  1696 
  1697 		if test "$tcl_ok" = "no"; then
  1698 		    echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
  1699 echo "configure:1700: checking for pthread_mutex_init in -lc_r" >&5
  1700 ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1702   echo $ac_n "(cached) $ac_c" 1>&6
  1703 else
  1704   ac_save_LIBS="$LIBS"
  1705 LIBS="-lc_r  $LIBS"
  1706 cat > conftest.$ac_ext <<EOF
  1707 #line 1708 "configure"
  1708 #include "confdefs.h"
  1709 /* Override any gcc2 internal prototype to avoid an error.  */
  1710 /* We use char because int might match the return type of a gcc2
  1711     builtin and then its argument prototype would still apply.  */
  1712 char pthread_mutex_init();
  1713 
  1714 int main() {
  1715 pthread_mutex_init()
  1716 ; return 0; }
  1717 EOF
  1718 if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1719   rm -rf conftest*
  1720   eval "ac_cv_lib_$ac_lib_var=yes"
  1721 else
  1722   echo "configure: failed program was:" >&5
  1723   cat conftest.$ac_ext >&5
  1724   rm -rf conftest*
  1725   eval "ac_cv_lib_$ac_lib_var=no"
  1726 fi
  1727 rm -f conftest*
  1728 LIBS="$ac_save_LIBS"
  1729 
  1730 fi
  1731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1732   echo "$ac_t""yes" 1>&6
  1733   tcl_ok=yes
  1734 else
  1735   echo "$ac_t""no" 1>&6
  1736 tcl_ok=no
  1737 fi
  1738 
  1739 		    if test "$tcl_ok" = "yes"; then
  1740 			# The space is needed
  1741 			THREADS_LIBS=" -pthread"
  1742 		    else
  1743 			TCL_THREADS=0
  1744 			echo "configure: warning: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." 1>&2
  1745 		    fi
  1746 		fi
  1747 	    fi
  1748 	fi
  1749 
  1750 	# Does the pthread-implementation provide
  1751 	# 'pthread_attr_setstacksize' ?
  1752 
  1753 	ac_saved_libs=$LIBS
  1754 	LIBS="$LIBS $THREADS_LIBS"
  1755 	for ac_func in pthread_attr_setstacksize
  1756 do
  1757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1758 echo "configure:1759: checking for $ac_func" >&5
  1759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1760   echo $ac_n "(cached) $ac_c" 1>&6
  1761 else
  1762   cat > conftest.$ac_ext <<EOF
  1763 #line 1764 "configure"
  1764 #include "confdefs.h"
  1765 /* System header to define __stub macros and hopefully few prototypes,
  1766     which can conflict with char $ac_func(); below.  */
  1767 #include <assert.h>
  1768 /* Override any gcc2 internal prototype to avoid an error.  */
  1769 /* We use char because int might match the return type of a gcc2
  1770     builtin and then its argument prototype would still apply.  */
  1771 char $ac_func();
  1772 
  1773 int main() {
  1774 
  1775 /* The GNU C library defines this for functions which it implements
  1776     to always fail with ENOSYS.  Some functions are actually named
  1777     something starting with __ and the normal name is an alias.  */
  1778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1779 choke me
  1780 #else
  1781 $ac_func();
  1782 #endif
  1783 
  1784 ; return 0; }
  1785 EOF
  1786 if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1787   rm -rf conftest*
  1788   eval "ac_cv_func_$ac_func=yes"
  1789 else
  1790   echo "configure: failed program was:" >&5
  1791   cat conftest.$ac_ext >&5
  1792   rm -rf conftest*
  1793   eval "ac_cv_func_$ac_func=no"
  1794 fi
  1795 rm -f conftest*
  1796 fi
  1797 
  1798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1799   echo "$ac_t""yes" 1>&6
  1800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1801   cat >> confdefs.h <<EOF
  1802 #define $ac_tr_func 1
  1803 EOF
  1804  
  1805 else
  1806   echo "$ac_t""no" 1>&6
  1807 fi
  1808 done
  1809 
  1810 	for ac_func in pthread_atfork
  1811 do
  1812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1813 echo "configure:1814: checking for $ac_func" >&5
  1814 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1815   echo $ac_n "(cached) $ac_c" 1>&6
  1816 else
  1817   cat > conftest.$ac_ext <<EOF
  1818 #line 1819 "configure"
  1819 #include "confdefs.h"
  1820 /* System header to define __stub macros and hopefully few prototypes,
  1821     which can conflict with char $ac_func(); below.  */
  1822 #include <assert.h>
  1823 /* Override any gcc2 internal prototype to avoid an error.  */
  1824 /* We use char because int might match the return type of a gcc2
  1825     builtin and then its argument prototype would still apply.  */
  1826 char $ac_func();
  1827 
  1828 int main() {
  1829 
  1830 /* The GNU C library defines this for functions which it implements
  1831     to always fail with ENOSYS.  Some functions are actually named
  1832     something starting with __ and the normal name is an alias.  */
  1833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1834 choke me
  1835 #else
  1836 $ac_func();
  1837 #endif
  1838 
  1839 ; return 0; }
  1840 EOF
  1841 if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1842   rm -rf conftest*
  1843   eval "ac_cv_func_$ac_func=yes"
  1844 else
  1845   echo "configure: failed program was:" >&5
  1846   cat conftest.$ac_ext >&5
  1847   rm -rf conftest*
  1848   eval "ac_cv_func_$ac_func=no"
  1849 fi
  1850 rm -f conftest*
  1851 fi
  1852 
  1853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1854   echo "$ac_t""yes" 1>&6
  1855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1856   cat >> confdefs.h <<EOF
  1857 #define $ac_tr_func 1
  1858 EOF
  1859  
  1860 else
  1861   echo "$ac_t""no" 1>&6
  1862 fi
  1863 done
  1864 
  1865 	LIBS=$ac_saved_libs
  1866     else
  1867 	TCL_THREADS=0
  1868     fi
  1869     # Do checking message here to not mess up interleaved configure output
  1870     echo $ac_n "checking for building with threads""... $ac_c" 1>&6
  1871 echo "configure:1872: checking for building with threads" >&5
  1872     if test "${TCL_THREADS}" = 1; then
  1873 	cat >> confdefs.h <<\EOF
  1874 #define TCL_THREADS 1
  1875 EOF
  1876 
  1877 	if test "${tcl_threaded_core}" = 1; then
  1878 	    echo "$ac_t""yes (threaded core)" 1>&6
  1879 	else
  1880 	    echo "$ac_t""yes" 1>&6
  1881 	fi
  1882     else
  1883 	echo "$ac_t""no (default)" 1>&6
  1884     fi
  1885 
  1886     
  1887 
  1888 
  1889 #--------------------------------------------------------------------
  1890 # Look for libraries that we will need when compiling the Tcl shell
  1891 #--------------------------------------------------------------------
  1892 
  1893 
  1894     #--------------------------------------------------------------------
  1895     # On a few very rare systems, all of the libm.a stuff is
  1896     # already in libc.a.  Set compiler flags accordingly.
  1897     # Also, Linux requires the "ieee" library for math to work
  1898     # right (and it must appear before "-lm").
  1899     #--------------------------------------------------------------------
  1900 
  1901     echo $ac_n "checking for sin""... $ac_c" 1>&6
  1902 echo "configure:1903: checking for sin" >&5
  1903 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  1904   echo $ac_n "(cached) $ac_c" 1>&6
  1905 else
  1906   cat > conftest.$ac_ext <<EOF
  1907 #line 1908 "configure"
  1908 #include "confdefs.h"
  1909 /* System header to define __stub macros and hopefully few prototypes,
  1910     which can conflict with char sin(); below.  */
  1911 #include <assert.h>
  1912 /* Override any gcc2 internal prototype to avoid an error.  */
  1913 /* We use char because int might match the return type of a gcc2
  1914     builtin and then its argument prototype would still apply.  */
  1915 char sin();
  1916 
  1917 int main() {
  1918 
  1919 /* The GNU C library defines this for functions which it implements
  1920     to always fail with ENOSYS.  Some functions are actually named
  1921     something starting with __ and the normal name is an alias.  */
  1922 #if defined (__stub_sin) || defined (__stub___sin)
  1923 choke me
  1924 #else
  1925 sin();
  1926 #endif
  1927 
  1928 ; return 0; }
  1929 EOF
  1930 if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1931   rm -rf conftest*
  1932   eval "ac_cv_func_sin=yes"
  1933 else
  1934   echo "configure: failed program was:" >&5
  1935   cat conftest.$ac_ext >&5
  1936   rm -rf conftest*
  1937   eval "ac_cv_func_sin=no"
  1938 fi
  1939 rm -f conftest*
  1940 fi
  1941 
  1942 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  1943   echo "$ac_t""yes" 1>&6
  1944   MATH_LIBS=""
  1945 else
  1946   echo "$ac_t""no" 1>&6
  1947 MATH_LIBS="-lm"
  1948 fi
  1949 
  1950     echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
  1951 echo "configure:1952: checking for main in -lieee" >&5
  1952 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
  1953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1954   echo $ac_n "(cached) $ac_c" 1>&6
  1955 else
  1956   ac_save_LIBS="$LIBS"
  1957 LIBS="-lieee  $LIBS"
  1958 cat > conftest.$ac_ext <<EOF
  1959 #line 1960 "configure"
  1960 #include "confdefs.h"
  1961 
  1962 int main() {
  1963 main()
  1964 ; return 0; }
  1965 EOF
  1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1967   rm -rf conftest*
  1968   eval "ac_cv_lib_$ac_lib_var=yes"
  1969 else
  1970   echo "configure: failed program was:" >&5
  1971   cat conftest.$ac_ext >&5
  1972   rm -rf conftest*
  1973   eval "ac_cv_lib_$ac_lib_var=no"
  1974 fi
  1975 rm -f conftest*
  1976 LIBS="$ac_save_LIBS"
  1977 
  1978 fi
  1979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1980   echo "$ac_t""yes" 1>&6
  1981   MATH_LIBS="-lieee $MATH_LIBS"
  1982 else
  1983   echo "$ac_t""no" 1>&6
  1984 fi
  1985 
  1986 
  1987     #--------------------------------------------------------------------
  1988     # Interactive UNIX requires -linet instead of -lsocket, plus it
  1989     # needs net/errno.h to define the socket-related error codes.
  1990     #--------------------------------------------------------------------
  1991 
  1992     echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
  1993 echo "configure:1994: checking for main in -linet" >&5
  1994 ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
  1995 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1996   echo $ac_n "(cached) $ac_c" 1>&6
  1997 else
  1998   ac_save_LIBS="$LIBS"
  1999 LIBS="-linet  $LIBS"
  2000 cat > conftest.$ac_ext <<EOF
  2001 #line 2002 "configure"
  2002 #include "confdefs.h"
  2003 
  2004 int main() {
  2005 main()
  2006 ; return 0; }
  2007 EOF
  2008 if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2009   rm -rf conftest*
  2010   eval "ac_cv_lib_$ac_lib_var=yes"
  2011 else
  2012   echo "configure: failed program was:" >&5
  2013   cat conftest.$ac_ext >&5
  2014   rm -rf conftest*
  2015   eval "ac_cv_lib_$ac_lib_var=no"
  2016 fi
  2017 rm -f conftest*
  2018 LIBS="$ac_save_LIBS"
  2019 
  2020 fi
  2021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2022   echo "$ac_t""yes" 1>&6
  2023   LIBS="$LIBS -linet"
  2024 else
  2025   echo "$ac_t""no" 1>&6
  2026 fi
  2027 
  2028     ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'`
  2029 echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
  2030 echo "configure:2031: checking for net/errno.h" >&5
  2031 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2032   echo $ac_n "(cached) $ac_c" 1>&6
  2033 else
  2034   cat > conftest.$ac_ext <<EOF
  2035 #line 2036 "configure"
  2036 #include "confdefs.h"
  2037 #include <net/errno.h>
  2038 EOF
  2039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2040 { (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2042 if test -z "$ac_err"; then
  2043   rm -rf conftest*
  2044   eval "ac_cv_header_$ac_safe=yes"
  2045 else
  2046   echo "$ac_err" >&5
  2047   echo "configure: failed program was:" >&5
  2048   cat conftest.$ac_ext >&5
  2049   rm -rf conftest*
  2050   eval "ac_cv_header_$ac_safe=no"
  2051 fi
  2052 rm -f conftest*
  2053 fi
  2054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2055   echo "$ac_t""yes" 1>&6
  2056   cat >> confdefs.h <<\EOF
  2057 #define HAVE_NET_ERRNO_H 1
  2058 EOF
  2059 
  2060 else
  2061   echo "$ac_t""no" 1>&6
  2062 fi
  2063 
  2064 
  2065     #--------------------------------------------------------------------
  2066     #	Check for the existence of the -lsocket and -lnsl libraries.
  2067     #	The order here is important, so that they end up in the right
  2068     #	order in the command line generated by make.  Here are some
  2069     #	special considerations:
  2070     #	1. Use "connect" and "accept" to check for -lsocket, and
  2071     #	   "gethostbyname" to check for -lnsl.
  2072     #	2. Use each function name only once:  can't redo a check because
  2073     #	   autoconf caches the results of the last check and won't redo it.
  2074     #	3. Use -lnsl and -lsocket only if they supply procedures that
  2075     #	   aren't already present in the normal libraries.  This is because
  2076     #	   IRIX 5.2 has libraries, but they aren't needed and they're
  2077     #	   bogus:  they goof up name resolution if used.
  2078     #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
  2079     #	   To get around this problem, check for both libraries together
  2080     #	   if -lsocket doesn't work by itself.
  2081     #--------------------------------------------------------------------
  2082 
  2083     tcl_checkBoth=0
  2084     echo $ac_n "checking for connect""... $ac_c" 1>&6
  2085 echo "configure:2086: checking for connect" >&5
  2086 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2087   echo $ac_n "(cached) $ac_c" 1>&6
  2088 else
  2089   cat > conftest.$ac_ext <<EOF
  2090 #line 2091 "configure"
  2091 #include "confdefs.h"
  2092 /* System header to define __stub macros and hopefully few prototypes,
  2093     which can conflict with char connect(); below.  */
  2094 #include <assert.h>
  2095 /* Override any gcc2 internal prototype to avoid an error.  */
  2096 /* We use char because int might match the return type of a gcc2
  2097     builtin and then its argument prototype would still apply.  */
  2098 char connect();
  2099 
  2100 int main() {
  2101 
  2102 /* The GNU C library defines this for functions which it implements
  2103     to always fail with ENOSYS.  Some functions are actually named
  2104     something starting with __ and the normal name is an alias.  */
  2105 #if defined (__stub_connect) || defined (__stub___connect)
  2106 choke me
  2107 #else
  2108 connect();
  2109 #endif
  2110 
  2111 ; return 0; }
  2112 EOF
  2113 if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2114   rm -rf conftest*
  2115   eval "ac_cv_func_connect=yes"
  2116 else
  2117   echo "configure: failed program was:" >&5
  2118   cat conftest.$ac_ext >&5
  2119   rm -rf conftest*
  2120   eval "ac_cv_func_connect=no"
  2121 fi
  2122 rm -f conftest*
  2123 fi
  2124 
  2125 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2126   echo "$ac_t""yes" 1>&6
  2127   tcl_checkSocket=0
  2128 else
  2129   echo "$ac_t""no" 1>&6
  2130 tcl_checkSocket=1
  2131 fi
  2132 
  2133     if test "$tcl_checkSocket" = 1; then
  2134 	echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
  2135 echo "configure:2136: checking for setsockopt" >&5
  2136 if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
  2137   echo $ac_n "(cached) $ac_c" 1>&6
  2138 else
  2139   cat > conftest.$ac_ext <<EOF
  2140 #line 2141 "configure"
  2141 #include "confdefs.h"
  2142 /* System header to define __stub macros and hopefully few prototypes,
  2143     which can conflict with char setsockopt(); below.  */
  2144 #include <assert.h>
  2145 /* Override any gcc2 internal prototype to avoid an error.  */
  2146 /* We use char because int might match the return type of a gcc2
  2147     builtin and then its argument prototype would still apply.  */
  2148 char setsockopt();
  2149 
  2150 int main() {
  2151 
  2152 /* The GNU C library defines this for functions which it implements
  2153     to always fail with ENOSYS.  Some functions are actually named
  2154     something starting with __ and the normal name is an alias.  */
  2155 #if defined (__stub_setsockopt) || defined (__stub___setsockopt)
  2156 choke me
  2157 #else
  2158 setsockopt();
  2159 #endif
  2160 
  2161 ; return 0; }
  2162 EOF
  2163 if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2164   rm -rf conftest*
  2165   eval "ac_cv_func_setsockopt=yes"
  2166 else
  2167   echo "configure: failed program was:" >&5
  2168   cat conftest.$ac_ext >&5
  2169   rm -rf conftest*
  2170   eval "ac_cv_func_setsockopt=no"
  2171 fi
  2172 rm -f conftest*
  2173 fi
  2174 
  2175 if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
  2176   echo "$ac_t""yes" 1>&6
  2177   :
  2178 else
  2179   echo "$ac_t""no" 1>&6
  2180 echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
  2181 echo "configure:2182: checking for setsockopt in -lsocket" >&5
  2182 ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
  2183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2184   echo $ac_n "(cached) $ac_c" 1>&6
  2185 else
  2186   ac_save_LIBS="$LIBS"
  2187 LIBS="-lsocket  $LIBS"
  2188 cat > conftest.$ac_ext <<EOF
  2189 #line 2190 "configure"
  2190 #include "confdefs.h"
  2191 /* Override any gcc2 internal prototype to avoid an error.  */
  2192 /* We use char because int might match the return type of a gcc2
  2193     builtin and then its argument prototype would still apply.  */
  2194 char setsockopt();
  2195 
  2196 int main() {
  2197 setsockopt()
  2198 ; return 0; }
  2199 EOF
  2200 if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2201   rm -rf conftest*
  2202   eval "ac_cv_lib_$ac_lib_var=yes"
  2203 else
  2204   echo "configure: failed program was:" >&5
  2205   cat conftest.$ac_ext >&5
  2206   rm -rf conftest*
  2207   eval "ac_cv_lib_$ac_lib_var=no"
  2208 fi
  2209 rm -f conftest*
  2210 LIBS="$ac_save_LIBS"
  2211 
  2212 fi
  2213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2214   echo "$ac_t""yes" 1>&6
  2215   LIBS="$LIBS -lsocket"
  2216 else
  2217   echo "$ac_t""no" 1>&6
  2218 tcl_checkBoth=1
  2219 fi
  2220 
  2221 fi
  2222 
  2223     fi
  2224     if test "$tcl_checkBoth" = 1; then
  2225 	tk_oldLibs=$LIBS
  2226 	LIBS="$LIBS -lsocket -lnsl"
  2227 	echo $ac_n "checking for accept""... $ac_c" 1>&6
  2228 echo "configure:2229: checking for accept" >&5
  2229 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
  2230   echo $ac_n "(cached) $ac_c" 1>&6
  2231 else
  2232   cat > conftest.$ac_ext <<EOF
  2233 #line 2234 "configure"
  2234 #include "confdefs.h"
  2235 /* System header to define __stub macros and hopefully few prototypes,
  2236     which can conflict with char accept(); below.  */
  2237 #include <assert.h>
  2238 /* Override any gcc2 internal prototype to avoid an error.  */
  2239 /* We use char because int might match the return type of a gcc2
  2240     builtin and then its argument prototype would still apply.  */
  2241 char accept();
  2242 
  2243 int main() {
  2244 
  2245 /* The GNU C library defines this for functions which it implements
  2246     to always fail with ENOSYS.  Some functions are actually named
  2247     something starting with __ and the normal name is an alias.  */
  2248 #if defined (__stub_accept) || defined (__stub___accept)
  2249 choke me
  2250 #else
  2251 accept();
  2252 #endif
  2253 
  2254 ; return 0; }
  2255 EOF
  2256 if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2257   rm -rf conftest*
  2258   eval "ac_cv_func_accept=yes"
  2259 else
  2260   echo "configure: failed program was:" >&5
  2261   cat conftest.$ac_ext >&5
  2262   rm -rf conftest*
  2263   eval "ac_cv_func_accept=no"
  2264 fi
  2265 rm -f conftest*
  2266 fi
  2267 
  2268 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
  2269   echo "$ac_t""yes" 1>&6
  2270   tcl_checkNsl=0
  2271 else
  2272   echo "$ac_t""no" 1>&6
  2273 LIBS=$tk_oldLibs
  2274 fi
  2275 
  2276     fi
  2277     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2278 echo "configure:2279: checking for gethostbyname" >&5
  2279 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2280   echo $ac_n "(cached) $ac_c" 1>&6
  2281 else
  2282   cat > conftest.$ac_ext <<EOF
  2283 #line 2284 "configure"
  2284 #include "confdefs.h"
  2285 /* System header to define __stub macros and hopefully few prototypes,
  2286     which can conflict with char gethostbyname(); below.  */
  2287 #include <assert.h>
  2288 /* Override any gcc2 internal prototype to avoid an error.  */
  2289 /* We use char because int might match the return type of a gcc2
  2290     builtin and then its argument prototype would still apply.  */
  2291 char gethostbyname();
  2292 
  2293 int main() {
  2294 
  2295 /* The GNU C library defines this for functions which it implements
  2296     to always fail with ENOSYS.  Some functions are actually named
  2297     something starting with __ and the normal name is an alias.  */
  2298 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2299 choke me
  2300 #else
  2301 gethostbyname();
  2302 #endif
  2303 
  2304 ; return 0; }
  2305 EOF
  2306 if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2307   rm -rf conftest*
  2308   eval "ac_cv_func_gethostbyname=yes"
  2309 else
  2310   echo "configure: failed program was:" >&5
  2311   cat conftest.$ac_ext >&5
  2312   rm -rf conftest*
  2313   eval "ac_cv_func_gethostbyname=no"
  2314 fi
  2315 rm -f conftest*
  2316 fi
  2317 
  2318 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2319   echo "$ac_t""yes" 1>&6
  2320   :
  2321 else
  2322   echo "$ac_t""no" 1>&6
  2323 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2324 echo "configure:2325: checking for gethostbyname in -lnsl" >&5
  2325 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2327   echo $ac_n "(cached) $ac_c" 1>&6
  2328 else
  2329   ac_save_LIBS="$LIBS"
  2330 LIBS="-lnsl  $LIBS"
  2331 cat > conftest.$ac_ext <<EOF
  2332 #line 2333 "configure"
  2333 #include "confdefs.h"
  2334 /* Override any gcc2 internal prototype to avoid an error.  */
  2335 /* We use char because int might match the return type of a gcc2
  2336     builtin and then its argument prototype would still apply.  */
  2337 char gethostbyname();
  2338 
  2339 int main() {
  2340 gethostbyname()
  2341 ; return 0; }
  2342 EOF
  2343 if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2344   rm -rf conftest*
  2345   eval "ac_cv_lib_$ac_lib_var=yes"
  2346 else
  2347   echo "configure: failed program was:" >&5
  2348   cat conftest.$ac_ext >&5
  2349   rm -rf conftest*
  2350   eval "ac_cv_lib_$ac_lib_var=no"
  2351 fi
  2352 rm -f conftest*
  2353 LIBS="$ac_save_LIBS"
  2354 
  2355 fi
  2356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2357   echo "$ac_t""yes" 1>&6
  2358   LIBS="$LIBS -lnsl"
  2359 else
  2360   echo "$ac_t""no" 1>&6
  2361 fi
  2362 
  2363 fi
  2364 
  2365     
  2366     # Don't perform the eval of the libraries here because DL_LIBS
  2367     # won't be set until we call SC_CONFIG_CFLAGS
  2368 
  2369     TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
  2370     
  2371     
  2372 
  2373 
  2374 # Add the threads support libraries
  2375 LIBS="$LIBS$THREADS_LIBS"
  2376 
  2377 
  2378     echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  2379 echo "configure:2380: checking how to build libraries" >&5
  2380     # Check whether --enable-shared or --disable-shared was given.
  2381 if test "${enable_shared+set}" = set; then
  2382   enableval="$enable_shared"
  2383   tcl_ok=$enableval
  2384 else
  2385   tcl_ok=yes
  2386 fi
  2387 
  2388 
  2389     if test "${enable_shared+set}" = set; then
  2390 	enableval="$enable_shared"
  2391 	tcl_ok=$enableval
  2392     else
  2393 	tcl_ok=yes
  2394     fi
  2395 
  2396     if test "$tcl_ok" = "yes" ; then
  2397 	echo "$ac_t""shared" 1>&6
  2398 	SHARED_BUILD=1
  2399     else
  2400 	echo "$ac_t""static" 1>&6
  2401 	SHARED_BUILD=0
  2402 	cat >> confdefs.h <<\EOF
  2403 #define STATIC_BUILD 1
  2404 EOF
  2405 
  2406     fi
  2407 
  2408 
  2409 #--------------------------------------------------------------------
  2410 # The statements below define a collection of compile flags.  This
  2411 # macro depends on the value of SHARED_BUILD, and should be called
  2412 # after SC_ENABLE_SHARED checks the configure switches.
  2413 #--------------------------------------------------------------------
  2414 
  2415 # Extract the first word of "ranlib", so it can be a program name with args.
  2416 set dummy ranlib; ac_word=$2
  2417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2418 echo "configure:2419: checking for $ac_word" >&5
  2419 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  2420   echo $ac_n "(cached) $ac_c" 1>&6
  2421 else
  2422   if test -n "$RANLIB"; then
  2423   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2424 else
  2425   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  2426   ac_dummy="$PATH"
  2427   for ac_dir in $ac_dummy; do
  2428     test -z "$ac_dir" && ac_dir=.
  2429     if test -f $ac_dir/$ac_word; then
  2430       ac_cv_prog_RANLIB="ranlib"
  2431       break
  2432     fi
  2433   done
  2434   IFS="$ac_save_ifs"
  2435   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2436 fi
  2437 fi
  2438 RANLIB="$ac_cv_prog_RANLIB"
  2439 if test -n "$RANLIB"; then
  2440   echo "$ac_t""$RANLIB" 1>&6
  2441 else
  2442   echo "$ac_t""no" 1>&6
  2443 fi
  2444 
  2445 
  2446 
  2447     # Step 0.a: Enable 64 bit support?
  2448 
  2449     echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
  2450 echo "configure:2451: checking if 64bit support is requested" >&5
  2451     # Check whether --enable-64bit or --disable-64bit was given.
  2452 if test "${enable_64bit+set}" = set; then
  2453   enableval="$enable_64bit"
  2454   do64bit=$enableval
  2455 else
  2456   do64bit=no
  2457 fi
  2458 
  2459     echo "$ac_t""$do64bit" 1>&6
  2460 
  2461     # Step 0.b: Enable Solaris 64 bit VIS support?
  2462 
  2463     echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
  2464 echo "configure:2465: checking if 64bit Sparc VIS support is requested" >&5
  2465     # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
  2466 if test "${enable_64bit_vis+set}" = set; then
  2467   enableval="$enable_64bit_vis"
  2468   do64bitVIS=$enableval
  2469 else
  2470   do64bitVIS=no
  2471 fi
  2472 
  2473     echo "$ac_t""$do64bitVIS" 1>&6
  2474 
  2475     if test "$do64bitVIS" = "yes"; then
  2476 	# Force 64bit on with VIS
  2477 	do64bit=yes
  2478     fi
  2479 
  2480     # Step 1: set the variable "system" to hold the name and version number
  2481     # for the system.
  2482 
  2483     
  2484     echo $ac_n "checking system version""... $ac_c" 1>&6
  2485 echo "configure:2486: checking system version" >&5
  2486 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
  2487   echo $ac_n "(cached) $ac_c" 1>&6
  2488 else
  2489   
  2490 	if test -f /usr/lib/NextStep/software_version; then
  2491 	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  2492 	else
  2493 	    tcl_cv_sys_version=`uname -s`-`uname -r`
  2494 	    if test "$?" -ne 0 ; then
  2495 		echo "configure: warning: can't find uname command" 1>&2
  2496 		tcl_cv_sys_version=unknown
  2497 	    else
  2498 		# Special check for weird MP-RAS system (uname returns weird
  2499 		# results, and the version is kept in special file).
  2500 
  2501 		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  2502 		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
  2503 		fi
  2504 		if test "`uname -s`" = "AIX" ; then
  2505 		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
  2506 		fi
  2507 	    fi
  2508 	fi
  2509     
  2510 fi
  2511 
  2512 echo "$ac_t""$tcl_cv_sys_version" 1>&6
  2513     system=$tcl_cv_sys_version
  2514 
  2515 
  2516     # Step 2: check for existence of -ldl library.  This is needed because
  2517     # Linux can use either -ldl or -ldld for dynamic loading.
  2518 
  2519     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2520 echo "configure:2521: checking for dlopen in -ldl" >&5
  2521 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2523   echo $ac_n "(cached) $ac_c" 1>&6
  2524 else
  2525   ac_save_LIBS="$LIBS"
  2526 LIBS="-ldl  $LIBS"
  2527 cat > conftest.$ac_ext <<EOF
  2528 #line 2529 "configure"
  2529 #include "confdefs.h"
  2530 /* Override any gcc2 internal prototype to avoid an error.  */
  2531 /* We use char because int might match the return type of a gcc2
  2532     builtin and then its argument prototype would still apply.  */
  2533 char dlopen();
  2534 
  2535 int main() {
  2536 dlopen()
  2537 ; return 0; }
  2538 EOF
  2539 if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2540   rm -rf conftest*
  2541   eval "ac_cv_lib_$ac_lib_var=yes"
  2542 else
  2543   echo "configure: failed program was:" >&5
  2544   cat conftest.$ac_ext >&5
  2545   rm -rf conftest*
  2546   eval "ac_cv_lib_$ac_lib_var=no"
  2547 fi
  2548 rm -f conftest*
  2549 LIBS="$ac_save_LIBS"
  2550 
  2551 fi
  2552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2553   echo "$ac_t""yes" 1>&6
  2554   have_dl=yes
  2555 else
  2556   echo "$ac_t""no" 1>&6
  2557 have_dl=no
  2558 fi
  2559 
  2560 
  2561     # Require ranlib early so we can override it in special cases below.
  2562 
  2563     
  2564 
  2565     # Step 3: set configuration options based on system name and version.
  2566 
  2567     do64bit_ok=no
  2568     LDFLAGS_ORIG="$LDFLAGS"
  2569     TCL_EXPORT_FILE_SUFFIX=""
  2570     UNSHARED_LIB_SUFFIX=""
  2571     TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
  2572     ECHO_VERSION='`echo ${VERSION}`'
  2573     TCL_LIB_VERSIONS_OK=ok
  2574     CFLAGS_DEBUG=-g
  2575     CFLAGS_OPTIMIZE=-O
  2576     if test "$GCC" = "yes" ; then
  2577 	CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
  2578     else
  2579 	CFLAGS_WARNING=""
  2580     fi
  2581     TCL_NEEDS_EXP_FILE=0
  2582     TCL_BUILD_EXP_FILE=""
  2583     TCL_EXP_FILE=""
  2584     # Extract the first word of "ar", so it can be a program name with args.
  2585 set dummy ar; ac_word=$2
  2586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2587 echo "configure:2588: checking for $ac_word" >&5
  2588 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  2589   echo $ac_n "(cached) $ac_c" 1>&6
  2590 else
  2591   if test -n "$AR"; then
  2592   ac_cv_prog_AR="$AR" # Let the user override the test.
  2593 else
  2594   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  2595   ac_dummy="$PATH"
  2596   for ac_dir in $ac_dummy; do
  2597     test -z "$ac_dir" && ac_dir=.
  2598     if test -f $ac_dir/$ac_word; then
  2599       ac_cv_prog_AR="ar"
  2600       break
  2601     fi
  2602   done
  2603   IFS="$ac_save_ifs"
  2604 fi
  2605 fi
  2606 AR="$ac_cv_prog_AR"
  2607 if test -n "$AR"; then
  2608   echo "$ac_t""$AR" 1>&6
  2609 else
  2610   echo "$ac_t""no" 1>&6
  2611 fi
  2612 
  2613     if test "${AR}" = "" ; then
  2614 	{ echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
  2615     fi
  2616     STLIB_LD='${AR} cr'
  2617     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  2618     PLAT_OBJS=""
  2619     PLAT_SRCS=""
  2620     case $system in
  2621 	AIX-*)
  2622 	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
  2623 		# AIX requires the _r compiler when gcc isn't being used
  2624 		case "${CC}" in
  2625 		    *_r)
  2626 			# ok ...
  2627 			;;
  2628 		    *)
  2629 			CC=${CC}_r
  2630 			;;
  2631 		esac
  2632 		echo "$ac_t""Using $CC for compiling with threads" 1>&6
  2633 	    fi
  2634 	    LIBS="$LIBS -lc"
  2635 	    SHLIB_CFLAGS=""
  2636 	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  2637 	    # symbols when dynamically loaded into tclsh.
  2638 	    SHLIB_LD_LIBS='${LIBS}'
  2639 	    SHLIB_SUFFIX=".so"
  2640 
  2641 	    DL_OBJS="tclLoadDl.o"
  2642 	    LD_LIBRARY_PATH_VAR="LIBPATH"
  2643 
  2644 	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
  2645 	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
  2646 		if test "$GCC" = "yes" ; then
  2647 		    echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  2648 		else 
  2649 		    do64bit_ok=yes
  2650 		    CFLAGS="$CFLAGS -q64"
  2651 		    LDFLAGS="$LDFLAGS -q64"
  2652 		    RANLIB="${RANLIB} -X64"
  2653 		    AR="${AR} -X64"
  2654 		    SHLIB_LD_FLAGS="-b64"
  2655 		fi
  2656 	    fi
  2657 
  2658 	    if test "`uname -m`" = "ia64" ; then
  2659 		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
  2660 		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  2661 		# AIX-5 has dl* in libc.so
  2662 		DL_LIBS=""
  2663 		if test "$GCC" = "yes" ; then
  2664 		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  2665 		else
  2666 		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
  2667 		fi
  2668 		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  2669 	    else
  2670 		if test "$GCC" = "yes" ; then
  2671 		    SHLIB_LD="gcc -shared"
  2672 		else
  2673 		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
  2674 		fi
  2675 		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
  2676 		DL_LIBS="-ldl"
  2677 		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  2678 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2679 		TCL_NEEDS_EXP_FILE=1
  2680 		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
  2681 	    fi
  2682 
  2683 	    # AIX v<=4.1 has some different flags than 4.2+
  2684 	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
  2685 		LIBOBJS="$LIBOBJS tclLoadAix.o"
  2686 		DL_LIBS="-lld"
  2687 	    fi
  2688 
  2689 	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
  2690 	    # non-blocking file IO.  This library has to be linked in after
  2691 	    # the MATH_LIBS or it breaks the pow() function.  The way to
  2692 	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
  2693 	    # This library also supplies gettimeofday.
  2694 	    #
  2695 	    # AIX does not have a timezone field in struct tm. When the AIX
  2696 	    # bsd library is used, the timezone global and the gettimeofday
  2697 	    # methods are to be avoided for timezone deduction instead, we
  2698 	    # deduce the timezone by comparing the localtime result on a
  2699 	    # known GMT value.
  2700 
  2701 	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
  2702 echo "configure:2703: checking for gettimeofday in -lbsd" >&5
  2703 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  2704 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2705   echo $ac_n "(cached) $ac_c" 1>&6
  2706 else
  2707   ac_save_LIBS="$LIBS"
  2708 LIBS="-lbsd  $LIBS"
  2709 cat > conftest.$ac_ext <<EOF
  2710 #line 2711 "configure"
  2711 #include "confdefs.h"
  2712 /* Override any gcc2 internal prototype to avoid an error.  */
  2713 /* We use char because int might match the return type of a gcc2
  2714     builtin and then its argument prototype would still apply.  */
  2715 char gettimeofday();
  2716 
  2717 int main() {
  2718 gettimeofday()
  2719 ; return 0; }
  2720 EOF
  2721 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2722   rm -rf conftest*
  2723   eval "ac_cv_lib_$ac_lib_var=yes"
  2724 else
  2725   echo "configure: failed program was:" >&5
  2726   cat conftest.$ac_ext >&5
  2727   rm -rf conftest*
  2728   eval "ac_cv_lib_$ac_lib_var=no"
  2729 fi
  2730 rm -f conftest*
  2731 LIBS="$ac_save_LIBS"
  2732 
  2733 fi
  2734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2735   echo "$ac_t""yes" 1>&6
  2736   libbsd=yes
  2737 else
  2738   echo "$ac_t""no" 1>&6
  2739 libbsd=no
  2740 fi
  2741 
  2742 	    if test $libbsd = yes; then
  2743 	    	MATH_LIBS="$MATH_LIBS -lbsd"
  2744 	    	cat >> confdefs.h <<\EOF
  2745 #define USE_DELTA_FOR_TZ 1
  2746 EOF
  2747 
  2748 	    fi
  2749 	    ;;
  2750 	BeOS*)
  2751 	    SHLIB_CFLAGS="-fPIC"
  2752 	    SHLIB_LD="${CC} -nostart"
  2753 	    SHLIB_LD_LIBS='${LIBS}'
  2754 	    SHLIB_SUFFIX=".so"
  2755 	    DL_OBJS="tclLoadDl.o"
  2756 	    DL_LIBS="-ldl"
  2757 
  2758 	    #-----------------------------------------------------------
  2759 	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
  2760 	    # -lsocket, even if the network functions are in -lnet which
  2761 	    # is always linked to, for compatibility.
  2762 	    #-----------------------------------------------------------
  2763 	    echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
  2764 echo "configure:2765: checking for inet_ntoa in -lbind" >&5
  2765 ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  2766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2767   echo $ac_n "(cached) $ac_c" 1>&6
  2768 else
  2769   ac_save_LIBS="$LIBS"
  2770 LIBS="-lbind  $LIBS"
  2771 cat > conftest.$ac_ext <<EOF
  2772 #line 2773 "configure"
  2773 #include "confdefs.h"
  2774 /* Override any gcc2 internal prototype to avoid an error.  */
  2775 /* We use char because int might match the return type of a gcc2
  2776     builtin and then its argument prototype would still apply.  */
  2777 char inet_ntoa();
  2778 
  2779 int main() {
  2780 inet_ntoa()
  2781 ; return 0; }
  2782 EOF
  2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2784   rm -rf conftest*
  2785   eval "ac_cv_lib_$ac_lib_var=yes"
  2786 else
  2787   echo "configure: failed program was:" >&5
  2788   cat conftest.$ac_ext >&5
  2789   rm -rf conftest*
  2790   eval "ac_cv_lib_$ac_lib_var=no"
  2791 fi
  2792 rm -f conftest*
  2793 LIBS="$ac_save_LIBS"
  2794 
  2795 fi
  2796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2797   echo "$ac_t""yes" 1>&6
  2798   LIBS="$LIBS -lbind -lsocket"
  2799 else
  2800   echo "$ac_t""no" 1>&6
  2801 fi
  2802 
  2803 	    ;;
  2804 	BSD/OS-2.1*|BSD/OS-3*)
  2805 	    SHLIB_CFLAGS=""
  2806 	    SHLIB_LD="shlicc -r"
  2807 	    SHLIB_LD_LIBS='${LIBS}'
  2808 	    SHLIB_SUFFIX=".so"
  2809 	    DL_OBJS="tclLoadDl.o"
  2810 	    DL_LIBS="-ldl"
  2811 	    CC_SEARCH_FLAGS=""
  2812 	    LD_SEARCH_FLAGS=""
  2813 	    ;;
  2814 	BSD/OS-4.*)
  2815 	    SHLIB_CFLAGS="-export-dynamic -fPIC"
  2816 	    SHLIB_LD="cc -shared"
  2817 	    SHLIB_LD_LIBS='${LIBS}'
  2818 	    SHLIB_SUFFIX=".so"
  2819 	    DL_OBJS="tclLoadDl.o"
  2820 	    DL_LIBS="-ldl"
  2821 	    LDFLAGS="$LDFLAGS -export-dynamic"
  2822 	    CC_SEARCH_FLAGS=""
  2823 	    LD_SEARCH_FLAGS=""
  2824 	    ;;
  2825 	dgux*)
  2826 	    SHLIB_CFLAGS="-K PIC"
  2827 	    SHLIB_LD="cc -G"
  2828 	    SHLIB_LD_LIBS=""
  2829 	    SHLIB_SUFFIX=".so"
  2830 	    DL_OBJS="tclLoadDl.o"
  2831 	    DL_LIBS="-ldl"
  2832 	    CC_SEARCH_FLAGS=""
  2833 	    LD_SEARCH_FLAGS=""
  2834 	    ;;
  2835 	HP-UX-*.11.*)
  2836 	    # Use updated header definitions where possible
  2837 	    cat >> confdefs.h <<\EOF
  2838 #define _XOPEN_SOURCE 1
  2839 EOF
  2840           # Use the XOPEN network library
  2841 	    cat >> confdefs.h <<\EOF
  2842 #define _XOPEN_SOURCE_EXTENDED 1
  2843 EOF
  2844  # Use the XOPEN network library
  2845 	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
  2846 
  2847 	    if test "`uname -m`" = "ia64" ; then
  2848 		SHLIB_SUFFIX=".so"
  2849 	    else
  2850 		SHLIB_SUFFIX=".sl"
  2851 	    fi
  2852 	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2853 echo "configure:2854: checking for shl_load in -ldld" >&5
  2854 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2856   echo $ac_n "(cached) $ac_c" 1>&6
  2857 else
  2858   ac_save_LIBS="$LIBS"
  2859 LIBS="-ldld  $LIBS"
  2860 cat > conftest.$ac_ext <<EOF
  2861 #line 2862 "configure"
  2862 #include "confdefs.h"
  2863 /* Override any gcc2 internal prototype to avoid an error.  */
  2864 /* We use char because int might match the return type of a gcc2
  2865     builtin and then its argument prototype would still apply.  */
  2866 char shl_load();
  2867 
  2868 int main() {
  2869 shl_load()
  2870 ; return 0; }
  2871 EOF
  2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2873   rm -rf conftest*
  2874   eval "ac_cv_lib_$ac_lib_var=yes"
  2875 else
  2876   echo "configure: failed program was:" >&5
  2877   cat conftest.$ac_ext >&5
  2878   rm -rf conftest*
  2879   eval "ac_cv_lib_$ac_lib_var=no"
  2880 fi
  2881 rm -f conftest*
  2882 LIBS="$ac_save_LIBS"
  2883 
  2884 fi
  2885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2886   echo "$ac_t""yes" 1>&6
  2887   tcl_ok=yes
  2888 else
  2889   echo "$ac_t""no" 1>&6
  2890 tcl_ok=no
  2891 fi
  2892 
  2893 	    if test "$tcl_ok" = yes; then
  2894 		SHLIB_CFLAGS="+z"
  2895 		SHLIB_LD="ld -b"
  2896 		SHLIB_LD_LIBS='${LIBS}'
  2897 		DL_OBJS="tclLoadShl.o"
  2898 		DL_LIBS="-ldld"
  2899 		LDFLAGS="$LDFLAGS -Wl,-E"
  2900 		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  2901 		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  2902 		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  2903 	    fi
  2904 	    if test "$GCC" = "yes" ; then
  2905 		SHLIB_LD="gcc -shared"
  2906 		SHLIB_LD_LIBS='${LIBS}'
  2907 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2908 	    fi
  2909 
  2910 	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
  2911 	    #CFLAGS="$CFLAGS +DAportable"
  2912 
  2913 	    # Check to enable 64-bit flags for compiler/linker
  2914 	    if test "$do64bit" = "yes" ; then
  2915 		if test "$GCC" = "yes" ; then
  2916 		    hpux_arch=`${CC} -dumpmachine`
  2917 		    case $hpux_arch in
  2918 			hppa64*)
  2919 			    # 64-bit gcc in use.  Fix flags for GNU ld.
  2920 			    do64bit_ok=yes
  2921 			    SHLIB_LD="${CC} -shared"
  2922 			    SHLIB_LD_LIBS='${LIBS}'
  2923 			    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  2924 			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  2925 			    ;;
  2926 			*)
  2927 			    echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  2928 			    ;;
  2929 		    esac
  2930 		else
  2931 		    do64bit_ok=yes
  2932 		    CFLAGS="$CFLAGS +DD64"
  2933 		    LDFLAGS="$LDFLAGS +DD64"
  2934 		fi
  2935 	    fi
  2936 	    ;;
  2937 	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  2938 	    SHLIB_SUFFIX=".sl"
  2939 	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2940 echo "configure:2941: checking for shl_load in -ldld" >&5
  2941 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2943   echo $ac_n "(cached) $ac_c" 1>&6
  2944 else
  2945   ac_save_LIBS="$LIBS"
  2946 LIBS="-ldld  $LIBS"
  2947 cat > conftest.$ac_ext <<EOF
  2948 #line 2949 "configure"
  2949 #include "confdefs.h"
  2950 /* Override any gcc2 internal prototype to avoid an error.  */
  2951 /* We use char because int might match the return type of a gcc2
  2952     builtin and then its argument prototype would still apply.  */
  2953 char shl_load();
  2954 
  2955 int main() {
  2956 shl_load()
  2957 ; return 0; }
  2958 EOF
  2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2960   rm -rf conftest*
  2961   eval "ac_cv_lib_$ac_lib_var=yes"
  2962 else
  2963   echo "configure: failed program was:" >&5
  2964   cat conftest.$ac_ext >&5
  2965   rm -rf conftest*
  2966   eval "ac_cv_lib_$ac_lib_var=no"
  2967 fi
  2968 rm -f conftest*
  2969 LIBS="$ac_save_LIBS"
  2970 
  2971 fi
  2972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2973   echo "$ac_t""yes" 1>&6
  2974   tcl_ok=yes
  2975 else
  2976   echo "$ac_t""no" 1>&6
  2977 tcl_ok=no
  2978 fi
  2979 
  2980 	    if test "$tcl_ok" = yes; then
  2981 		SHLIB_CFLAGS="+z"
  2982 		SHLIB_LD="ld -b"
  2983 		SHLIB_LD_LIBS=""
  2984 		DL_OBJS="tclLoadShl.o"
  2985 		DL_LIBS="-ldld"
  2986 		LDFLAGS="$LDFLAGS -Wl,-E"
  2987 		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  2988 		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  2989 		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  2990 	    fi
  2991 	    ;;
  2992 	IRIX-4.*)
  2993 	    SHLIB_CFLAGS="-G 0"
  2994 	    SHLIB_SUFFIX=".a"
  2995 	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  2996 	    SHLIB_LD_LIBS='${LIBS}'
  2997 	    DL_OBJS="tclLoadAout.o"
  2998 	    DL_LIBS=""
  2999 	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  3000 	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  3001 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3002 	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
  3003 	    ;;
  3004 	IRIX-5.*)
  3005 	    SHLIB_CFLAGS=""
  3006 	    SHLIB_LD="ld -shared -rdata_shared"
  3007 	    SHLIB_LD_LIBS='${LIBS}'
  3008 	    SHLIB_SUFFIX=".so"
  3009 	    DL_OBJS="tclLoadDl.o"
  3010 	    DL_LIBS=""
  3011 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3012 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3013 	    ;;
  3014 	IRIX-6.*)
  3015 	    SHLIB_CFLAGS=""
  3016 	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  3017 	    SHLIB_LD_LIBS='${LIBS}'
  3018 	    SHLIB_SUFFIX=".so"
  3019 	    DL_OBJS="tclLoadDl.o"
  3020 	    DL_LIBS=""
  3021 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3022 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3023 	    if test "$GCC" = "yes" ; then
  3024 		CFLAGS="$CFLAGS -mabi=n32"
  3025 		LDFLAGS="$LDFLAGS -mabi=n32"
  3026 	    else
  3027 		case $system in
  3028 		    IRIX-6.3)
  3029 			# Use to build 6.2 compatible binaries on 6.3.
  3030 			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
  3031 			;;
  3032 		    *)
  3033 			CFLAGS="$CFLAGS -n32"
  3034 			;;
  3035 		esac
  3036 		LDFLAGS="$LDFLAGS -n32"
  3037 	    fi
  3038 	    ;;
  3039 	IRIX64-6.*)
  3040 	    SHLIB_CFLAGS=""
  3041 	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  3042 	    SHLIB_LD_LIBS='${LIBS}'
  3043 	    SHLIB_SUFFIX=".so"
  3044 	    DL_OBJS="tclLoadDl.o"
  3045 	    DL_LIBS=""
  3046 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3047 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3048 
  3049 	    # Check to enable 64-bit flags for compiler/linker
  3050 
  3051 	    if test "$do64bit" = "yes" ; then
  3052 	        if test "$GCC" = "yes" ; then
  3053 	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
  3054 	        else
  3055 	            do64bit_ok=yes
  3056 	            SHLIB_LD="ld -64 -shared -rdata_shared"
  3057 	            CFLAGS="$CFLAGS -64"
  3058 	            LDFLAGS="$LDFLAGS -64"
  3059 	        fi
  3060 	    fi
  3061 	    ;;
  3062 	Linux*)
  3063 	    SHLIB_CFLAGS="-fPIC"
  3064 	    SHLIB_LD_LIBS='${LIBS}'
  3065 	    SHLIB_SUFFIX=".so"
  3066 
  3067 	    CFLAGS_OPTIMIZE=-O2
  3068 	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
  3069 	    # when you inline the string and math operations.  Turn this off to
  3070 	    # get rid of the warnings.
  3071 	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
  3072 
  3073 	    if test "$have_dl" = yes; then
  3074 		SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
  3075 		DL_OBJS="tclLoadDl.o"
  3076 		DL_LIBS="-ldl"
  3077 		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  3078 		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3079 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3080 	    else
  3081 		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  3082 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  3083 echo "configure:3084: checking for dld.h" >&5
  3084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3085   echo $ac_n "(cached) $ac_c" 1>&6
  3086 else
  3087   cat > conftest.$ac_ext <<EOF
  3088 #line 3089 "configure"
  3089 #include "confdefs.h"
  3090 #include <dld.h>
  3091 EOF
  3092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3093 { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3095 if test -z "$ac_err"; then
  3096   rm -rf conftest*
  3097   eval "ac_cv_header_$ac_safe=yes"
  3098 else
  3099   echo "$ac_err" >&5
  3100   echo "configure: failed program was:" >&5
  3101   cat conftest.$ac_ext >&5
  3102   rm -rf conftest*
  3103   eval "ac_cv_header_$ac_safe=no"
  3104 fi
  3105 rm -f conftest*
  3106 fi
  3107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3108   echo "$ac_t""yes" 1>&6
  3109   
  3110 		    SHLIB_LD="ld -shared"
  3111 		    DL_OBJS="tclLoadDld.o"
  3112 		    DL_LIBS="-ldld"
  3113 		    CC_SEARCH_FLAGS=""
  3114 		    LD_SEARCH_FLAGS=""
  3115 else
  3116   echo "$ac_t""no" 1>&6
  3117 fi
  3118 
  3119 	    fi
  3120 	    if test "`uname -m`" = "alpha" ; then
  3121 		CFLAGS="$CFLAGS -mieee"
  3122 	    fi
  3123 	    if test $do64bit = yes; then
  3124 		echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6
  3125 echo "configure:3126: checking if compiler accepts -m64 flag" >&5
  3126 if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then
  3127   echo $ac_n "(cached) $ac_c" 1>&6
  3128 else
  3129   
  3130 		    hold_cflags=$CFLAGS
  3131 		    CFLAGS="$CFLAGS -m64"
  3132 		    cat > conftest.$ac_ext <<EOF
  3133 #line 3134 "configure"
  3134 #include "confdefs.h"
  3135 
  3136 int main() {
  3137 
  3138 ; return 0; }
  3139 EOF
  3140 if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3141   rm -rf conftest*
  3142   tcl_cv_cc_m64=yes
  3143 else
  3144   echo "configure: failed program was:" >&5
  3145   cat conftest.$ac_ext >&5
  3146   rm -rf conftest*
  3147   tcl_cv_cc_m64=no
  3148 fi
  3149 rm -f conftest*
  3150 		    CFLAGS=$hold_cflags
  3151 fi
  3152 
  3153 echo "$ac_t""$tcl_cv_cc_m64" 1>&6
  3154 		if test $tcl_cv_cc_m64 = yes; then
  3155 		    CFLAGS="$CFLAGS -m64"
  3156 		    do64bit_ok=yes
  3157 		fi
  3158 	    fi
  3159 
  3160 	    # The combo of gcc + glibc has a bug related
  3161 	    # to inlining of functions like strtod(). The
  3162 	    # -fno-builtin flag should address this problem
  3163 	    # but it does not work. The -fno-inline flag
  3164 	    # is kind of overkill but it works.
  3165 	    # Disable inlining only when one of the
  3166 	    # files in compat/*.c is being linked in.
  3167 	    if test x"${LIBOBJS}" != x ; then
  3168 	        CFLAGS="$CFLAGS -fno-inline"
  3169 	    fi
  3170 
  3171 	    # XIM peeking works under XFree86.
  3172 	    cat >> confdefs.h <<\EOF
  3173 #define PEEK_XCLOSEIM 1
  3174 EOF
  3175 
  3176 
  3177 	    ;;
  3178 	GNU*)
  3179 	    SHLIB_CFLAGS="-fPIC"
  3180 	    SHLIB_LD_LIBS='${LIBS}'
  3181 	    SHLIB_SUFFIX=".so"
  3182 
  3183 	    if test "$have_dl" = yes; then
  3184 		SHLIB_LD="${CC} -shared"
  3185 		DL_OBJS=""
  3186 		DL_LIBS="-ldl"
  3187 		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  3188 		CC_SEARCH_FLAGS=""
  3189 		LD_SEARCH_FLAGS=""
  3190 	    else
  3191 		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  3192 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  3193 echo "configure:3194: checking for dld.h" >&5
  3194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3195   echo $ac_n "(cached) $ac_c" 1>&6
  3196 else
  3197   cat > conftest.$ac_ext <<EOF
  3198 #line 3199 "configure"
  3199 #include "confdefs.h"
  3200 #include <dld.h>
  3201 EOF
  3202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3203 { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3205 if test -z "$ac_err"; then
  3206   rm -rf conftest*
  3207   eval "ac_cv_header_$ac_safe=yes"
  3208 else
  3209   echo "$ac_err" >&5
  3210   echo "configure: failed program was:" >&5
  3211   cat conftest.$ac_ext >&5
  3212   rm -rf conftest*
  3213   eval "ac_cv_header_$ac_safe=no"
  3214 fi
  3215 rm -f conftest*
  3216 fi
  3217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3218   echo "$ac_t""yes" 1>&6
  3219   
  3220 		    SHLIB_LD="ld -shared"
  3221 		    DL_OBJS=""
  3222 		    DL_LIBS="-ldld"
  3223 		    CC_SEARCH_FLAGS=""
  3224 		    LD_SEARCH_FLAGS=""
  3225 else
  3226   echo "$ac_t""no" 1>&6
  3227 fi
  3228 
  3229 	    fi
  3230 	    if test "`uname -m`" = "alpha" ; then
  3231 		CFLAGS="$CFLAGS -mieee"
  3232 	    fi
  3233 	    ;;
  3234 	Lynx*)
  3235 	    SHLIB_CFLAGS="-fPIC"
  3236 	    SHLIB_LD_LIBS='${LIBS}'
  3237 	    SHLIB_SUFFIX=".so"
  3238 	    CFLAGS_OPTIMIZE=-02
  3239 	    SHLIB_LD="${CC} -shared "
  3240 	    DL_OBJS="tclLoadDl.o"
  3241 	    DL_LIBS="-mshared -ldl"
  3242 	    LD_FLAGS="-Wl,--export-dynamic"
  3243 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3244 	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3245 	    ;;
  3246 	MP-RAS-02*)
  3247 	    SHLIB_CFLAGS="-K PIC"
  3248 	    SHLIB_LD="cc -G"
  3249 	    SHLIB_LD_LIBS=""
  3250 	    SHLIB_SUFFIX=".so"
  3251 	    DL_OBJS="tclLoadDl.o"
  3252 	    DL_LIBS="-ldl"
  3253 	    CC_SEARCH_FLAGS=""
  3254 	    LD_SEARCH_FLAGS=""
  3255 	    ;;
  3256 	MP-RAS-*)
  3257 	    SHLIB_CFLAGS="-K PIC"
  3258 	    SHLIB_LD="cc -G"
  3259 	    SHLIB_LD_LIBS=""
  3260 	    SHLIB_SUFFIX=".so"
  3261 	    DL_OBJS="tclLoadDl.o"
  3262 	    DL_LIBS="-ldl"
  3263 	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
  3264 	    CC_SEARCH_FLAGS=""
  3265 	    LD_SEARCH_FLAGS=""
  3266 	    ;;
  3267 	NetBSD-*|FreeBSD-[1-2].*)
  3268 	    # Not available on all versions:  check for include file.
  3269 	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  3270 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  3271 echo "configure:3272: checking for dlfcn.h" >&5
  3272 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3273   echo $ac_n "(cached) $ac_c" 1>&6
  3274 else
  3275   cat > conftest.$ac_ext <<EOF
  3276 #line 3277 "configure"
  3277 #include "confdefs.h"
  3278 #include <dlfcn.h>
  3279 EOF
  3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3283 if test -z "$ac_err"; then
  3284   rm -rf conftest*
  3285   eval "ac_cv_header_$ac_safe=yes"
  3286 else
  3287   echo "$ac_err" >&5
  3288   echo "configure: failed program was:" >&5
  3289   cat conftest.$ac_ext >&5
  3290   rm -rf conftest*
  3291   eval "ac_cv_header_$ac_safe=no"
  3292 fi
  3293 rm -f conftest*
  3294 fi
  3295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3296   echo "$ac_t""yes" 1>&6
  3297   
  3298 		# NetBSD/SPARC needs -fPIC, -fpic will not do.
  3299 		SHLIB_CFLAGS="-fPIC"
  3300 		SHLIB_LD="ld -Bshareable -x"
  3301 		SHLIB_LD_LIBS='${LIBS}'
  3302 		SHLIB_SUFFIX=".so"
  3303 		DL_OBJS="tclLoadDl.o"
  3304 		DL_LIBS=""
  3305 		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3306 		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3307 		echo $ac_n "checking for ELF""... $ac_c" 1>&6
  3308 echo "configure:3309: checking for ELF" >&5
  3309 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
  3310   echo $ac_n "(cached) $ac_c" 1>&6
  3311 else
  3312   
  3313 		    cat > conftest.$ac_ext <<EOF
  3314 #line 3315 "configure"
  3315 #include "confdefs.h"
  3316 
  3317 #ifdef __ELF__
  3318 	yes
  3319 #endif
  3320 		    
  3321 EOF
  3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3323   egrep "yes" >/dev/null 2>&1; then
  3324   rm -rf conftest*
  3325   tcl_cv_ld_elf=yes
  3326 else
  3327   rm -rf conftest*
  3328   tcl_cv_ld_elf=no
  3329 fi
  3330 rm -f conftest*
  3331 
  3332 fi
  3333 
  3334 echo "$ac_t""$tcl_cv_ld_elf" 1>&6
  3335 		if test $tcl_cv_ld_elf = yes; then
  3336 		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
  3337 		else
  3338 		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  3339 		fi
  3340 	    
  3341 else
  3342   echo "$ac_t""no" 1>&6
  3343 
  3344 		SHLIB_CFLAGS=""
  3345 		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  3346 		SHLIB_LD_LIBS='${LIBS}'
  3347 		SHLIB_SUFFIX=".a"
  3348 		DL_OBJS="tclLoadAout.o"
  3349 		DL_LIBS=""
  3350 		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  3351 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3352 		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3353 	    
  3354 fi
  3355 
  3356 
  3357 	    # FreeBSD doesn't handle version numbers with dots.
  3358 
  3359 	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3360 	    TCL_LIB_VERSIONS_OK=nodots
  3361 	    ;;
  3362 	OpenBSD-*)
  3363 	    case `arch -s` in
  3364 	    m88k|vax)
  3365 		SHLIB_CFLAGS=""
  3366 		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  3367 		SHLIB_LD_LIBS='${LIBS}'
  3368 		SHLIB_SUFFIX=".a"
  3369 		DL_OBJS="tclLoadAout.o"
  3370 		DL_LIBS=""
  3371 		LDFLAGS=""
  3372 		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  3373 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3374 		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3375 		;;
  3376 	    *)
  3377 		# OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
  3378 		case `machine` in
  3379 		sparc|sparc64)
  3380 		    SHLIB_CFLAGS="-fPIC";;
  3381 	        *)
  3382 		    SHLIB_CFLAGS="-fpic";;
  3383 	        esac
  3384 		SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
  3385 		SHLIB_LD_LIBS='${LIBS}'
  3386 		SHLIB_SUFFIX=".so"
  3387 		DL_OBJS="tclLoadDl.o"
  3388 		DL_LIBS=""
  3389 		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3390 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3391 		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  3392 		echo $ac_n "checking for ELF""... $ac_c" 1>&6
  3393 echo "configure:3394: checking for ELF" >&5
  3394 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
  3395   echo $ac_n "(cached) $ac_c" 1>&6
  3396 else
  3397   
  3398 		    cat > conftest.$ac_ext <<EOF
  3399 #line 3400 "configure"
  3400 #include "confdefs.h"
  3401 
  3402 #ifdef __ELF__
  3403 	yes
  3404 #endif
  3405 		    
  3406 EOF
  3407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3408   egrep "yes" >/dev/null 2>&1; then
  3409   rm -rf conftest*
  3410   tcl_cv_ld_elf=yes
  3411 else
  3412   rm -rf conftest*
  3413   tcl_cv_ld_elf=no
  3414 fi
  3415 rm -f conftest*
  3416 
  3417 fi
  3418 
  3419 echo "$ac_t""$tcl_cv_ld_elf" 1>&6
  3420 		if test $tcl_cv_ld_elf = yes; then
  3421 		    LDFLAGS=-Wl,-export-dynamic
  3422 		else
  3423 		    LDFLAGS=""
  3424 	        fi
  3425 		;;
  3426 	    esac
  3427 
  3428 	    # OpenBSD doesn't do version numbers with dots.
  3429 	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3430 	    TCL_LIB_VERSIONS_OK=nodots
  3431 	    ;;
  3432 	FreeBSD-*)
  3433 	    # FreeBSD 3.* and greater have ELF.
  3434 	    SHLIB_CFLAGS="-fPIC"
  3435 	    SHLIB_LD="ld -Bshareable -x"
  3436 	    SHLIB_LD_LIBS='${LIBS}'
  3437 	    SHLIB_SUFFIX=".so"
  3438 	    DL_OBJS="tclLoadDl.o"
  3439 	    DL_LIBS=""
  3440 	    LDFLAGS="$LDFLAGS -export-dynamic"
  3441 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3442 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3443 	    if test "${TCL_THREADS}" = "1" ; then
  3444 		# The -pthread needs to go in the CFLAGS, not LIBS
  3445 		LIBS=`echo $LIBS | sed s/-pthread//`
  3446 		CFLAGS="$CFLAGS -pthread"
  3447 	    	LDFLAGS="$LDFLAGS -pthread"
  3448 	    fi
  3449 	    case $system in
  3450 	    FreeBSD-3.*)
  3451 	    	# FreeBSD-3 doesn't handle version numbers with dots.
  3452 	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3453 	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
  3454 	    	TCL_LIB_VERSIONS_OK=nodots
  3455 		;;
  3456 	    esac
  3457 	    ;;
  3458 	Darwin-*)
  3459 	    CFLAGS_OPTIMIZE="-Os"
  3460 	    SHLIB_CFLAGS="-fno-common"
  3461 	    # To avoid discrepancies between what headers configure sees during
  3462 	    # preprocessing tests and compiling tests, move any -isysroot and
  3463 	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
  3464 	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
  3465 		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  3466 		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
  3467 	    CFLAGS="`echo " ${CFLAGS}" | \
  3468 		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  3469 		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
  3470 	    if test $do64bit = yes; then
  3471 		case `arch` in
  3472 		    ppc)
  3473 			echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
  3474 echo "configure:3475: checking if compiler accepts -arch ppc64 flag" >&5
  3475 if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then
  3476   echo $ac_n "(cached) $ac_c" 1>&6
  3477 else
  3478   
  3479 			    hold_cflags=$CFLAGS
  3480 			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  3481 			    cat > conftest.$ac_ext <<EOF
  3482 #line 3483 "configure"
  3483 #include "confdefs.h"
  3484 
  3485 int main() {
  3486 
  3487 ; return 0; }
  3488 EOF
  3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3490   rm -rf conftest*
  3491   tcl_cv_cc_arch_ppc64=yes
  3492 else
  3493   echo "configure: failed program was:" >&5
  3494   cat conftest.$ac_ext >&5
  3495   rm -rf conftest*
  3496   tcl_cv_cc_arch_ppc64=no
  3497 fi
  3498 rm -f conftest*
  3499 			    CFLAGS=$hold_cflags
  3500 fi
  3501 
  3502 echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
  3503 			if test $tcl_cv_cc_arch_ppc64 = yes; then
  3504 			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  3505 			    do64bit_ok=yes
  3506 			fi;;
  3507 		    i386)
  3508 			echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
  3509 echo "configure:3510: checking if compiler accepts -arch x86_64 flag" >&5
  3510 if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then
  3511   echo $ac_n "(cached) $ac_c" 1>&6
  3512 else
  3513   
  3514 			    hold_cflags=$CFLAGS
  3515 			    CFLAGS="$CFLAGS -arch x86_64"
  3516 			    cat > conftest.$ac_ext <<EOF
  3517 #line 3518 "configure"
  3518 #include "confdefs.h"
  3519 
  3520 int main() {
  3521 
  3522 ; return 0; }
  3523 EOF
  3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3525   rm -rf conftest*
  3526   tcl_cv_cc_arch_x86_64=yes
  3527 else
  3528   echo "configure: failed program was:" >&5
  3529   cat conftest.$ac_ext >&5
  3530   rm -rf conftest*
  3531   tcl_cv_cc_arch_x86_64=no
  3532 fi
  3533 rm -f conftest*
  3534 			    CFLAGS=$hold_cflags
  3535 fi
  3536 
  3537 echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6
  3538 			if test $tcl_cv_cc_arch_x86_64 = yes; then
  3539 			    CFLAGS="$CFLAGS -arch x86_64"
  3540 			    do64bit_ok=yes
  3541 			fi;;
  3542 		    *)
  3543 			echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;;
  3544 		esac
  3545 	    else
  3546 		# Check for combined 32-bit and 64-bit fat build
  3547 		echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
  3548 		    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
  3549 		    fat_32_64=yes
  3550 	    fi
  3551 	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
  3552 	    echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
  3553 echo "configure:3554: checking if ld accepts -single_module flag" >&5
  3554 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then
  3555   echo $ac_n "(cached) $ac_c" 1>&6
  3556 else
  3557   
  3558 		hold_ldflags=$LDFLAGS
  3559 		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
  3560 		cat > conftest.$ac_ext <<EOF
  3561 #line 3562 "configure"
  3562 #include "confdefs.h"
  3563 
  3564 int main() {
  3565 int i;
  3566 ; return 0; }
  3567 EOF
  3568 if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3569   rm -rf conftest*
  3570   tcl_cv_ld_single_module=yes
  3571 else
  3572   echo "configure: failed program was:" >&5
  3573   cat conftest.$ac_ext >&5
  3574   rm -rf conftest*
  3575   tcl_cv_ld_single_module=no
  3576 fi
  3577 rm -f conftest*
  3578 		LDFLAGS=$hold_ldflags
  3579 fi
  3580 
  3581 echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
  3582 	    if test $tcl_cv_ld_single_module = yes; then
  3583 		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
  3584 	    fi
  3585 	    SHLIB_LD_LIBS='${LIBS}'
  3586 	    SHLIB_SUFFIX=".dylib"
  3587 	    DL_OBJS="tclLoadDyld.o"
  3588 	    DL_LIBS=""
  3589 	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
  3590 	    test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
  3591 		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
  3592 		LDFLAGS="$LDFLAGS -prebind"
  3593 	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
  3594 	    echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
  3595 echo "configure:3596: checking if ld accepts -search_paths_first flag" >&5
  3596 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then
  3597   echo $ac_n "(cached) $ac_c" 1>&6
  3598 else
  3599   
  3600 		hold_ldflags=$LDFLAGS
  3601 		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  3602 		cat > conftest.$ac_ext <<EOF
  3603 #line 3604 "configure"
  3604 #include "confdefs.h"
  3605 
  3606 int main() {
  3607 int i;
  3608 ; return 0; }
  3609 EOF
  3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3611   rm -rf conftest*
  3612   tcl_cv_ld_search_paths_first=yes
  3613 else
  3614   echo "configure: failed program was:" >&5
  3615   cat conftest.$ac_ext >&5
  3616   rm -rf conftest*
  3617   tcl_cv_ld_search_paths_first=no
  3618 fi
  3619 rm -f conftest*
  3620 		LDFLAGS=$hold_ldflags
  3621 fi
  3622 
  3623 echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
  3624 	    if test $tcl_cv_ld_search_paths_first = yes; then
  3625 		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  3626 	    fi
  3627 	    CC_SEARCH_FLAGS=""
  3628 	    LD_SEARCH_FLAGS=""
  3629 	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  3630 	    PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
  3631 	    PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
  3632 	    echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
  3633 echo "configure:3634: checking whether to use CoreFoundation" >&5
  3634 	    # Check whether --enable-corefoundation or --disable-corefoundation was given.
  3635 if test "${enable_corefoundation+set}" = set; then
  3636   enableval="$enable_corefoundation"
  3637   tcl_corefoundation=$enableval
  3638 else
  3639   tcl_corefoundation=yes
  3640 fi
  3641 
  3642 	    echo "$ac_t""$tcl_corefoundation" 1>&6
  3643 	    if test $tcl_corefoundation = yes; then
  3644 		echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
  3645 echo "configure:3646: checking for CoreFoundation.framework" >&5
  3646 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then
  3647   echo $ac_n "(cached) $ac_c" 1>&6
  3648 else
  3649   
  3650 		    hold_libs=$LIBS; hold_cflags=$CFLAGS
  3651 		    if test "$fat_32_64" = yes; then
  3652 			# On Tiger there is no 64-bit CF, so remove 64-bit archs
  3653 			# from CFLAGS while testing for presence of CF.
  3654 			# 64-bit CF is disabled in tclUnixPort.h if necessary.
  3655 			CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
  3656 		    fi
  3657 		    LIBS="$LIBS -framework CoreFoundation"
  3658 		    cat > conftest.$ac_ext <<EOF
  3659 #line 3660 "configure"
  3660 #include "confdefs.h"
  3661 #include <CoreFoundation/CoreFoundation.h>
  3662 int main() {
  3663 CFBundleRef b = CFBundleGetMainBundle();
  3664 ; return 0; }
  3665 EOF
  3666 if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3667   rm -rf conftest*
  3668   tcl_cv_lib_corefoundation=yes
  3669 else
  3670   echo "configure: failed program was:" >&5
  3671   cat conftest.$ac_ext >&5
  3672   rm -rf conftest*
  3673   tcl_cv_lib_corefoundation=no
  3674 fi
  3675 rm -f conftest*
  3676 		    LIBS=$hold_libs; CFLAGS=$hold_cflags
  3677 fi
  3678 
  3679 echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
  3680 		if test $tcl_cv_lib_corefoundation = yes; then
  3681 		    LIBS="$LIBS -framework CoreFoundation"
  3682 		    cat >> confdefs.h <<\EOF
  3683 #define HAVE_COREFOUNDATION 1
  3684 EOF
  3685 
  3686 		else
  3687 		    tcl_corefoundation=no
  3688 		fi
  3689 		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
  3690 		    echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6
  3691 echo "configure:3692: checking for 64-bit CoreFoundation" >&5
  3692 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then
  3693   echo $ac_n "(cached) $ac_c" 1>&6
  3694 else
  3695   
  3696 			hold_cflags=$CFLAGS
  3697 			CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`"
  3698 			cat > conftest.$ac_ext <<EOF
  3699 #line 3700 "configure"
  3700 #include "confdefs.h"
  3701 #include <CoreFoundation/CoreFoundation.h>
  3702 int main() {
  3703 CFBundleRef b = CFBundleGetMainBundle();
  3704 ; return 0; }
  3705 EOF
  3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3707   rm -rf conftest*
  3708   tcl_cv_lib_corefoundation_64=yes
  3709 else
  3710   echo "configure: failed program was:" >&5
  3711   cat conftest.$ac_ext >&5
  3712   rm -rf conftest*
  3713   tcl_cv_lib_corefoundation_64=no
  3714 fi
  3715 rm -f conftest*
  3716 			CFLAGS=$hold_cflags
  3717 fi
  3718 
  3719 echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6
  3720 		    if test $tcl_cv_lib_corefoundation_64 = no; then
  3721 			cat >> confdefs.h <<\EOF
  3722 #define NO_COREFOUNDATION_64 1
  3723 EOF
  3724 
  3725 		    fi
  3726 		fi
  3727 	    fi
  3728 	    cat >> confdefs.h <<\EOF
  3729 #define MAC_OSX_TCL 1
  3730 EOF
  3731 
  3732 	    ;;
  3733 	NEXTSTEP-*)
  3734 	    SHLIB_CFLAGS=""
  3735 	    SHLIB_LD="cc -nostdlib -r"
  3736 	    SHLIB_LD_LIBS=""
  3737 	    SHLIB_SUFFIX=".so"
  3738 	    DL_OBJS="tclLoadNext.o"
  3739 	    DL_LIBS=""
  3740 	    CC_SEARCH_FLAGS=""
  3741 	    LD_SEARCH_FLAGS=""
  3742 	    ;;
  3743 	OS/390-*)
  3744 	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
  3745 	    cat >> confdefs.h <<\EOF
  3746 #define _OE_SOCKETS 1
  3747 EOF
  3748 	# needed in sys/socket.h
  3749 	    ;;      
  3750 	OSF1-1.0|OSF1-1.1|OSF1-1.2)
  3751 	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  3752 	    SHLIB_CFLAGS=""
  3753 	    # Hack: make package name same as library name
  3754 	    SHLIB_LD='ld -R -export :'
  3755 	    SHLIB_LD_LIBS=""
  3756 	    SHLIB_SUFFIX=".so"
  3757 	    DL_OBJS="tclLoadOSF.o"
  3758 	    DL_LIBS=""
  3759 	    CC_SEARCH_FLAGS=""
  3760 	    LD_SEARCH_FLAGS=""
  3761 	    ;;
  3762 	OSF1-1.*)
  3763 	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  3764 	    SHLIB_CFLAGS="-fPIC"
  3765 	    if test "$SHARED_BUILD" = "1" ; then
  3766 	        SHLIB_LD="ld -shared"
  3767 	    else
  3768 	        SHLIB_LD="ld -non_shared"
  3769 	    fi
  3770 	    SHLIB_LD_LIBS=""
  3771 	    SHLIB_SUFFIX=".so"
  3772 	    DL_OBJS="tclLoadDl.o"
  3773 	    DL_LIBS=""
  3774 	    CC_SEARCH_FLAGS=""
  3775 	    LD_SEARCH_FLAGS=""
  3776 	    ;;
  3777 	OSF1-V*)
  3778 	    # Digital OSF/1
  3779 	    SHLIB_CFLAGS=""
  3780 	    if test "$SHARED_BUILD" = "1" ; then
  3781 	        SHLIB_LD='ld -shared -expect_unresolved "*"'
  3782 	    else
  3783 	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
  3784 	    fi
  3785 	    SHLIB_LD_LIBS=""
  3786 	    SHLIB_SUFFIX=".so"
  3787 	    DL_OBJS="tclLoadDl.o"
  3788 	    DL_LIBS=""
  3789 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  3790 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  3791 	    if test "$GCC" = "yes" ; then
  3792 		CFLAGS="$CFLAGS -mieee"
  3793             else
  3794 		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
  3795 	    fi
  3796 	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
  3797 	    if test "${TCL_THREADS}" = "1" ; then
  3798 		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
  3799 		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
  3800 		LIBS=`echo $LIBS | sed s/-lpthreads//`
  3801 		if test "$GCC" = "yes" ; then
  3802 		    LIBS="$LIBS -lpthread -lmach -lexc"
  3803 		else
  3804 		    CFLAGS="$CFLAGS -pthread"
  3805 		    LDFLAGS="$LDFLAGS -pthread"
  3806 		fi
  3807 	    fi
  3808 
  3809 	    ;;
  3810 	QNX-6*)
  3811 	    # QNX RTP
  3812 	    # This may work for all QNX, but it was only reported for v6.
  3813 	    SHLIB_CFLAGS="-fPIC"
  3814 	    SHLIB_LD="ld -Bshareable -x"
  3815 	    SHLIB_LD_LIBS=""
  3816 	    SHLIB_SUFFIX=".so"
  3817 	    DL_OBJS="tclLoadDl.o"
  3818 	    # dlopen is in -lc on QNX
  3819 	    DL_LIBS=""
  3820 	    CC_SEARCH_FLAGS=""
  3821 	    LD_SEARCH_FLAGS=""
  3822 	    ;;
  3823 	RISCos-*)
  3824 	    SHLIB_CFLAGS="-G 0"
  3825 	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3826 	    SHLIB_LD_LIBS='${LIBS}'
  3827 	    SHLIB_SUFFIX=".a"
  3828 	    DL_OBJS="tclLoadAout.o"
  3829 	    DL_LIBS=""
  3830 	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  3831 	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  3832 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3833 	    ;;
  3834 	SCO_SV-3.2*)
  3835 	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  3836 	    # this test works, since "uname -s" was non-standard in 3.2.4 and
  3837 	    # below.
  3838 	    if test "$GCC" = "yes" ; then
  3839 	    	SHLIB_CFLAGS="-fPIC -melf"
  3840 	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
  3841 	    else
  3842 	    	SHLIB_CFLAGS="-Kpic -belf"
  3843 	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
  3844 	    fi
  3845 	    SHLIB_LD="ld -G"
  3846 	    SHLIB_LD_LIBS=""
  3847 	    SHLIB_SUFFIX=".so"
  3848 	    DL_OBJS="tclLoadDl.o"
  3849 	    DL_LIBS=""
  3850 	    CC_SEARCH_FLAGS=""
  3851 	    LD_SEARCH_FLAGS=""
  3852 	    ;;
  3853 	SINIX*5.4*)
  3854 	    SHLIB_CFLAGS="-K PIC"
  3855 	    SHLIB_LD="cc -G"
  3856 	    SHLIB_LD_LIBS=""
  3857 	    SHLIB_SUFFIX=".so"
  3858 	    DL_OBJS="tclLoadDl.o"
  3859 	    DL_LIBS="-ldl"
  3860 	    CC_SEARCH_FLAGS=""
  3861 	    LD_SEARCH_FLAGS=""
  3862 	    ;;
  3863 	SunOS-4*)
  3864 	    SHLIB_CFLAGS="-PIC"
  3865 	    SHLIB_LD="ld"
  3866 	    SHLIB_LD_LIBS=""
  3867 	    SHLIB_SUFFIX=".so"
  3868 	    DL_OBJS="tclLoadDl.o"
  3869 	    DL_LIBS="-ldl"
  3870 	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  3871 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3872 
  3873 	    # SunOS can't handle version numbers with dots in them in library
  3874 	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
  3875 	    # requires an extra version number at the end of .so file names.
  3876 	    # So, the library has to have a name like libtcl75.so.1.0
  3877 
  3878 	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  3879 	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  3880 	    TCL_LIB_VERSIONS_OK=nodots
  3881 	    ;;
  3882 	SunOS-5.[0-6])
  3883 	    # Careful to not let 5.10+ fall into this case
  3884 
  3885 	    # Note: If _REENTRANT isn't defined, then Solaris
  3886 	    # won't define thread-safe library routines.
  3887 
  3888 	    cat >> confdefs.h <<\EOF
  3889 #define _REENTRANT 1
  3890 EOF
  3891 
  3892 	    cat >> confdefs.h <<\EOF
  3893 #define _POSIX_PTHREAD_SEMANTICS 1
  3894 EOF
  3895 
  3896 
  3897 	    SHLIB_CFLAGS="-KPIC"
  3898 
  3899 	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  3900 	    # symbols when dynamically loaded into tclsh.
  3901 
  3902 	    SHLIB_LD_LIBS='${LIBS}'
  3903 	    SHLIB_SUFFIX=".so"
  3904 	    DL_OBJS="tclLoadDl.o"
  3905 	    DL_LIBS="-ldl"
  3906 	    if test "$GCC" = "yes" ; then
  3907 		SHLIB_LD="$CC -shared"
  3908 		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  3909 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3910 	    else
  3911 		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  3912 		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  3913 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3914 	    fi
  3915 	    ;;
  3916 	SunOS-5*)
  3917 	    # Note: If _REENTRANT isn't defined, then Solaris
  3918 	    # won't define thread-safe library routines.
  3919 
  3920 	    cat >> confdefs.h <<\EOF
  3921 #define _REENTRANT 1
  3922 EOF
  3923 
  3924 	    cat >> confdefs.h <<\EOF
  3925 #define _POSIX_PTHREAD_SEMANTICS 1
  3926 EOF
  3927 
  3928 
  3929 	    SHLIB_CFLAGS="-KPIC"
  3930 
  3931 	    # Check to enable 64-bit flags for compiler/linker
  3932 	    if test "$do64bit" = "yes" ; then
  3933 		arch=`isainfo`
  3934 		if test "$arch" = "sparcv9 sparc" ; then
  3935 			if test "$GCC" = "yes" ; then
  3936 			    if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
  3937 				echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2
  3938 			    else
  3939 				do64bit_ok=yes
  3940 				CFLAGS="$CFLAGS -m64 -mcpu=v9"
  3941 				LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
  3942 				SHLIB_CFLAGS="-fPIC"
  3943 			    fi
  3944 			else
  3945 			    do64bit_ok=yes
  3946 			    if test "$do64bitVIS" = "yes" ; then
  3947 				CFLAGS="$CFLAGS -xarch=v9a"
  3948 			    	LDFLAGS="$LDFLAGS -xarch=v9a"
  3949 			    else
  3950 				CFLAGS="$CFLAGS -xarch=v9"
  3951 			    	LDFLAGS="$LDFLAGS -xarch=v9"
  3952 			    fi
  3953 			    # Solaris 64 uses this as well
  3954 			    #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
  3955 			fi
  3956 		elif test "$arch" = "amd64 i386" ; then
  3957 		    if test "$GCC" = "yes" ; then
  3958 			echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  3959 		    else
  3960 			do64bit_ok=yes
  3961 			CFLAGS="$CFLAGS -xarch=amd64"
  3962 			LDFLAGS="$LDFLAGS -xarch=amd64"
  3963 		    fi
  3964 		else
  3965 		    echo "configure: warning: 64bit mode not supported for $arch" 1>&2
  3966 		fi
  3967 	    fi
  3968 	    
  3969 	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  3970 	    # symbols when dynamically loaded into tclsh.
  3971 
  3972 	    SHLIB_LD_LIBS='${LIBS}'
  3973 	    SHLIB_SUFFIX=".so"
  3974 	    DL_OBJS="tclLoadDl.o"
  3975 	    DL_LIBS="-ldl"
  3976 	    if test "$GCC" = "yes" ; then
  3977 		SHLIB_LD="$CC -shared"
  3978 		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  3979 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  3980 		if test "$do64bit_ok" = "yes" ; then
  3981 		    # We need to specify -static-libgcc or we need to
  3982 		    # add the path to the sparv9 libgcc.
  3983 		    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
  3984 		    # for finding sparcv9 libgcc, get the regular libgcc
  3985 		    # path, remove so name and append 'sparcv9'
  3986 		    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
  3987 		    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
  3988 		fi
  3989 	    else
  3990 		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  3991 		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  3992 		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  3993 	    fi
  3994 	    ;;
  3995 	ULTRIX-4.*)
  3996 	    SHLIB_CFLAGS="-G 0"
  3997 	    SHLIB_SUFFIX=".a"
  3998 	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3999 	    SHLIB_LD_LIBS='${LIBS}'
  4000 	    DL_OBJS="tclLoadAout.o"
  4001 	    DL_LIBS=""
  4002 	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  4003 	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  4004 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  4005 	    if test "$GCC" != "yes" ; then
  4006 		CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
  4007 	    fi
  4008 	    ;;
  4009 	UNIX_SV* | UnixWare-5*)
  4010 	    SHLIB_CFLAGS="-KPIC"
  4011 	    SHLIB_LD="cc -G"
  4012 	    SHLIB_LD_LIBS=""
  4013 	    SHLIB_SUFFIX=".so"
  4014 	    DL_OBJS="tclLoadDl.o"
  4015 	    DL_LIBS="-ldl"
  4016 	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
  4017 	    # that don't grok the -Bexport option.  Test that it does.
  4018 	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
  4019 echo "configure:4020: checking for ld accepts -Bexport flag" >&5
  4020 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then
  4021   echo $ac_n "(cached) $ac_c" 1>&6
  4022 else
  4023   
  4024 		hold_ldflags=$LDFLAGS
  4025 		LDFLAGS="$LDFLAGS -Wl,-Bexport"
  4026 		cat > conftest.$ac_ext <<EOF
  4027 #line 4028 "configure"
  4028 #include "confdefs.h"
  4029 
  4030 int main() {
  4031 int i;
  4032 ; return 0; }
  4033 EOF
  4034 if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4035   rm -rf conftest*
  4036   tcl_cv_ld_Bexport=yes
  4037 else
  4038   echo "configure: failed program was:" >&5
  4039   cat conftest.$ac_ext >&5
  4040   rm -rf conftest*
  4041   tcl_cv_ld_Bexport=no
  4042 fi
  4043 rm -f conftest*
  4044 	        LDFLAGS=$hold_ldflags
  4045 fi
  4046 
  4047 echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6
  4048 	    if test $tcl_cv_ld_Bexport = yes; then
  4049 		LDFLAGS="$LDFLAGS -Wl,-Bexport"
  4050 	    fi
  4051 	    CC_SEARCH_FLAGS=""
  4052 	    LD_SEARCH_FLAGS=""
  4053 	    ;;
  4054     esac
  4055 
  4056     if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
  4057 	echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2
  4058     fi
  4059 
  4060     
  4061     
  4062 
  4063     # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
  4064     # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
  4065     # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
  4066     # to determine which of several header files defines the a.out file
  4067     # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
  4068     # support only a file format that is more or less version-7-compatible. 
  4069     # In particular,
  4070     #	- a.out files must begin with `struct exec'.
  4071     #	- the N_TXTOFF on the `struct exec' must compute the seek address
  4072     #	  of the text segment
  4073     #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
  4074     #	  and a_entry fields.
  4075     # The following compilation should succeed if and only if either sys/exec.h
  4076     # or a.out.h is usable for the purpose.
  4077     #
  4078     # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
  4079     # `struct exec' includes a second header that contains information that
  4080     # duplicates the v7 fields that are needed.
  4081 
  4082     if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
  4083 	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
  4084 echo "configure:4085: checking sys/exec.h" >&5
  4085 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then
  4086   echo $ac_n "(cached) $ac_c" 1>&6
  4087 else
  4088   
  4089 	cat > conftest.$ac_ext <<EOF
  4090 #line 4091 "configure"
  4091 #include "confdefs.h"
  4092 #include <sys/exec.h>
  4093 int main() {
  4094 
  4095 	    struct exec foo;
  4096 	    unsigned long seek;
  4097 	    int flag;
  4098 #if defined(__mips) || defined(mips)
  4099 	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  4100 #else
  4101 	    seek = N_TXTOFF (foo);
  4102 #endif
  4103 	    flag = (foo.a_magic == OMAGIC);
  4104 	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  4105     
  4106 ; return 0; }
  4107 EOF
  4108 if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4109   rm -rf conftest*
  4110   tcl_cv_sysexec_h=usable
  4111 else
  4112   echo "configure: failed program was:" >&5
  4113   cat conftest.$ac_ext >&5
  4114   rm -rf conftest*
  4115   tcl_cv_sysexec_h=unusable
  4116 fi
  4117 rm -f conftest*
  4118 fi
  4119 
  4120 echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
  4121 	if test $tcl_cv_sysexec_h = usable; then
  4122 	    cat >> confdefs.h <<\EOF
  4123 #define USE_SYS_EXEC_H 1
  4124 EOF
  4125 
  4126 	else
  4127 	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
  4128 echo "configure:4129: checking a.out.h" >&5
  4129 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then
  4130   echo $ac_n "(cached) $ac_c" 1>&6
  4131 else
  4132   
  4133 	    cat > conftest.$ac_ext <<EOF
  4134 #line 4135 "configure"
  4135 #include "confdefs.h"
  4136 #include <a.out.h>
  4137 int main() {
  4138 
  4139 		struct exec foo;
  4140 		unsigned long seek;
  4141 		int flag;
  4142 #if defined(__mips) || defined(mips)
  4143 		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  4144 #else
  4145 		seek = N_TXTOFF (foo);
  4146 #endif
  4147 		flag = (foo.a_magic == OMAGIC);
  4148 		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  4149 	    
  4150 ; return 0; }
  4151 EOF
  4152 if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4153   rm -rf conftest*
  4154   tcl_cv_aout_h=usable
  4155 else
  4156   echo "configure: failed program was:" >&5
  4157   cat conftest.$ac_ext >&5
  4158   rm -rf conftest*
  4159   tcl_cv_aout_h=unusable
  4160 fi
  4161 rm -f conftest*
  4162 fi
  4163 
  4164 echo "$ac_t""$tcl_cv_aout_h" 1>&6
  4165 	    if test $tcl_cv_aout_h = usable; then
  4166 		cat >> confdefs.h <<\EOF
  4167 #define USE_A_OUT_H 1
  4168 EOF
  4169 
  4170 	    else
  4171 		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
  4172 echo "configure:4173: checking sys/exec_aout.h" >&5
  4173 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then
  4174   echo $ac_n "(cached) $ac_c" 1>&6
  4175 else
  4176   
  4177 		cat > conftest.$ac_ext <<EOF
  4178 #line 4179 "configure"
  4179 #include "confdefs.h"
  4180 #include <sys/exec_aout.h>
  4181 int main() {
  4182 
  4183 		    struct exec foo;
  4184 		    unsigned long seek;
  4185 		    int flag;
  4186 #if defined(__mips) || defined(mips)
  4187 		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  4188 #else
  4189 		    seek = N_TXTOFF (foo);
  4190 #endif
  4191 		    flag = (foo.a_midmag == OMAGIC);
  4192 		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  4193 		
  4194 ; return 0; }
  4195 EOF
  4196 if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4197   rm -rf conftest*
  4198   tcl_cv_sysexecaout_h=usable
  4199 else
  4200   echo "configure: failed program was:" >&5
  4201   cat conftest.$ac_ext >&5
  4202   rm -rf conftest*
  4203   tcl_cv_sysexecaout_h=unusable
  4204 fi
  4205 rm -f conftest*
  4206 fi
  4207 
  4208 echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6
  4209 		if test $tcl_cv_sysexecaout_h = usable; then
  4210 		    cat >> confdefs.h <<\EOF
  4211 #define USE_SYS_EXEC_AOUT_H 1
  4212 EOF
  4213 
  4214 		else
  4215 		    DL_OBJS=""
  4216 		fi
  4217 	    fi
  4218 	fi
  4219     fi
  4220 
  4221     # Step 5: disable dynamic loading if requested via a command-line switch.
  4222 
  4223     # Check whether --enable-load or --disable-load was given.
  4224 if test "${enable_load+set}" = set; then
  4225   enableval="$enable_load"
  4226   tcl_ok=$enableval
  4227 else
  4228   tcl_ok=yes
  4229 fi
  4230 
  4231     if test "$tcl_ok" = "no"; then
  4232 	DL_OBJS=""
  4233     fi
  4234 
  4235     if test "x$DL_OBJS" != "x" ; then
  4236 	BUILD_DLTEST="\$(DLTEST_TARGETS)"
  4237     else
  4238 	echo "Can't figure out how to do dynamic loading or shared libraries"
  4239 	echo "on this system."
  4240 	SHLIB_CFLAGS=""
  4241 	SHLIB_LD=""
  4242 	SHLIB_SUFFIX=""
  4243 	DL_OBJS="tclLoadNone.o"
  4244 	DL_LIBS=""
  4245 	LDFLAGS="$LDFLAGS_ORIG"
  4246 	CC_SEARCH_FLAGS=""
  4247 	LD_SEARCH_FLAGS=""
  4248 	BUILD_DLTEST=""
  4249     fi
  4250 
  4251     # If we're running gcc, then change the C flags for compiling shared
  4252     # libraries to the right flags for gcc, instead of those for the
  4253     # standard manufacturer compiler.
  4254 
  4255     if test "$DL_OBJS" != "tclLoadNone.o" ; then
  4256 	if test "$GCC" = "yes" ; then
  4257 	    case $system in
  4258 		AIX-*)
  4259 		    ;;
  4260 		BSD/OS*)
  4261 		    ;;
  4262 		IRIX*)
  4263 		    ;;
  4264 		NetBSD-*|FreeBSD-*|OpenBSD-*)
  4265 		    ;;
  4266 		Darwin-*)
  4267 		    ;;
  4268 		RISCos-*)
  4269 		    ;;
  4270 		SCO_SV-3.2*)
  4271 		    ;;
  4272 		ULTRIX-4.*)
  4273 		    ;;
  4274 		*)
  4275 		    SHLIB_CFLAGS="-fPIC"
  4276 		    ;;
  4277 	    esac
  4278 	fi
  4279     fi
  4280 
  4281     if test "$SHARED_LIB_SUFFIX" = "" ; then
  4282 	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
  4283     fi
  4284     if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  4285 	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
  4286     fi
  4287 
  4288     if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
  4289         LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  4290         MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
  4291         INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  4292     else
  4293         LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  4294 
  4295         if test "$RANLIB" = "" ; then
  4296             MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
  4297             INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  4298         else
  4299             MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
  4300             INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
  4301         fi
  4302 
  4303     fi
  4304 
  4305 
  4306     # Stub lib does not depend on shared/static configuration
  4307     if test "$RANLIB" = "" ; then
  4308         MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
  4309         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
  4310     else
  4311         MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
  4312         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
  4313     fi
  4314 
  4315 
  4316     
  4317 
  4318     
  4319     
  4320     
  4321     
  4322     
  4323     
  4324     
  4325 
  4326     
  4327     
  4328     
  4329     
  4330     
  4331 
  4332     
  4333     
  4334     
  4335     
  4336     
  4337     
  4338     
  4339 
  4340     
  4341     
  4342     
  4343     
  4344     
  4345 
  4346 
  4347 
  4348     echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
  4349 echo "configure:4350: checking for build with symbols" >&5
  4350     # Check whether --enable-symbols or --disable-symbols was given.
  4351 if test "${enable_symbols+set}" = set; then
  4352   enableval="$enable_symbols"
  4353   tcl_ok=$enableval
  4354 else
  4355   tcl_ok=no
  4356 fi
  4357 
  4358 # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
  4359     if test "$tcl_ok" = "no"; then
  4360 	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
  4361 	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
  4362 	DBGX=""
  4363 	echo "$ac_t""no" 1>&6
  4364     else
  4365 	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
  4366 	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
  4367 	DBGX=g
  4368 	if test "$tcl_ok" = "yes"; then
  4369 	    echo "$ac_t""yes (standard debugging)" 1>&6
  4370 	fi
  4371     fi
  4372     
  4373     
  4374 
  4375     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
  4376 	cat >> confdefs.h <<\EOF
  4377 #define TCL_MEM_DEBUG 1
  4378 EOF
  4379 
  4380     fi
  4381 
  4382     if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
  4383 	cat >> confdefs.h <<\EOF
  4384 #define TCL_COMPILE_DEBUG 1
  4385 EOF
  4386 
  4387 	cat >> confdefs.h <<\EOF
  4388 #define TCL_COMPILE_STATS 1
  4389 EOF
  4390 
  4391     fi
  4392 
  4393     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  4394 	if test "$tcl_ok" = "all"; then
  4395 	    echo "$ac_t""enabled symbols mem compile debugging" 1>&6
  4396 	else
  4397 	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
  4398 	fi
  4399     fi
  4400 
  4401 
  4402 TCL_DBGX=${DBGX}
  4403 
  4404 #--------------------------------------------------------------------
  4405 #	Detect what compiler flags to set for 64-bit support.
  4406 #--------------------------------------------------------------------
  4407 
  4408 
  4409     echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
  4410 echo "configure:4411: checking for required early compiler flags" >&5
  4411     tcl_flags=""
  4412     
  4413     if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
  4414   echo $ac_n "(cached) $ac_c" 1>&6
  4415 else
  4416   cat > conftest.$ac_ext <<EOF
  4417 #line 4418 "configure"
  4418 #include "confdefs.h"
  4419 #include <stdlib.h>
  4420 int main() {
  4421 char *p = (char *)strtoll; char *q = (char *)strtoull;
  4422 ; return 0; }
  4423 EOF
  4424 if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4425   rm -rf conftest*
  4426   tcl_cv_flag__isoc99_source=no
  4427 else
  4428   echo "configure: failed program was:" >&5
  4429   cat conftest.$ac_ext >&5
  4430   rm -rf conftest*
  4431   cat > conftest.$ac_ext <<EOF
  4432 #line 4433 "configure"
  4433 #include "confdefs.h"
  4434 #define _ISOC99_SOURCE 1
  4435 #include <stdlib.h>
  4436 int main() {
  4437 char *p = (char *)strtoll; char *q = (char *)strtoull;
  4438 ; return 0; }
  4439 EOF
  4440 if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4441   rm -rf conftest*
  4442   tcl_cv_flag__isoc99_source=yes
  4443 else
  4444   echo "configure: failed program was:" >&5
  4445   cat conftest.$ac_ext >&5
  4446   rm -rf conftest*
  4447   tcl_cv_flag__isoc99_source=no
  4448 fi
  4449 rm -f conftest*
  4450 fi
  4451 rm -f conftest*
  4452 fi
  4453 
  4454     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
  4455 	cat >> confdefs.h <<\EOF
  4456 #define _ISOC99_SOURCE 1
  4457 EOF
  4458 
  4459 	tcl_flags="$tcl_flags _ISOC99_SOURCE"
  4460     fi
  4461 
  4462     
  4463     if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
  4464   echo $ac_n "(cached) $ac_c" 1>&6
  4465 else
  4466   cat > conftest.$ac_ext <<EOF
  4467 #line 4468 "configure"
  4468 #include "confdefs.h"
  4469 #include <sys/stat.h>
  4470 int main() {
  4471 struct stat64 buf; int i = stat64("/", &buf);
  4472 ; return 0; }
  4473 EOF
  4474 if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4475   rm -rf conftest*
  4476   tcl_cv_flag__largefile64_source=no
  4477 else
  4478   echo "configure: failed program was:" >&5
  4479   cat conftest.$ac_ext >&5
  4480   rm -rf conftest*
  4481   cat > conftest.$ac_ext <<EOF
  4482 #line 4483 "configure"
  4483 #include "confdefs.h"
  4484 #define _LARGEFILE64_SOURCE 1
  4485 #include <sys/stat.h>
  4486 int main() {
  4487 struct stat64 buf; int i = stat64("/", &buf);
  4488 ; return 0; }
  4489 EOF
  4490 if { (eval echo configure:4491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4491   rm -rf conftest*
  4492   tcl_cv_flag__largefile64_source=yes
  4493 else
  4494   echo "configure: failed program was:" >&5
  4495   cat conftest.$ac_ext >&5
  4496   rm -rf conftest*
  4497   tcl_cv_flag__largefile64_source=no
  4498 fi
  4499 rm -f conftest*
  4500 fi
  4501 rm -f conftest*
  4502 fi
  4503 
  4504     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
  4505 	cat >> confdefs.h <<\EOF
  4506 #define _LARGEFILE64_SOURCE 1
  4507 EOF
  4508 
  4509 	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
  4510     fi
  4511 
  4512     
  4513     if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
  4514   echo $ac_n "(cached) $ac_c" 1>&6
  4515 else
  4516   cat > conftest.$ac_ext <<EOF
  4517 #line 4518 "configure"
  4518 #include "confdefs.h"
  4519 #include <sys/stat.h>
  4520 int main() {
  4521 char *p = (char *)open64;
  4522 ; return 0; }
  4523 EOF
  4524 if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4525   rm -rf conftest*
  4526   tcl_cv_flag__largefile_source64=no
  4527 else
  4528   echo "configure: failed program was:" >&5
  4529   cat conftest.$ac_ext >&5
  4530   rm -rf conftest*
  4531   cat > conftest.$ac_ext <<EOF
  4532 #line 4533 "configure"
  4533 #include "confdefs.h"
  4534 #define _LARGEFILE_SOURCE64 1
  4535 #include <sys/stat.h>
  4536 int main() {
  4537 char *p = (char *)open64;
  4538 ; return 0; }
  4539 EOF
  4540 if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4541   rm -rf conftest*
  4542   tcl_cv_flag__largefile_source64=yes
  4543 else
  4544   echo "configure: failed program was:" >&5
  4545   cat conftest.$ac_ext >&5
  4546   rm -rf conftest*
  4547   tcl_cv_flag__largefile_source64=no
  4548 fi
  4549 rm -f conftest*
  4550 fi
  4551 rm -f conftest*
  4552 fi
  4553 
  4554     if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
  4555 	cat >> confdefs.h <<\EOF
  4556 #define _LARGEFILE_SOURCE64 1
  4557 EOF
  4558 
  4559 	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
  4560     fi
  4561 
  4562     if test "x${tcl_flags}" = "x" ; then
  4563 	echo "$ac_t""none" 1>&6
  4564     else
  4565 	echo "$ac_t""${tcl_flags}" 1>&6
  4566     fi
  4567 
  4568 
  4569 
  4570     echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
  4571 echo "configure:4572: checking for 64-bit integer type" >&5
  4572     if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
  4573   echo $ac_n "(cached) $ac_c" 1>&6
  4574 else
  4575   
  4576 	tcl_cv_type_64bit=none
  4577 	# See if the compiler knows natively about __int64
  4578 	cat > conftest.$ac_ext <<EOF
  4579 #line 4580 "configure"
  4580 #include "confdefs.h"
  4581 
  4582 int main() {
  4583 __int64 value = (__int64) 0;
  4584 ; return 0; }
  4585 EOF
  4586 if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4587   rm -rf conftest*
  4588   tcl_type_64bit=__int64
  4589 else
  4590   echo "configure: failed program was:" >&5
  4591   cat conftest.$ac_ext >&5
  4592   rm -rf conftest*
  4593   tcl_type_64bit="long long"
  4594 fi
  4595 rm -f conftest*
  4596 	# See if we should use long anyway  Note that we substitute in the
  4597 	# type that is our current guess for a 64-bit type inside this check
  4598 	# program, so it should be modified only carefully...
  4599         cat > conftest.$ac_ext <<EOF
  4600 #line 4601 "configure"
  4601 #include "confdefs.h"
  4602 
  4603 int main() {
  4604 switch (0) { 
  4605             case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; 
  4606         }
  4607 ; return 0; }
  4608 EOF
  4609 if { (eval echo configure:4610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4610   rm -rf conftest*
  4611   tcl_cv_type_64bit=${tcl_type_64bit}
  4612 else
  4613   echo "configure: failed program was:" >&5
  4614   cat conftest.$ac_ext >&5
  4615 fi
  4616 rm -f conftest*
  4617 fi
  4618 
  4619     if test "${tcl_cv_type_64bit}" = none ; then
  4620 	cat >> confdefs.h <<\EOF
  4621 #define TCL_WIDE_INT_IS_LONG 1
  4622 EOF
  4623 
  4624 	echo "$ac_t""using long" 1>&6
  4625     else
  4626 	cat >> confdefs.h <<EOF
  4627 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
  4628 EOF
  4629 
  4630 	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
  4631 
  4632 	# Now check for auxiliary declarations
  4633 	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
  4634 echo "configure:4635: checking for struct dirent64" >&5
  4635 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
  4636   echo $ac_n "(cached) $ac_c" 1>&6
  4637 else
  4638   
  4639 	    cat > conftest.$ac_ext <<EOF
  4640 #line 4641 "configure"
  4641 #include "confdefs.h"
  4642 #include <sys/types.h>
  4643 #include <sys/dirent.h>
  4644 int main() {
  4645 struct dirent64 p;
  4646 ; return 0; }
  4647 EOF
  4648 if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4649   rm -rf conftest*
  4650   tcl_cv_struct_dirent64=yes
  4651 else
  4652   echo "configure: failed program was:" >&5
  4653   cat conftest.$ac_ext >&5
  4654   rm -rf conftest*
  4655   tcl_cv_struct_dirent64=no
  4656 fi
  4657 rm -f conftest*
  4658 fi
  4659 
  4660 echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
  4661 	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
  4662 	    cat >> confdefs.h <<\EOF
  4663 #define HAVE_STRUCT_DIRENT64 1
  4664 EOF
  4665 
  4666 	fi
  4667 
  4668 	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
  4669 echo "configure:4670: checking for struct stat64" >&5
  4670 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
  4671   echo $ac_n "(cached) $ac_c" 1>&6
  4672 else
  4673   
  4674 	    cat > conftest.$ac_ext <<EOF
  4675 #line 4676 "configure"
  4676 #include "confdefs.h"
  4677 #include <sys/stat.h>
  4678 int main() {
  4679 struct stat64 p;
  4680 
  4681 ; return 0; }
  4682 EOF
  4683 if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4684   rm -rf conftest*
  4685   tcl_cv_struct_stat64=yes
  4686 else
  4687   echo "configure: failed program was:" >&5
  4688   cat conftest.$ac_ext >&5
  4689   rm -rf conftest*
  4690   tcl_cv_struct_stat64=no
  4691 fi
  4692 rm -f conftest*
  4693 fi
  4694 
  4695 echo "$ac_t""$tcl_cv_struct_stat64" 1>&6
  4696 	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
  4697 	    cat >> confdefs.h <<\EOF
  4698 #define HAVE_STRUCT_STAT64 1
  4699 EOF
  4700 
  4701 	fi
  4702 
  4703 	for ac_func in open64 lseek64
  4704 do
  4705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4706 echo "configure:4707: checking for $ac_func" >&5
  4707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4708   echo $ac_n "(cached) $ac_c" 1>&6
  4709 else
  4710   cat > conftest.$ac_ext <<EOF
  4711 #line 4712 "configure"
  4712 #include "confdefs.h"
  4713 /* System header to define __stub macros and hopefully few prototypes,
  4714     which can conflict with char $ac_func(); below.  */
  4715 #include <assert.h>
  4716 /* Override any gcc2 internal prototype to avoid an error.  */
  4717 /* We use char because int might match the return type of a gcc2
  4718     builtin and then its argument prototype would still apply.  */
  4719 char $ac_func();
  4720 
  4721 int main() {
  4722 
  4723 /* The GNU C library defines this for functions which it implements
  4724     to always fail with ENOSYS.  Some functions are actually named
  4725     something starting with __ and the normal name is an alias.  */
  4726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4727 choke me
  4728 #else
  4729 $ac_func();
  4730 #endif
  4731 
  4732 ; return 0; }
  4733 EOF
  4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4735   rm -rf conftest*
  4736   eval "ac_cv_func_$ac_func=yes"
  4737 else
  4738   echo "configure: failed program was:" >&5
  4739   cat conftest.$ac_ext >&5
  4740   rm -rf conftest*
  4741   eval "ac_cv_func_$ac_func=no"
  4742 fi
  4743 rm -f conftest*
  4744 fi
  4745 
  4746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4747   echo "$ac_t""yes" 1>&6
  4748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4749   cat >> confdefs.h <<EOF
  4750 #define $ac_tr_func 1
  4751 EOF
  4752  
  4753 else
  4754   echo "$ac_t""no" 1>&6
  4755 fi
  4756 done
  4757 
  4758 	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
  4759 echo "configure:4760: checking for off64_t" >&5
  4760 	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
  4761   echo $ac_n "(cached) $ac_c" 1>&6
  4762 else
  4763   
  4764 	    cat > conftest.$ac_ext <<EOF
  4765 #line 4766 "configure"
  4766 #include "confdefs.h"
  4767 #include <sys/types.h>
  4768 int main() {
  4769 off64_t offset;
  4770 
  4771 ; return 0; }
  4772 EOF
  4773 if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4774   rm -rf conftest*
  4775   tcl_cv_type_off64_t=yes
  4776 else
  4777   echo "configure: failed program was:" >&5
  4778   cat conftest.$ac_ext >&5
  4779   rm -rf conftest*
  4780   tcl_cv_type_off64_t=no
  4781 fi
  4782 rm -f conftest*
  4783 fi
  4784 
  4785 			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
  4786 	        test "x${ac_cv_func_lseek64}" = "xyes" && \
  4787 	        test "x${ac_cv_func_open64}" = "xyes" ; then
  4788 	    cat >> confdefs.h <<\EOF
  4789 #define HAVE_TYPE_OFF64_T 1
  4790 EOF
  4791 
  4792 	    echo "$ac_t""yes" 1>&6
  4793 	else
  4794 	    echo "$ac_t""no" 1>&6
  4795 	fi
  4796     fi
  4797 
  4798 
  4799 #--------------------------------------------------------------------
  4800 #	Check endianness because we can optimize comparisons of
  4801 #	Tcl_UniChar strings to memcmp on big-endian systems.
  4802 #--------------------------------------------------------------------
  4803 
  4804 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  4805 echo "configure:4806: checking whether byte ordering is bigendian" >&5
  4806 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  4807   echo $ac_n "(cached) $ac_c" 1>&6
  4808 else
  4809   ac_cv_c_bigendian=unknown
  4810 # See if sys/param.h defines the BYTE_ORDER macro.
  4811 cat > conftest.$ac_ext <<EOF
  4812 #line 4813 "configure"
  4813 #include "confdefs.h"
  4814 #include <sys/types.h>
  4815 #include <sys/param.h>
  4816 int main() {
  4817 
  4818 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  4819  bogus endian macros
  4820 #endif
  4821 ; return 0; }
  4822 EOF
  4823 if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4824   rm -rf conftest*
  4825   # It does; now see whether it defined to BIG_ENDIAN or not.
  4826 cat > conftest.$ac_ext <<EOF
  4827 #line 4828 "configure"
  4828 #include "confdefs.h"
  4829 #include <sys/types.h>
  4830 #include <sys/param.h>
  4831 int main() {
  4832 
  4833 #if BYTE_ORDER != BIG_ENDIAN
  4834  not big endian
  4835 #endif
  4836 ; return 0; }
  4837 EOF
  4838 if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4839   rm -rf conftest*
  4840   ac_cv_c_bigendian=yes
  4841 else
  4842   echo "configure: failed program was:" >&5
  4843   cat conftest.$ac_ext >&5
  4844   rm -rf conftest*
  4845   ac_cv_c_bigendian=no
  4846 fi
  4847 rm -f conftest*
  4848 else
  4849   echo "configure: failed program was:" >&5
  4850   cat conftest.$ac_ext >&5
  4851 fi
  4852 rm -f conftest*
  4853 if test $ac_cv_c_bigendian = unknown; then
  4854 if test "$cross_compiling" = yes; then
  4855     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  4856 else
  4857   cat > conftest.$ac_ext <<EOF
  4858 #line 4859 "configure"
  4859 #include "confdefs.h"
  4860 main () {
  4861   /* Are we little or big endian?  From Harbison&Steele.  */
  4862   union
  4863   {
  4864     long l;
  4865     char c[sizeof (long)];
  4866   } u;
  4867   u.l = 1;
  4868   exit (u.c[sizeof (long) - 1] == 1);
  4869 }
  4870 EOF
  4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4872 then
  4873   ac_cv_c_bigendian=no
  4874 else
  4875   echo "configure: failed program was:" >&5
  4876   cat conftest.$ac_ext >&5
  4877   rm -fr conftest*
  4878   ac_cv_c_bigendian=yes
  4879 fi
  4880 rm -fr conftest*
  4881 fi
  4882 
  4883 fi
  4884 fi
  4885 
  4886 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  4887 if test $ac_cv_c_bigendian = yes; then
  4888   cat >> confdefs.h <<\EOF
  4889 #define WORDS_BIGENDIAN 1
  4890 EOF
  4891 
  4892 fi
  4893 
  4894 
  4895 #--------------------------------------------------------------------
  4896 #	Supply substitutes for missing POSIX library procedures, or
  4897 #	set flags so Tcl uses alternate procedures.
  4898 #--------------------------------------------------------------------
  4899 
  4900 # Check if Posix compliant getcwd exists, if not we'll use getwd.
  4901 for ac_func in getcwd
  4902 do
  4903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4904 echo "configure:4905: checking for $ac_func" >&5
  4905 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4906   echo $ac_n "(cached) $ac_c" 1>&6
  4907 else
  4908   cat > conftest.$ac_ext <<EOF
  4909 #line 4910 "configure"
  4910 #include "confdefs.h"
  4911 /* System header to define __stub macros and hopefully few prototypes,
  4912     which can conflict with char $ac_func(); below.  */
  4913 #include <assert.h>
  4914 /* Override any gcc2 internal prototype to avoid an error.  */
  4915 /* We use char because int might match the return type of a gcc2
  4916     builtin and then its argument prototype would still apply.  */
  4917 char $ac_func();
  4918 
  4919 int main() {
  4920 
  4921 /* The GNU C library defines this for functions which it implements
  4922     to always fail with ENOSYS.  Some functions are actually named
  4923     something starting with __ and the normal name is an alias.  */
  4924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4925 choke me
  4926 #else
  4927 $ac_func();
  4928 #endif
  4929 
  4930 ; return 0; }
  4931 EOF
  4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4933   rm -rf conftest*
  4934   eval "ac_cv_func_$ac_func=yes"
  4935 else
  4936   echo "configure: failed program was:" >&5
  4937   cat conftest.$ac_ext >&5
  4938   rm -rf conftest*
  4939   eval "ac_cv_func_$ac_func=no"
  4940 fi
  4941 rm -f conftest*
  4942 fi
  4943 
  4944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4945   echo "$ac_t""yes" 1>&6
  4946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4947   cat >> confdefs.h <<EOF
  4948 #define $ac_tr_func 1
  4949 EOF
  4950  
  4951 else
  4952   echo "$ac_t""no" 1>&6
  4953 cat >> confdefs.h <<\EOF
  4954 #define USEGETWD 1
  4955 EOF
  4956 
  4957 fi
  4958 done
  4959 
  4960 # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
  4961 # define USEGETWD even if the posix getcwd exists. Add a test ?
  4962 
  4963 for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid
  4964 do
  4965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4966 echo "configure:4967: checking for $ac_func" >&5
  4967 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4968   echo $ac_n "(cached) $ac_c" 1>&6
  4969 else
  4970   cat > conftest.$ac_ext <<EOF
  4971 #line 4972 "configure"
  4972 #include "confdefs.h"
  4973 /* System header to define __stub macros and hopefully few prototypes,
  4974     which can conflict with char $ac_func(); below.  */
  4975 #include <assert.h>
  4976 /* Override any gcc2 internal prototype to avoid an error.  */
  4977 /* We use char because int might match the return type of a gcc2
  4978     builtin and then its argument prototype would still apply.  */
  4979 char $ac_func();
  4980 
  4981 int main() {
  4982 
  4983 /* The GNU C library defines this for functions which it implements
  4984     to always fail with ENOSYS.  Some functions are actually named
  4985     something starting with __ and the normal name is an alias.  */
  4986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4987 choke me
  4988 #else
  4989 $ac_func();
  4990 #endif
  4991 
  4992 ; return 0; }
  4993 EOF
  4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4995   rm -rf conftest*
  4996   eval "ac_cv_func_$ac_func=yes"
  4997 else
  4998   echo "configure: failed program was:" >&5
  4999   cat conftest.$ac_ext >&5
  5000   rm -rf conftest*
  5001   eval "ac_cv_func_$ac_func=no"
  5002 fi
  5003 rm -f conftest*
  5004 fi
  5005 
  5006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5007   echo "$ac_t""yes" 1>&6
  5008     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5009   cat >> confdefs.h <<EOF
  5010 #define $ac_tr_func 1
  5011 EOF
  5012  
  5013 else
  5014   echo "$ac_t""no" 1>&6
  5015 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  5016 fi
  5017 done
  5018 
  5019 
  5020 echo $ac_n "checking for strerror""... $ac_c" 1>&6
  5021 echo "configure:5022: checking for strerror" >&5
  5022 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
  5023   echo $ac_n "(cached) $ac_c" 1>&6
  5024 else
  5025   cat > conftest.$ac_ext <<EOF
  5026 #line 5027 "configure"
  5027 #include "confdefs.h"
  5028 /* System header to define __stub macros and hopefully few prototypes,
  5029     which can conflict with char strerror(); below.  */
  5030 #include <assert.h>
  5031 /* Override any gcc2 internal prototype to avoid an error.  */
  5032 /* We use char because int might match the return type of a gcc2
  5033     builtin and then its argument prototype would still apply.  */
  5034 char strerror();
  5035 
  5036 int main() {
  5037 
  5038 /* The GNU C library defines this for functions which it implements
  5039     to always fail with ENOSYS.  Some functions are actually named
  5040     something starting with __ and the normal name is an alias.  */
  5041 #if defined (__stub_strerror) || defined (__stub___strerror)
  5042 choke me
  5043 #else
  5044 strerror();
  5045 #endif
  5046 
  5047 ; return 0; }
  5048 EOF
  5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5050   rm -rf conftest*
  5051   eval "ac_cv_func_strerror=yes"
  5052 else
  5053   echo "configure: failed program was:" >&5
  5054   cat conftest.$ac_ext >&5
  5055   rm -rf conftest*
  5056   eval "ac_cv_func_strerror=no"
  5057 fi
  5058 rm -f conftest*
  5059 fi
  5060 
  5061 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  5062   echo "$ac_t""yes" 1>&6
  5063   :
  5064 else
  5065   echo "$ac_t""no" 1>&6
  5066 cat >> confdefs.h <<\EOF
  5067 #define NO_STRERROR 1
  5068 EOF
  5069 
  5070 fi
  5071 
  5072 echo $ac_n "checking for getwd""... $ac_c" 1>&6
  5073 echo "configure:5074: checking for getwd" >&5
  5074 if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
  5075   echo $ac_n "(cached) $ac_c" 1>&6
  5076 else
  5077   cat > conftest.$ac_ext <<EOF
  5078 #line 5079 "configure"
  5079 #include "confdefs.h"
  5080 /* System header to define __stub macros and hopefully few prototypes,
  5081     which can conflict with char getwd(); below.  */
  5082 #include <assert.h>
  5083 /* Override any gcc2 internal prototype to avoid an error.  */
  5084 /* We use char because int might match the return type of a gcc2
  5085     builtin and then its argument prototype would still apply.  */
  5086 char getwd();
  5087 
  5088 int main() {
  5089 
  5090 /* The GNU C library defines this for functions which it implements
  5091     to always fail with ENOSYS.  Some functions are actually named
  5092     something starting with __ and the normal name is an alias.  */
  5093 #if defined (__stub_getwd) || defined (__stub___getwd)
  5094 choke me
  5095 #else
  5096 getwd();
  5097 #endif
  5098 
  5099 ; return 0; }
  5100 EOF
  5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5102   rm -rf conftest*
  5103   eval "ac_cv_func_getwd=yes"
  5104 else
  5105   echo "configure: failed program was:" >&5
  5106   cat conftest.$ac_ext >&5
  5107   rm -rf conftest*
  5108   eval "ac_cv_func_getwd=no"
  5109 fi
  5110 rm -f conftest*
  5111 fi
  5112 
  5113 if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
  5114   echo "$ac_t""yes" 1>&6
  5115   :
  5116 else
  5117   echo "$ac_t""no" 1>&6
  5118 cat >> confdefs.h <<\EOF
  5119 #define NO_GETWD 1
  5120 EOF
  5121 
  5122 fi
  5123 
  5124 echo $ac_n "checking for wait3""... $ac_c" 1>&6
  5125 echo "configure:5126: checking for wait3" >&5
  5126 if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
  5127   echo $ac_n "(cached) $ac_c" 1>&6
  5128 else
  5129   cat > conftest.$ac_ext <<EOF
  5130 #line 5131 "configure"
  5131 #include "confdefs.h"
  5132 /* System header to define __stub macros and hopefully few prototypes,
  5133     which can conflict with char wait3(); below.  */
  5134 #include <assert.h>
  5135 /* Override any gcc2 internal prototype to avoid an error.  */
  5136 /* We use char because int might match the return type of a gcc2
  5137     builtin and then its argument prototype would still apply.  */
  5138 char wait3();
  5139 
  5140 int main() {
  5141 
  5142 /* The GNU C library defines this for functions which it implements
  5143     to always fail with ENOSYS.  Some functions are actually named
  5144     something starting with __ and the normal name is an alias.  */
  5145 #if defined (__stub_wait3) || defined (__stub___wait3)
  5146 choke me
  5147 #else
  5148 wait3();
  5149 #endif
  5150 
  5151 ; return 0; }
  5152 EOF
  5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5154   rm -rf conftest*
  5155   eval "ac_cv_func_wait3=yes"
  5156 else
  5157   echo "configure: failed program was:" >&5
  5158   cat conftest.$ac_ext >&5
  5159   rm -rf conftest*
  5160   eval "ac_cv_func_wait3=no"
  5161 fi
  5162 rm -f conftest*
  5163 fi
  5164 
  5165 if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
  5166   echo "$ac_t""yes" 1>&6
  5167   :
  5168 else
  5169   echo "$ac_t""no" 1>&6
  5170 cat >> confdefs.h <<\EOF
  5171 #define NO_WAIT3 1
  5172 EOF
  5173 
  5174 fi
  5175 
  5176 echo $ac_n "checking for uname""... $ac_c" 1>&6
  5177 echo "configure:5178: checking for uname" >&5
  5178 if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
  5179   echo $ac_n "(cached) $ac_c" 1>&6
  5180 else
  5181   cat > conftest.$ac_ext <<EOF
  5182 #line 5183 "configure"
  5183 #include "confdefs.h"
  5184 /* System header to define __stub macros and hopefully few prototypes,
  5185     which can conflict with char uname(); below.  */
  5186 #include <assert.h>
  5187 /* Override any gcc2 internal prototype to avoid an error.  */
  5188 /* We use char because int might match the return type of a gcc2
  5189     builtin and then its argument prototype would still apply.  */
  5190 char uname();
  5191 
  5192 int main() {
  5193 
  5194 /* The GNU C library defines this for functions which it implements
  5195     to always fail with ENOSYS.  Some functions are actually named
  5196     something starting with __ and the normal name is an alias.  */
  5197 #if defined (__stub_uname) || defined (__stub___uname)
  5198 choke me
  5199 #else
  5200 uname();
  5201 #endif
  5202 
  5203 ; return 0; }
  5204 EOF
  5205 if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5206   rm -rf conftest*
  5207   eval "ac_cv_func_uname=yes"
  5208 else
  5209   echo "configure: failed program was:" >&5
  5210   cat conftest.$ac_ext >&5
  5211   rm -rf conftest*
  5212   eval "ac_cv_func_uname=no"
  5213 fi
  5214 rm -f conftest*
  5215 fi
  5216 
  5217 if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
  5218   echo "$ac_t""yes" 1>&6
  5219   :
  5220 else
  5221   echo "$ac_t""no" 1>&6
  5222 cat >> confdefs.h <<\EOF
  5223 #define NO_UNAME 1
  5224 EOF
  5225 
  5226 fi
  5227 
  5228 
  5229 if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
  5230 	test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
  5231     # prior to Darwin 7, realpath is not threadsafe, so don't
  5232     # use it when threads are enabled, c.f. bug # 711232
  5233     ac_cv_func_realpath=no
  5234 fi
  5235 echo $ac_n "checking for realpath""... $ac_c" 1>&6
  5236 echo "configure:5237: checking for realpath" >&5
  5237 if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
  5238   echo $ac_n "(cached) $ac_c" 1>&6
  5239 else
  5240   cat > conftest.$ac_ext <<EOF
  5241 #line 5242 "configure"
  5242 #include "confdefs.h"
  5243 /* System header to define __stub macros and hopefully few prototypes,
  5244     which can conflict with char realpath(); below.  */
  5245 #include <assert.h>
  5246 /* Override any gcc2 internal prototype to avoid an error.  */
  5247 /* We use char because int might match the return type of a gcc2
  5248     builtin and then its argument prototype would still apply.  */
  5249 char realpath();
  5250 
  5251 int main() {
  5252 
  5253 /* The GNU C library defines this for functions which it implements
  5254     to always fail with ENOSYS.  Some functions are actually named
  5255     something starting with __ and the normal name is an alias.  */
  5256 #if defined (__stub_realpath) || defined (__stub___realpath)
  5257 choke me
  5258 #else
  5259 realpath();
  5260 #endif
  5261 
  5262 ; return 0; }
  5263 EOF
  5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5265   rm -rf conftest*
  5266   eval "ac_cv_func_realpath=yes"
  5267 else
  5268   echo "configure: failed program was:" >&5
  5269   cat conftest.$ac_ext >&5
  5270   rm -rf conftest*
  5271   eval "ac_cv_func_realpath=no"
  5272 fi
  5273 rm -f conftest*
  5274 fi
  5275 
  5276 if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then
  5277   echo "$ac_t""yes" 1>&6
  5278   :
  5279 else
  5280   echo "$ac_t""no" 1>&6
  5281 cat >> confdefs.h <<\EOF
  5282 #define NO_REALPATH 1
  5283 EOF
  5284 
  5285 fi
  5286 
  5287 
  5288 #--------------------------------------------------------------------
  5289 #	Look for thread-safe variants of some library functions.
  5290 #--------------------------------------------------------------------
  5291 
  5292 if test "${TCL_THREADS}" = 1; then
  5293     echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6
  5294 echo "configure:5295: checking for getpwuid_r" >&5
  5295 if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then
  5296   echo $ac_n "(cached) $ac_c" 1>&6
  5297 else
  5298   cat > conftest.$ac_ext <<EOF
  5299 #line 5300 "configure"
  5300 #include "confdefs.h"
  5301 /* System header to define __stub macros and hopefully few prototypes,
  5302     which can conflict with char getpwuid_r(); below.  */
  5303 #include <assert.h>
  5304 /* Override any gcc2 internal prototype to avoid an error.  */
  5305 /* We use char because int might match the return type of a gcc2
  5306     builtin and then its argument prototype would still apply.  */
  5307 char getpwuid_r();
  5308 
  5309 int main() {
  5310 
  5311 /* The GNU C library defines this for functions which it implements
  5312     to always fail with ENOSYS.  Some functions are actually named
  5313     something starting with __ and the normal name is an alias.  */
  5314 #if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
  5315 choke me
  5316 #else
  5317 getpwuid_r();
  5318 #endif
  5319 
  5320 ; return 0; }
  5321 EOF
  5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5323   rm -rf conftest*
  5324   eval "ac_cv_func_getpwuid_r=yes"
  5325 else
  5326   echo "configure: failed program was:" >&5
  5327   cat conftest.$ac_ext >&5
  5328   rm -rf conftest*
  5329   eval "ac_cv_func_getpwuid_r=no"
  5330 fi
  5331 rm -f conftest*
  5332 fi
  5333 
  5334 if eval "test \"`echo '$ac_cv_func_'getpwuid_r`\" = yes"; then
  5335   echo "$ac_t""yes" 1>&6
  5336   
  5337     echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6
  5338 echo "configure:5339: checking for getpwuid_r with 5 args" >&5
  5339 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`\" = set"; then
  5340   echo $ac_n "(cached) $ac_c" 1>&6
  5341 else
  5342   
  5343     cat > conftest.$ac_ext <<EOF
  5344 #line 5345 "configure"
  5345 #include "confdefs.h"
  5346 
  5347 	#include <sys/types.h>
  5348 	#include <pwd.h>
  5349     
  5350 int main() {
  5351 
  5352 	uid_t uid;
  5353 	struct passwd pw, *pwp;
  5354 	char buf[512];
  5355 	int buflen = 512;
  5356 
  5357 	(void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
  5358     
  5359 ; return 0; }
  5360 EOF
  5361 if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5362   rm -rf conftest*
  5363   tcl_cv_api_getpwuid_r_5=yes
  5364 else
  5365   echo "configure: failed program was:" >&5
  5366   cat conftest.$ac_ext >&5
  5367   rm -rf conftest*
  5368   tcl_cv_api_getpwuid_r_5=no
  5369 fi
  5370 rm -f conftest*
  5371 fi
  5372 
  5373 echo "$ac_t""$tcl_cv_api_getpwuid_r_5" 1>&6
  5374     tcl_ok=$tcl_cv_api_getpwuid_r_5
  5375     if test "$tcl_ok" = yes; then
  5376 	cat >> confdefs.h <<\EOF
  5377 #define HAVE_GETPWUID_R_5 1
  5378 EOF
  5379 
  5380     else
  5381 	echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6
  5382 echo "configure:5383: checking for getpwuid_r with 4 args" >&5
  5383 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`\" = set"; then
  5384   echo $ac_n "(cached) $ac_c" 1>&6
  5385 else
  5386   
  5387 	cat > conftest.$ac_ext <<EOF
  5388 #line 5389 "configure"
  5389 #include "confdefs.h"
  5390 
  5391 	    #include <sys/types.h>
  5392 	    #include <pwd.h>
  5393 	
  5394 int main() {
  5395 
  5396 	    uid_t uid;
  5397 	    struct passwd pw;
  5398 	    char buf[512];
  5399 	    int buflen = 512;
  5400 
  5401 	    (void)getpwnam_r(uid, &pw, buf, buflen);
  5402 	
  5403 ; return 0; }
  5404 EOF
  5405 if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5406   rm -rf conftest*
  5407   tcl_cv_api_getpwuid_r_4=yes
  5408 else
  5409   echo "configure: failed program was:" >&5
  5410   cat conftest.$ac_ext >&5
  5411   rm -rf conftest*
  5412   tcl_cv_api_getpwuid_r_4=no
  5413 fi
  5414 rm -f conftest*
  5415 fi
  5416 
  5417 echo "$ac_t""$tcl_cv_api_getpwuid_r_4" 1>&6
  5418 	tcl_ok=$tcl_cv_api_getpwuid_r_4
  5419 	if test "$tcl_ok" = yes; then
  5420 	    cat >> confdefs.h <<\EOF
  5421 #define HAVE_GETPWUID_R_4 1
  5422 EOF
  5423 
  5424 	fi
  5425     fi
  5426     if test "$tcl_ok" = yes; then
  5427 	cat >> confdefs.h <<\EOF
  5428 #define HAVE_GETPWUID_R 1
  5429 EOF
  5430 
  5431     fi
  5432 
  5433 else
  5434   echo "$ac_t""no" 1>&6
  5435 fi
  5436 
  5437     echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6
  5438 echo "configure:5439: checking for getpwnam_r" >&5
  5439 if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r'+set}'`\" = set"; then
  5440   echo $ac_n "(cached) $ac_c" 1>&6
  5441 else
  5442   cat > conftest.$ac_ext <<EOF
  5443 #line 5444 "configure"
  5444 #include "confdefs.h"
  5445 /* System header to define __stub macros and hopefully few prototypes,
  5446     which can conflict with char getpwnam_r(); below.  */
  5447 #include <assert.h>
  5448 /* Override any gcc2 internal prototype to avoid an error.  */
  5449 /* We use char because int might match the return type of a gcc2
  5450     builtin and then its argument prototype would still apply.  */
  5451 char getpwnam_r();
  5452 
  5453 int main() {
  5454 
  5455 /* The GNU C library defines this for functions which it implements
  5456     to always fail with ENOSYS.  Some functions are actually named
  5457     something starting with __ and the normal name is an alias.  */
  5458 #if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
  5459 choke me
  5460 #else
  5461 getpwnam_r();
  5462 #endif
  5463 
  5464 ; return 0; }
  5465 EOF
  5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5467   rm -rf conftest*
  5468   eval "ac_cv_func_getpwnam_r=yes"
  5469 else
  5470   echo "configure: failed program was:" >&5
  5471   cat conftest.$ac_ext >&5
  5472   rm -rf conftest*
  5473   eval "ac_cv_func_getpwnam_r=no"
  5474 fi
  5475 rm -f conftest*
  5476 fi
  5477 
  5478 if eval "test \"`echo '$ac_cv_func_'getpwnam_r`\" = yes"; then
  5479   echo "$ac_t""yes" 1>&6
  5480   
  5481     echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6
  5482 echo "configure:5483: checking for getpwnam_r with 5 args" >&5
  5483 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`\" = set"; then
  5484   echo $ac_n "(cached) $ac_c" 1>&6
  5485 else
  5486   
  5487     cat > conftest.$ac_ext <<EOF
  5488 #line 5489 "configure"
  5489 #include "confdefs.h"
  5490 
  5491 	#include <sys/types.h>
  5492 	#include <pwd.h>
  5493     
  5494 int main() {
  5495 
  5496 	char *name;
  5497 	struct passwd pw, *pwp;
  5498 	char buf[512];
  5499 	int buflen = 512;
  5500 
  5501 	(void) getpwnam_r(name, &pw, buf, buflen, &pwp);
  5502     
  5503 ; return 0; }
  5504 EOF
  5505 if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5506   rm -rf conftest*
  5507   tcl_cv_api_getpwnam_r_5=yes
  5508 else
  5509   echo "configure: failed program was:" >&5
  5510   cat conftest.$ac_ext >&5
  5511   rm -rf conftest*
  5512   tcl_cv_api_getpwnam_r_5=no
  5513 fi
  5514 rm -f conftest*
  5515 fi
  5516 
  5517 echo "$ac_t""$tcl_cv_api_getpwnam_r_5" 1>&6
  5518     tcl_ok=$tcl_cv_api_getpwnam_r_5
  5519     if test "$tcl_ok" = yes; then
  5520 	cat >> confdefs.h <<\EOF
  5521 #define HAVE_GETPWNAM_R_5 1
  5522 EOF
  5523 
  5524     else
  5525 	echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6
  5526 echo "configure:5527: checking for getpwnam_r with 4 args" >&5
  5527 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`\" = set"; then
  5528   echo $ac_n "(cached) $ac_c" 1>&6
  5529 else
  5530   
  5531 	cat > conftest.$ac_ext <<EOF
  5532 #line 5533 "configure"
  5533 #include "confdefs.h"
  5534 
  5535 	    #include <sys/types.h>
  5536 	    #include <pwd.h>
  5537 	
  5538 int main() {
  5539 
  5540 	    char *name;
  5541 	    struct passwd pw;
  5542 	    char buf[512];
  5543 	    int buflen = 512;
  5544 
  5545 	    (void)getpwnam_r(name, &pw, buf, buflen);
  5546 	
  5547 ; return 0; }
  5548 EOF
  5549 if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5550   rm -rf conftest*
  5551   tcl_cv_api_getpwnam_r_4=yes
  5552 else
  5553   echo "configure: failed program was:" >&5
  5554   cat conftest.$ac_ext >&5
  5555   rm -rf conftest*
  5556   tcl_cv_api_getpwnam_r_4=no
  5557 fi
  5558 rm -f conftest*
  5559 fi
  5560 
  5561 echo "$ac_t""$tcl_cv_api_getpwnam_r_4" 1>&6
  5562 	tcl_ok=$tcl_cv_api_getpwnam_r_4
  5563 	if test "$tcl_ok" = yes; then
  5564 	    cat >> confdefs.h <<\EOF
  5565 #define HAVE_GETPWNAM_R_4 1
  5566 EOF
  5567 
  5568 	fi
  5569     fi
  5570     if test "$tcl_ok" = yes; then
  5571 	cat >> confdefs.h <<\EOF
  5572 #define HAVE_GETPWNAM_R 1
  5573 EOF
  5574 
  5575     fi
  5576 
  5577 else
  5578   echo "$ac_t""no" 1>&6
  5579 fi
  5580 
  5581     echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6
  5582 echo "configure:5583: checking for getgrgid_r" >&5
  5583 if eval "test \"`echo '$''{'ac_cv_func_getgrgid_r'+set}'`\" = set"; then
  5584   echo $ac_n "(cached) $ac_c" 1>&6
  5585 else
  5586   cat > conftest.$ac_ext <<EOF
  5587 #line 5588 "configure"
  5588 #include "confdefs.h"
  5589 /* System header to define __stub macros and hopefully few prototypes,
  5590     which can conflict with char getgrgid_r(); below.  */
  5591 #include <assert.h>
  5592 /* Override any gcc2 internal prototype to avoid an error.  */
  5593 /* We use char because int might match the return type of a gcc2
  5594     builtin and then its argument prototype would still apply.  */
  5595 char getgrgid_r();
  5596 
  5597 int main() {
  5598 
  5599 /* The GNU C library defines this for functions which it implements
  5600     to always fail with ENOSYS.  Some functions are actually named
  5601     something starting with __ and the normal name is an alias.  */
  5602 #if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
  5603 choke me
  5604 #else
  5605 getgrgid_r();
  5606 #endif
  5607 
  5608 ; return 0; }
  5609 EOF
  5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5611   rm -rf conftest*
  5612   eval "ac_cv_func_getgrgid_r=yes"
  5613 else
  5614   echo "configure: failed program was:" >&5
  5615   cat conftest.$ac_ext >&5
  5616   rm -rf conftest*
  5617   eval "ac_cv_func_getgrgid_r=no"
  5618 fi
  5619 rm -f conftest*
  5620 fi
  5621 
  5622 if eval "test \"`echo '$ac_cv_func_'getgrgid_r`\" = yes"; then
  5623   echo "$ac_t""yes" 1>&6
  5624   
  5625     echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6
  5626 echo "configure:5627: checking for getgrgid_r with 5 args" >&5
  5627 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`\" = set"; then
  5628   echo $ac_n "(cached) $ac_c" 1>&6
  5629 else
  5630   
  5631     cat > conftest.$ac_ext <<EOF
  5632 #line 5633 "configure"
  5633 #include "confdefs.h"
  5634 
  5635 	#include <sys/types.h>
  5636 	#include <grp.h>
  5637     
  5638 int main() {
  5639 
  5640 	gid_t gid;
  5641 	struct group gr, *grp;
  5642 	char buf[512];
  5643 	int buflen = 512;
  5644 
  5645 	(void) getgrgid_r(gid, &gr, buf, buflen, &grp);
  5646     
  5647 ; return 0; }
  5648 EOF
  5649 if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5650   rm -rf conftest*
  5651   tcl_cv_api_getgrgid_r_5=yes
  5652 else
  5653   echo "configure: failed program was:" >&5
  5654   cat conftest.$ac_ext >&5
  5655   rm -rf conftest*
  5656   tcl_cv_api_getgrgid_r_5=no
  5657 fi
  5658 rm -f conftest*
  5659 fi
  5660 
  5661 echo "$ac_t""$tcl_cv_api_getgrgid_r_5" 1>&6
  5662     tcl_ok=$tcl_cv_api_getgrgid_r_5
  5663     if test "$tcl_ok" = yes; then
  5664 	cat >> confdefs.h <<\EOF
  5665 #define HAVE_GETGRGID_R_5 1
  5666 EOF
  5667 
  5668     else
  5669 	echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6
  5670 echo "configure:5671: checking for getgrgid_r with 4 args" >&5
  5671 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`\" = set"; then
  5672   echo $ac_n "(cached) $ac_c" 1>&6
  5673 else
  5674   
  5675 	cat > conftest.$ac_ext <<EOF
  5676 #line 5677 "configure"
  5677 #include "confdefs.h"
  5678 
  5679 	    #include <sys/types.h>
  5680 	    #include <grp.h>
  5681 	
  5682 int main() {
  5683 
  5684 	    gid_t gid;
  5685 	    struct group gr;
  5686 	    char buf[512];
  5687 	    int buflen = 512;
  5688 
  5689 	    (void)getgrgid_r(gid, &gr, buf, buflen);
  5690 	
  5691 ; return 0; }
  5692 EOF
  5693 if { (eval echo configure:5694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5694   rm -rf conftest*
  5695   tcl_cv_api_getgrgid_r_4=yes
  5696 else
  5697   echo "configure: failed program was:" >&5
  5698   cat conftest.$ac_ext >&5
  5699   rm -rf conftest*
  5700   tcl_cv_api_getgrgid_r_4=no
  5701 fi
  5702 rm -f conftest*
  5703 fi
  5704 
  5705 echo "$ac_t""$tcl_cv_api_getgrgid_r_4" 1>&6
  5706 	tcl_ok=$tcl_cv_api_getgrgid_r_4
  5707 	if test "$tcl_ok" = yes; then
  5708 	    cat >> confdefs.h <<\EOF
  5709 #define HAVE_GETGRGID_R_4 1
  5710 EOF
  5711 
  5712 	fi
  5713     fi
  5714     if test "$tcl_ok" = yes; then
  5715 	cat >> confdefs.h <<\EOF
  5716 #define HAVE_GETGRGID_R 1
  5717 EOF
  5718 
  5719     fi
  5720 
  5721 else
  5722   echo "$ac_t""no" 1>&6
  5723 fi
  5724 
  5725     echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6
  5726 echo "configure:5727: checking for getgrnam_r" >&5
  5727 if eval "test \"`echo '$''{'ac_cv_func_getgrnam_r'+set}'`\" = set"; then
  5728   echo $ac_n "(cached) $ac_c" 1>&6
  5729 else
  5730   cat > conftest.$ac_ext <<EOF
  5731 #line 5732 "configure"
  5732 #include "confdefs.h"
  5733 /* System header to define __stub macros and hopefully few prototypes,
  5734     which can conflict with char getgrnam_r(); below.  */
  5735 #include <assert.h>
  5736 /* Override any gcc2 internal prototype to avoid an error.  */
  5737 /* We use char because int might match the return type of a gcc2
  5738     builtin and then its argument prototype would still apply.  */
  5739 char getgrnam_r();
  5740 
  5741 int main() {
  5742 
  5743 /* The GNU C library defines this for functions which it implements
  5744     to always fail with ENOSYS.  Some functions are actually named
  5745     something starting with __ and the normal name is an alias.  */
  5746 #if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
  5747 choke me
  5748 #else
  5749 getgrnam_r();
  5750 #endif
  5751 
  5752 ; return 0; }
  5753 EOF
  5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5755   rm -rf conftest*
  5756   eval "ac_cv_func_getgrnam_r=yes"
  5757 else
  5758   echo "configure: failed program was:" >&5
  5759   cat conftest.$ac_ext >&5
  5760   rm -rf conftest*
  5761   eval "ac_cv_func_getgrnam_r=no"
  5762 fi
  5763 rm -f conftest*
  5764 fi
  5765 
  5766 if eval "test \"`echo '$ac_cv_func_'getgrnam_r`\" = yes"; then
  5767   echo "$ac_t""yes" 1>&6
  5768   
  5769     echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6
  5770 echo "configure:5771: checking for getgrnam_r with 5 args" >&5
  5771 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`\" = set"; then
  5772   echo $ac_n "(cached) $ac_c" 1>&6
  5773 else
  5774   
  5775     cat > conftest.$ac_ext <<EOF
  5776 #line 5777 "configure"
  5777 #include "confdefs.h"
  5778 
  5779 	#include <sys/types.h>
  5780 	#include <grp.h>
  5781     
  5782 int main() {
  5783 
  5784 	char *name;
  5785 	struct group gr, *grp;
  5786 	char buf[512];
  5787 	int buflen = 512;
  5788 
  5789 	(void) getgrnam_r(name, &gr, buf, buflen, &grp);
  5790     
  5791 ; return 0; }
  5792 EOF
  5793 if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5794   rm -rf conftest*
  5795   tcl_cv_api_getgrnam_r_5=yes
  5796 else
  5797   echo "configure: failed program was:" >&5
  5798   cat conftest.$ac_ext >&5
  5799   rm -rf conftest*
  5800   tcl_cv_api_getgrnam_r_5=no
  5801 fi
  5802 rm -f conftest*
  5803 fi
  5804 
  5805 echo "$ac_t""$tcl_cv_api_getgrnam_r_5" 1>&6
  5806     tcl_ok=$tcl_cv_api_getgrnam_r_5
  5807     if test "$tcl_ok" = yes; then
  5808 	cat >> confdefs.h <<\EOF
  5809 #define HAVE_GETGRNAM_R_5 1
  5810 EOF
  5811 
  5812     else
  5813 	echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6
  5814 echo "configure:5815: checking for getgrnam_r with 4 args" >&5
  5815 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`\" = set"; then
  5816   echo $ac_n "(cached) $ac_c" 1>&6
  5817 else
  5818   
  5819 	cat > conftest.$ac_ext <<EOF
  5820 #line 5821 "configure"
  5821 #include "confdefs.h"
  5822 
  5823 	    #include <sys/types.h>
  5824 	    #include <grp.h>
  5825 	
  5826 int main() {
  5827 
  5828 	    char *name;
  5829 	    struct group gr;
  5830 	    char buf[512];
  5831 	    int buflen = 512;
  5832 
  5833 	    (void)getgrnam_r(name, &gr, buf, buflen);
  5834 	
  5835 ; return 0; }
  5836 EOF
  5837 if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5838   rm -rf conftest*
  5839   tcl_cv_api_getgrnam_r_4=yes
  5840 else
  5841   echo "configure: failed program was:" >&5
  5842   cat conftest.$ac_ext >&5
  5843   rm -rf conftest*
  5844   tcl_cv_api_getgrnam_r_4=no
  5845 fi
  5846 rm -f conftest*
  5847 fi
  5848 
  5849 echo "$ac_t""$tcl_cv_api_getgrnam_r_4" 1>&6
  5850 	tcl_ok=$tcl_cv_api_getgrnam_r_4
  5851 	if test "$tcl_ok" = yes; then
  5852 	    cat >> confdefs.h <<\EOF
  5853 #define HAVE_GETGRNAM_R_4 1
  5854 EOF
  5855 
  5856 	fi
  5857     fi
  5858     if test "$tcl_ok" = yes; then
  5859 	cat >> confdefs.h <<\EOF
  5860 #define HAVE_GETGRNAM_R 1
  5861 EOF
  5862 
  5863     fi
  5864 
  5865 else
  5866   echo "$ac_t""no" 1>&6
  5867 fi
  5868 
  5869     if test "`uname -s`" = "Darwin" && \
  5870 	    test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
  5871 	# Starting with Darwin 6 (Mac OSX 10.2), gethostbyX 
  5872 	# are actually MT-safe as they always return pointers
  5873 	# from the TSD instead of the static storage.
  5874 	cat >> confdefs.h <<\EOF
  5875 #define HAVE_MTSAFE_GETHOSTBYNAME 1
  5876 EOF
  5877 
  5878 	cat >> confdefs.h <<\EOF
  5879 #define HAVE_MTSAFE_GETHOSTBYADDR 1
  5880 EOF
  5881 
  5882     elif test "`uname -s`" = "HP-UX" && \
  5883 	      test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
  5884         # Starting with HPUX 11.00 (we believe), gethostbyX
  5885         # are actually MT-safe as they always return pointers
  5886 	# from TSD instead of static storage.
  5887 	cat >> confdefs.h <<\EOF
  5888 #define HAVE_MTSAFE_GETHOSTBYNAME 1
  5889 EOF
  5890 
  5891 	cat >> confdefs.h <<\EOF
  5892 #define HAVE_MTSAFE_GETHOSTBYADDR 1
  5893 EOF
  5894 
  5895     else
  5896 	echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
  5897 echo "configure:5898: checking for gethostbyname_r" >&5
  5898 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
  5899   echo $ac_n "(cached) $ac_c" 1>&6
  5900 else
  5901   cat > conftest.$ac_ext <<EOF
  5902 #line 5903 "configure"
  5903 #include "confdefs.h"
  5904 /* System header to define __stub macros and hopefully few prototypes,
  5905     which can conflict with char gethostbyname_r(); below.  */
  5906 #include <assert.h>
  5907 /* Override any gcc2 internal prototype to avoid an error.  */
  5908 /* We use char because int might match the return type of a gcc2
  5909     builtin and then its argument prototype would still apply.  */
  5910 char gethostbyname_r();
  5911 
  5912 int main() {
  5913 
  5914 /* The GNU C library defines this for functions which it implements
  5915     to always fail with ENOSYS.  Some functions are actually named
  5916     something starting with __ and the normal name is an alias.  */
  5917 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
  5918 choke me
  5919 #else
  5920 gethostbyname_r();
  5921 #endif
  5922 
  5923 ; return 0; }
  5924 EOF
  5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5926   rm -rf conftest*
  5927   eval "ac_cv_func_gethostbyname_r=yes"
  5928 else
  5929   echo "configure: failed program was:" >&5
  5930   cat conftest.$ac_ext >&5
  5931   rm -rf conftest*
  5932   eval "ac_cv_func_gethostbyname_r=no"
  5933 fi
  5934 rm -f conftest*
  5935 fi
  5936 
  5937 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
  5938   echo "$ac_t""yes" 1>&6
  5939   
  5940     echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6
  5941 echo "configure:5942: checking for gethostbyname_r with 6 args" >&5
  5942 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`\" = set"; then
  5943   echo $ac_n "(cached) $ac_c" 1>&6
  5944 else
  5945   
  5946     cat > conftest.$ac_ext <<EOF
  5947 #line 5948 "configure"
  5948 #include "confdefs.h"
  5949 
  5950 	#include <netdb.h>
  5951     
  5952 int main() {
  5953 
  5954 	char *name;
  5955 	struct hostent *he, *res;
  5956 	char buffer[2048];
  5957 	int buflen = 2048;
  5958 	int h_errnop;
  5959 
  5960 	(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
  5961     
  5962 ; return 0; }
  5963 EOF
  5964 if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5965   rm -rf conftest*
  5966   tcl_cv_api_gethostbyname_r_6=yes
  5967 else
  5968   echo "configure: failed program was:" >&5
  5969   cat conftest.$ac_ext >&5
  5970   rm -rf conftest*
  5971   tcl_cv_api_gethostbyname_r_6=no
  5972 fi
  5973 rm -f conftest*
  5974 fi
  5975 
  5976 echo "$ac_t""$tcl_cv_api_gethostbyname_r_6" 1>&6
  5977     tcl_ok=$tcl_cv_api_gethostbyname_r_6
  5978     if test "$tcl_ok" = yes; then
  5979 	cat >> confdefs.h <<\EOF
  5980 #define HAVE_GETHOSTBYNAME_R_6 1
  5981 EOF
  5982 
  5983     else
  5984 	echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6
  5985 echo "configure:5986: checking for gethostbyname_r with 5 args" >&5
  5986 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`\" = set"; then
  5987   echo $ac_n "(cached) $ac_c" 1>&6
  5988 else
  5989   
  5990 	cat > conftest.$ac_ext <<EOF
  5991 #line 5992 "configure"
  5992 #include "confdefs.h"
  5993 
  5994 	    #include <netdb.h>
  5995 	
  5996 int main() {
  5997 
  5998 	    char *name;
  5999 	    struct hostent *he;
  6000 	    char buffer[2048];
  6001 	    int buflen = 2048;
  6002 	    int h_errnop;
  6003 
  6004 	    (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
  6005 	
  6006 ; return 0; }
  6007 EOF
  6008 if { (eval echo configure:6009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6009   rm -rf conftest*
  6010   tcl_cv_api_gethostbyname_r_5=yes
  6011 else
  6012   echo "configure: failed program was:" >&5
  6013   cat conftest.$ac_ext >&5
  6014   rm -rf conftest*
  6015   tcl_cv_api_gethostbyname_r_5=no
  6016 fi
  6017 rm -f conftest*
  6018 fi
  6019 
  6020 echo "$ac_t""$tcl_cv_api_gethostbyname_r_5" 1>&6
  6021 	tcl_ok=$tcl_cv_api_gethostbyname_r_5
  6022 	if test "$tcl_ok" = yes; then
  6023 	    cat >> confdefs.h <<\EOF
  6024 #define HAVE_GETHOSTBYNAME_R_5 1
  6025 EOF
  6026 
  6027 	else
  6028 	    echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6
  6029 echo "configure:6030: checking for gethostbyname_r with 3 args" >&5
  6030 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`\" = set"; then
  6031   echo $ac_n "(cached) $ac_c" 1>&6
  6032 else
  6033   
  6034 	    cat > conftest.$ac_ext <<EOF
  6035 #line 6036 "configure"
  6036 #include "confdefs.h"
  6037 
  6038 		#include <netdb.h>
  6039 	    
  6040 int main() {
  6041 
  6042 		char *name;
  6043 		struct hostent *he;
  6044 		struct hostent_data data;
  6045 
  6046 		(void) gethostbyname_r(name, he, &data);
  6047 	    
  6048 ; return 0; }
  6049 EOF
  6050 if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6051   rm -rf conftest*
  6052   tcl_cv_api_gethostbyname_r_3=yes
  6053 else
  6054   echo "configure: failed program was:" >&5
  6055   cat conftest.$ac_ext >&5
  6056   rm -rf conftest*
  6057   tcl_cv_api_gethostbyname_r_3=no
  6058 fi
  6059 rm -f conftest*
  6060 fi
  6061 
  6062 echo "$ac_t""$tcl_cv_api_gethostbyname_r_3" 1>&6
  6063 	    tcl_ok=$tcl_cv_api_gethostbyname_r_3
  6064 	    if test "$tcl_ok" = yes; then
  6065 		cat >> confdefs.h <<\EOF
  6066 #define HAVE_GETHOSTBYNAME_R_3 1
  6067 EOF
  6068 
  6069 	    fi
  6070 	fi
  6071     fi
  6072     if test "$tcl_ok" = yes; then
  6073 	cat >> confdefs.h <<\EOF
  6074 #define HAVE_GETHOSTBYNAME_R 1
  6075 EOF
  6076 
  6077     fi
  6078 
  6079 else
  6080   echo "$ac_t""no" 1>&6
  6081 fi
  6082 
  6083 	echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6
  6084 echo "configure:6085: checking for gethostbyaddr_r" >&5
  6085 if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`\" = set"; then
  6086   echo $ac_n "(cached) $ac_c" 1>&6
  6087 else
  6088   cat > conftest.$ac_ext <<EOF
  6089 #line 6090 "configure"
  6090 #include "confdefs.h"
  6091 /* System header to define __stub macros and hopefully few prototypes,
  6092     which can conflict with char gethostbyaddr_r(); below.  */
  6093 #include <assert.h>
  6094 /* Override any gcc2 internal prototype to avoid an error.  */
  6095 /* We use char because int might match the return type of a gcc2
  6096     builtin and then its argument prototype would still apply.  */
  6097 char gethostbyaddr_r();
  6098 
  6099 int main() {
  6100 
  6101 /* The GNU C library defines this for functions which it implements
  6102     to always fail with ENOSYS.  Some functions are actually named
  6103     something starting with __ and the normal name is an alias.  */
  6104 #if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
  6105 choke me
  6106 #else
  6107 gethostbyaddr_r();
  6108 #endif
  6109 
  6110 ; return 0; }
  6111 EOF
  6112 if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6113   rm -rf conftest*
  6114   eval "ac_cv_func_gethostbyaddr_r=yes"
  6115 else
  6116   echo "configure: failed program was:" >&5
  6117   cat conftest.$ac_ext >&5
  6118   rm -rf conftest*
  6119   eval "ac_cv_func_gethostbyaddr_r=no"
  6120 fi
  6121 rm -f conftest*
  6122 fi
  6123 
  6124 if eval "test \"`echo '$ac_cv_func_'gethostbyaddr_r`\" = yes"; then
  6125   echo "$ac_t""yes" 1>&6
  6126   
  6127     echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6
  6128 echo "configure:6129: checking for gethostbyaddr_r with 7 args" >&5
  6129 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`\" = set"; then
  6130   echo $ac_n "(cached) $ac_c" 1>&6
  6131 else
  6132   
  6133     cat > conftest.$ac_ext <<EOF
  6134 #line 6135 "configure"
  6135 #include "confdefs.h"
  6136 
  6137 	#include <netdb.h>
  6138     
  6139 int main() {
  6140 
  6141 	char *addr;
  6142 	int length;
  6143 	int type;
  6144 	struct hostent *result;
  6145 	char buffer[2048];
  6146 	int buflen = 2048;
  6147 	int h_errnop;
  6148 
  6149 	(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
  6150 			       &h_errnop);
  6151     
  6152 ; return 0; }
  6153 EOF
  6154 if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6155   rm -rf conftest*
  6156   tcl_cv_api_gethostbyaddr_r_7=yes
  6157 else
  6158   echo "configure: failed program was:" >&5
  6159   cat conftest.$ac_ext >&5
  6160   rm -rf conftest*
  6161   tcl_cv_api_gethostbyaddr_r_7=no
  6162 fi
  6163 rm -f conftest*
  6164 fi
  6165 
  6166 echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_7" 1>&6
  6167     tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
  6168     if test "$tcl_ok" = yes; then
  6169 	cat >> confdefs.h <<\EOF
  6170 #define HAVE_GETHOSTBYADDR_R_7 1
  6171 EOF
  6172 
  6173     else
  6174 	echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6
  6175 echo "configure:6176: checking for gethostbyaddr_r with 8 args" >&5
  6176 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`\" = set"; then
  6177   echo $ac_n "(cached) $ac_c" 1>&6
  6178 else
  6179   
  6180 	cat > conftest.$ac_ext <<EOF
  6181 #line 6182 "configure"
  6182 #include "confdefs.h"
  6183 
  6184 	    #include <netdb.h>
  6185 	
  6186 int main() {
  6187 
  6188 	    char *addr;
  6189 	    int length;
  6190 	    int type;
  6191 	    struct hostent *result, *resultp;
  6192 	    char buffer[2048];
  6193 	    int buflen = 2048;
  6194 	    int h_errnop;
  6195 
  6196 	    (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
  6197 				   &resultp, &h_errnop);
  6198 	
  6199 ; return 0; }
  6200 EOF
  6201 if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6202   rm -rf conftest*
  6203   tcl_cv_api_gethostbyaddr_r_8=yes
  6204 else
  6205   echo "configure: failed program was:" >&5
  6206   cat conftest.$ac_ext >&5
  6207   rm -rf conftest*
  6208   tcl_cv_api_gethostbyaddr_r_8=no
  6209 fi
  6210 rm -f conftest*
  6211 fi
  6212 
  6213 echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_8" 1>&6
  6214 	tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
  6215 	if test "$tcl_ok" = yes; then
  6216 	    cat >> confdefs.h <<\EOF
  6217 #define HAVE_GETHOSTBYADDR_R_8 1
  6218 EOF
  6219 
  6220 	fi
  6221     fi
  6222     if test "$tcl_ok" = yes; then
  6223 	cat >> confdefs.h <<\EOF
  6224 #define HAVE_GETHOSTBYADDR_R 1
  6225 EOF
  6226 
  6227     fi
  6228 
  6229 else
  6230   echo "$ac_t""no" 1>&6
  6231 fi
  6232 
  6233     fi
  6234 fi
  6235 
  6236 #---------------------------------------------------------------------------
  6237 #	Determine which interface to use to talk to the serial port.
  6238 #	Note that #include lines must begin in leftmost column for
  6239 #	some compilers to recognize them as preprocessor directives.
  6240 #---------------------------------------------------------------------------
  6241 
  6242 
  6243     for ac_hdr in sys/modem.h
  6244 do
  6245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6247 echo "configure:6248: checking for $ac_hdr" >&5
  6248 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  6249   echo $ac_n "(cached) $ac_c" 1>&6
  6250 else
  6251   cat > conftest.$ac_ext <<EOF
  6252 #line 6253 "configure"
  6253 #include "confdefs.h"
  6254 #include <$ac_hdr>
  6255 EOF
  6256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6257 { (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6259 if test -z "$ac_err"; then
  6260   rm -rf conftest*
  6261   eval "ac_cv_header_$ac_safe=yes"
  6262 else
  6263   echo "$ac_err" >&5
  6264   echo "configure: failed program was:" >&5
  6265   cat conftest.$ac_ext >&5
  6266   rm -rf conftest*
  6267   eval "ac_cv_header_$ac_safe=no"
  6268 fi
  6269 rm -f conftest*
  6270 fi
  6271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6272   echo "$ac_t""yes" 1>&6
  6273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6274   cat >> confdefs.h <<EOF
  6275 #define $ac_tr_hdr 1
  6276 EOF
  6277  
  6278 else
  6279   echo "$ac_t""no" 1>&6
  6280 fi
  6281 done
  6282 
  6283     echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
  6284 echo "configure:6285: checking termios vs. termio vs. sgtty" >&5
  6285 if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
  6286   echo $ac_n "(cached) $ac_c" 1>&6
  6287 else
  6288   
  6289     if test "$cross_compiling" = yes; then
  6290   tcl_cv_api_serial=no
  6291 else
  6292   cat > conftest.$ac_ext <<EOF
  6293 #line 6294 "configure"
  6294 #include "confdefs.h"
  6295 
  6296 #include <termios.h>
  6297 
  6298 int main() {
  6299     struct termios t;
  6300     if (tcgetattr(0, &t) == 0) {
  6301 	cfsetospeed(&t, 0);
  6302 	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  6303 	return 0;
  6304     }
  6305     return 1;
  6306 }
  6307 EOF
  6308 if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6309 then
  6310   tcl_cv_api_serial=termios
  6311 else
  6312   echo "configure: failed program was:" >&5
  6313   cat conftest.$ac_ext >&5
  6314   rm -fr conftest*
  6315   tcl_cv_api_serial=no
  6316 fi
  6317 rm -fr conftest*
  6318 fi
  6319 
  6320     if test $tcl_cv_api_serial = no ; then
  6321 	if test "$cross_compiling" = yes; then
  6322   tcl_cv_api_serial=no
  6323 else
  6324   cat > conftest.$ac_ext <<EOF
  6325 #line 6326 "configure"
  6326 #include "confdefs.h"
  6327 
  6328 #include <termio.h>
  6329 
  6330 int main() {
  6331     struct termio t;
  6332     if (ioctl(0, TCGETA, &t) == 0) {
  6333 	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  6334 	return 0;
  6335     }
  6336     return 1;
  6337 }
  6338 EOF
  6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6340 then
  6341   tcl_cv_api_serial=termio
  6342 else
  6343   echo "configure: failed program was:" >&5
  6344   cat conftest.$ac_ext >&5
  6345   rm -fr conftest*
  6346   tcl_cv_api_serial=no
  6347 fi
  6348 rm -fr conftest*
  6349 fi
  6350 
  6351     fi
  6352     if test $tcl_cv_api_serial = no ; then
  6353 	if test "$cross_compiling" = yes; then
  6354   tcl_cv_api_serial=no
  6355 else
  6356   cat > conftest.$ac_ext <<EOF
  6357 #line 6358 "configure"
  6358 #include "confdefs.h"
  6359 
  6360 #include <sgtty.h>
  6361 
  6362 int main() {
  6363     struct sgttyb t;
  6364     if (ioctl(0, TIOCGETP, &t) == 0) {
  6365 	t.sg_ospeed = 0;
  6366 	t.sg_flags |= ODDP | EVENP | RAW;
  6367 	return 0;
  6368     }
  6369     return 1;
  6370 }
  6371 EOF
  6372 if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6373 then
  6374   tcl_cv_api_serial=sgtty
  6375 else
  6376   echo "configure: failed program was:" >&5
  6377   cat conftest.$ac_ext >&5
  6378   rm -fr conftest*
  6379   tcl_cv_api_serial=no
  6380 fi
  6381 rm -fr conftest*
  6382 fi
  6383 
  6384     fi
  6385     if test $tcl_cv_api_serial = no ; then
  6386 	if test "$cross_compiling" = yes; then
  6387   tcl_cv_api_serial=no
  6388 else
  6389   cat > conftest.$ac_ext <<EOF
  6390 #line 6391 "configure"
  6391 #include "confdefs.h"
  6392 
  6393 #include <termios.h>
  6394 #include <errno.h>
  6395 
  6396 int main() {
  6397     struct termios t;
  6398     if (tcgetattr(0, &t) == 0
  6399 	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  6400 	cfsetospeed(&t, 0);
  6401 	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  6402 	return 0;
  6403     }
  6404     return 1;
  6405 }
  6406 EOF
  6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6408 then
  6409   tcl_cv_api_serial=termios
  6410 else
  6411   echo "configure: failed program was:" >&5
  6412   cat conftest.$ac_ext >&5
  6413   rm -fr conftest*
  6414   tcl_cv_api_serial=no
  6415 fi
  6416 rm -fr conftest*
  6417 fi
  6418 
  6419     fi
  6420     if test $tcl_cv_api_serial = no; then
  6421 	if test "$cross_compiling" = yes; then
  6422   tcl_cv_api_serial=no
  6423 else
  6424   cat > conftest.$ac_ext <<EOF
  6425 #line 6426 "configure"
  6426 #include "confdefs.h"
  6427 
  6428 #include <termio.h>
  6429 #include <errno.h>
  6430 
  6431 int main() {
  6432     struct termio t;
  6433     if (ioctl(0, TCGETA, &t) == 0
  6434 	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  6435 	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  6436 	return 0;
  6437     }
  6438     return 1;
  6439     }
  6440 EOF
  6441 if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6442 then
  6443   tcl_cv_api_serial=termio
  6444 else
  6445   echo "configure: failed program was:" >&5
  6446   cat conftest.$ac_ext >&5
  6447   rm -fr conftest*
  6448   tcl_cv_api_serial=no
  6449 fi
  6450 rm -fr conftest*
  6451 fi
  6452 
  6453     fi
  6454     if test $tcl_cv_api_serial = no; then
  6455 	if test "$cross_compiling" = yes; then
  6456   tcl_cv_api_serial=none
  6457 else
  6458   cat > conftest.$ac_ext <<EOF
  6459 #line 6460 "configure"
  6460 #include "confdefs.h"
  6461 
  6462 #include <sgtty.h>
  6463 #include <errno.h>
  6464 
  6465 int main() {
  6466     struct sgttyb t;
  6467     if (ioctl(0, TIOCGETP, &t) == 0
  6468 	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  6469 	t.sg_ospeed = 0;
  6470 	t.sg_flags |= ODDP | EVENP | RAW;
  6471 	return 0;
  6472     }
  6473     return 1;
  6474 }
  6475 EOF
  6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6477 then
  6478   tcl_cv_api_serial=sgtty
  6479 else
  6480   echo "configure: failed program was:" >&5
  6481   cat conftest.$ac_ext >&5
  6482   rm -fr conftest*
  6483   tcl_cv_api_serial=none
  6484 fi
  6485 rm -fr conftest*
  6486 fi
  6487 
  6488     fi
  6489 fi
  6490 
  6491 echo "$ac_t""$tcl_cv_api_serial" 1>&6
  6492     case $tcl_cv_api_serial in
  6493 	termios) cat >> confdefs.h <<\EOF
  6494 #define USE_TERMIOS 1
  6495 EOF
  6496 ;;
  6497 	termio)  cat >> confdefs.h <<\EOF
  6498 #define USE_TERMIO 1
  6499 EOF
  6500 ;;
  6501 	sgtty)   cat >> confdefs.h <<\EOF
  6502 #define USE_SGTTY 1
  6503 EOF
  6504 ;;
  6505     esac
  6506 
  6507 
  6508 #--------------------------------------------------------------------
  6509 #	Include sys/select.h if it exists and if it supplies things
  6510 #	that appear to be useful and aren't already in sys/types.h.
  6511 #	This appears to be true only on the RS/6000 under AIX.  Some
  6512 #	systems like OSF/1 have a sys/select.h that's of no use, and
  6513 #	other systems like SCO UNIX have a sys/select.h that's
  6514 #	pernicious.  If "fd_set" isn't defined anywhere then set a
  6515 #	special flag.
  6516 #--------------------------------------------------------------------
  6517 
  6518 echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
  6519 echo "configure:6520: checking for fd_set in sys/types" >&5
  6520 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
  6521   echo $ac_n "(cached) $ac_c" 1>&6
  6522 else
  6523   
  6524     cat > conftest.$ac_ext <<EOF
  6525 #line 6526 "configure"
  6526 #include "confdefs.h"
  6527 #include <sys/types.h>
  6528 int main() {
  6529 fd_set readMask, writeMask;
  6530 ; return 0; }
  6531 EOF
  6532 if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6533   rm -rf conftest*
  6534   tcl_cv_type_fd_set=yes
  6535 else
  6536   echo "configure: failed program was:" >&5
  6537   cat conftest.$ac_ext >&5
  6538   rm -rf conftest*
  6539   tcl_cv_type_fd_set=no
  6540 fi
  6541 rm -f conftest*
  6542 fi
  6543 
  6544 echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
  6545 tcl_ok=$tcl_cv_type_fd_set
  6546 if test $tcl_ok = no; then
  6547     echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
  6548 echo "configure:6549: checking for fd_mask in sys/select" >&5
  6549 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
  6550   echo $ac_n "(cached) $ac_c" 1>&6
  6551 else
  6552   
  6553 	cat > conftest.$ac_ext <<EOF
  6554 #line 6555 "configure"
  6555 #include "confdefs.h"
  6556 #include <sys/select.h>
  6557 EOF
  6558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  6559   egrep "fd_mask" >/dev/null 2>&1; then
  6560   rm -rf conftest*
  6561   tcl_cv_grep_fd_mask=present
  6562 else
  6563   rm -rf conftest*
  6564   tcl_cv_grep_fd_mask=missing
  6565 fi
  6566 rm -f conftest*
  6567 
  6568 fi
  6569 
  6570 echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
  6571     if test $tcl_cv_grep_fd_mask = present; then
  6572 	cat >> confdefs.h <<\EOF
  6573 #define HAVE_SYS_SELECT_H 1
  6574 EOF
  6575 
  6576 	tcl_ok=yes
  6577     fi
  6578 fi
  6579 if test $tcl_ok = no; then
  6580     cat >> confdefs.h <<\EOF
  6581 #define NO_FD_SET 1
  6582 EOF
  6583 
  6584 fi
  6585 
  6586 #------------------------------------------------------------------------------
  6587 #       Find out all about time handling differences.
  6588 #------------------------------------------------------------------------------
  6589 
  6590 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  6591 echo "configure:6592: checking whether struct tm is in sys/time.h or time.h" >&5
  6592 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  6593   echo $ac_n "(cached) $ac_c" 1>&6
  6594 else
  6595   cat > conftest.$ac_ext <<EOF
  6596 #line 6597 "configure"
  6597 #include "confdefs.h"
  6598 #include <sys/types.h>
  6599 #include <time.h>
  6600 int main() {
  6601 struct tm *tp; tp->tm_sec;
  6602 ; return 0; }
  6603 EOF
  6604 if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6605   rm -rf conftest*
  6606   ac_cv_struct_tm=time.h
  6607 else
  6608   echo "configure: failed program was:" >&5
  6609   cat conftest.$ac_ext >&5
  6610   rm -rf conftest*
  6611   ac_cv_struct_tm=sys/time.h
  6612 fi
  6613 rm -f conftest*
  6614 fi
  6615 
  6616 echo "$ac_t""$ac_cv_struct_tm" 1>&6
  6617 if test $ac_cv_struct_tm = sys/time.h; then
  6618   cat >> confdefs.h <<\EOF
  6619 #define TM_IN_SYS_TIME 1
  6620 EOF
  6621 
  6622 fi
  6623 
  6624 
  6625     for ac_hdr in sys/time.h
  6626 do
  6627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  6628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  6629 echo "configure:6630: checking for $ac_hdr" >&5
  6630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  6631   echo $ac_n "(cached) $ac_c" 1>&6
  6632 else
  6633   cat > conftest.$ac_ext <<EOF
  6634 #line 6635 "configure"
  6635 #include "confdefs.h"
  6636 #include <$ac_hdr>
  6637 EOF
  6638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  6639 { (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  6640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  6641 if test -z "$ac_err"; then
  6642   rm -rf conftest*
  6643   eval "ac_cv_header_$ac_safe=yes"
  6644 else
  6645   echo "$ac_err" >&5
  6646   echo "configure: failed program was:" >&5
  6647   cat conftest.$ac_ext >&5
  6648   rm -rf conftest*
  6649   eval "ac_cv_header_$ac_safe=no"
  6650 fi
  6651 rm -f conftest*
  6652 fi
  6653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  6654   echo "$ac_t""yes" 1>&6
  6655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  6656   cat >> confdefs.h <<EOF
  6657 #define $ac_tr_hdr 1
  6658 EOF
  6659  
  6660 else
  6661   echo "$ac_t""no" 1>&6
  6662 fi
  6663 done
  6664 
  6665     echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  6666 echo "configure:6667: checking whether time.h and sys/time.h may both be included" >&5
  6667 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  6668   echo $ac_n "(cached) $ac_c" 1>&6
  6669 else
  6670   cat > conftest.$ac_ext <<EOF
  6671 #line 6672 "configure"
  6672 #include "confdefs.h"
  6673 #include <sys/types.h>
  6674 #include <sys/time.h>
  6675 #include <time.h>
  6676 int main() {
  6677 struct tm *tp;
  6678 ; return 0; }
  6679 EOF
  6680 if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6681   rm -rf conftest*
  6682   ac_cv_header_time=yes
  6683 else
  6684   echo "configure: failed program was:" >&5
  6685   cat conftest.$ac_ext >&5
  6686   rm -rf conftest*
  6687   ac_cv_header_time=no
  6688 fi
  6689 rm -f conftest*
  6690 fi
  6691 
  6692 echo "$ac_t""$ac_cv_header_time" 1>&6
  6693 if test $ac_cv_header_time = yes; then
  6694   cat >> confdefs.h <<\EOF
  6695 #define TIME_WITH_SYS_TIME 1
  6696 EOF
  6697 
  6698 fi
  6699 
  6700     echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  6701 echo "configure:6702: checking for tm_zone in struct tm" >&5
  6702 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  6703   echo $ac_n "(cached) $ac_c" 1>&6
  6704 else
  6705   cat > conftest.$ac_ext <<EOF
  6706 #line 6707 "configure"
  6707 #include "confdefs.h"
  6708 #include <sys/types.h>
  6709 #include <$ac_cv_struct_tm>
  6710 int main() {
  6711 struct tm tm; tm.tm_zone;
  6712 ; return 0; }
  6713 EOF
  6714 if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6715   rm -rf conftest*
  6716   ac_cv_struct_tm_zone=yes
  6717 else
  6718   echo "configure: failed program was:" >&5
  6719   cat conftest.$ac_ext >&5
  6720   rm -rf conftest*
  6721   ac_cv_struct_tm_zone=no
  6722 fi
  6723 rm -f conftest*
  6724 fi
  6725 
  6726 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  6727 if test "$ac_cv_struct_tm_zone" = yes; then
  6728   cat >> confdefs.h <<\EOF
  6729 #define HAVE_TM_ZONE 1
  6730 EOF
  6731 
  6732 else
  6733   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  6734 echo "configure:6735: checking for tzname" >&5
  6735 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  6736   echo $ac_n "(cached) $ac_c" 1>&6
  6737 else
  6738   cat > conftest.$ac_ext <<EOF
  6739 #line 6740 "configure"
  6740 #include "confdefs.h"
  6741 #include <time.h>
  6742 #ifndef tzname /* For SGI.  */
  6743 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  6744 #endif
  6745 int main() {
  6746 atoi(*tzname);
  6747 ; return 0; }
  6748 EOF
  6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6750   rm -rf conftest*
  6751   ac_cv_var_tzname=yes
  6752 else
  6753   echo "configure: failed program was:" >&5
  6754   cat conftest.$ac_ext >&5
  6755   rm -rf conftest*
  6756   ac_cv_var_tzname=no
  6757 fi
  6758 rm -f conftest*
  6759 fi
  6760 
  6761 echo "$ac_t""$ac_cv_var_tzname" 1>&6
  6762   if test $ac_cv_var_tzname = yes; then
  6763     cat >> confdefs.h <<\EOF
  6764 #define HAVE_TZNAME 1
  6765 EOF
  6766 
  6767   fi
  6768 fi
  6769 
  6770 
  6771     for ac_func in gmtime_r localtime_r
  6772 do
  6773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  6774 echo "configure:6775: checking for $ac_func" >&5
  6775 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  6776   echo $ac_n "(cached) $ac_c" 1>&6
  6777 else
  6778   cat > conftest.$ac_ext <<EOF
  6779 #line 6780 "configure"
  6780 #include "confdefs.h"
  6781 /* System header to define __stub macros and hopefully few prototypes,
  6782     which can conflict with char $ac_func(); below.  */
  6783 #include <assert.h>
  6784 /* Override any gcc2 internal prototype to avoid an error.  */
  6785 /* We use char because int might match the return type of a gcc2
  6786     builtin and then its argument prototype would still apply.  */
  6787 char $ac_func();
  6788 
  6789 int main() {
  6790 
  6791 /* The GNU C library defines this for functions which it implements
  6792     to always fail with ENOSYS.  Some functions are actually named
  6793     something starting with __ and the normal name is an alias.  */
  6794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  6795 choke me
  6796 #else
  6797 $ac_func();
  6798 #endif
  6799 
  6800 ; return 0; }
  6801 EOF
  6802 if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6803   rm -rf conftest*
  6804   eval "ac_cv_func_$ac_func=yes"
  6805 else
  6806   echo "configure: failed program was:" >&5
  6807   cat conftest.$ac_ext >&5
  6808   rm -rf conftest*
  6809   eval "ac_cv_func_$ac_func=no"
  6810 fi
  6811 rm -f conftest*
  6812 fi
  6813 
  6814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  6815   echo "$ac_t""yes" 1>&6
  6816     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  6817   cat >> confdefs.h <<EOF
  6818 #define $ac_tr_func 1
  6819 EOF
  6820  
  6821 else
  6822   echo "$ac_t""no" 1>&6
  6823 fi
  6824 done
  6825 
  6826 
  6827     echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
  6828 echo "configure:6829: checking tm_tzadj in struct tm" >&5
  6829 if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
  6830   echo $ac_n "(cached) $ac_c" 1>&6
  6831 else
  6832   
  6833 	cat > conftest.$ac_ext <<EOF
  6834 #line 6835 "configure"
  6835 #include "confdefs.h"
  6836 #include <time.h>
  6837 int main() {
  6838 struct tm tm; tm.tm_tzadj;
  6839 ; return 0; }
  6840 EOF
  6841 if { (eval echo configure:6842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6842   rm -rf conftest*
  6843   tcl_cv_member_tm_tzadj=yes
  6844 else
  6845   echo "configure: failed program was:" >&5
  6846   cat conftest.$ac_ext >&5
  6847   rm -rf conftest*
  6848   tcl_cv_member_tm_tzadj=no
  6849 fi
  6850 rm -f conftest*
  6851 fi
  6852 
  6853 echo "$ac_t""$tcl_cv_member_tm_tzadj" 1>&6
  6854     if test $tcl_cv_member_tm_tzadj = yes ; then
  6855 	cat >> confdefs.h <<\EOF
  6856 #define HAVE_TM_TZADJ 1
  6857 EOF
  6858 
  6859     fi
  6860 
  6861     echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
  6862 echo "configure:6863: checking tm_gmtoff in struct tm" >&5
  6863 if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
  6864   echo $ac_n "(cached) $ac_c" 1>&6
  6865 else
  6866   
  6867 	cat > conftest.$ac_ext <<EOF
  6868 #line 6869 "configure"
  6869 #include "confdefs.h"
  6870 #include <time.h>
  6871 int main() {
  6872 struct tm tm; tm.tm_gmtoff;
  6873 ; return 0; }
  6874 EOF
  6875 if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6876   rm -rf conftest*
  6877   tcl_cv_member_tm_gmtoff=yes
  6878 else
  6879   echo "configure: failed program was:" >&5
  6880   cat conftest.$ac_ext >&5
  6881   rm -rf conftest*
  6882   tcl_cv_member_tm_gmtoff=no
  6883 fi
  6884 rm -f conftest*
  6885 fi
  6886 
  6887 echo "$ac_t""$tcl_cv_member_tm_gmtoff" 1>&6
  6888     if test $tcl_cv_member_tm_gmtoff = yes ; then
  6889 	cat >> confdefs.h <<\EOF
  6890 #define HAVE_TM_GMTOFF 1
  6891 EOF
  6892 
  6893     fi
  6894 
  6895     #
  6896     # Its important to include time.h in this check, as some systems
  6897     # (like convex) have timezone functions, etc.
  6898     #
  6899     echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
  6900 echo "configure:6901: checking long timezone variable" >&5
  6901 if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then
  6902   echo $ac_n "(cached) $ac_c" 1>&6
  6903 else
  6904   
  6905 	cat > conftest.$ac_ext <<EOF
  6906 #line 6907 "configure"
  6907 #include "confdefs.h"
  6908 #include <time.h>
  6909 int main() {
  6910 extern long timezone;
  6911 	    timezone += 1;
  6912 	    exit (0);
  6913 ; return 0; }
  6914 EOF
  6915 if { (eval echo configure:6916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6916   rm -rf conftest*
  6917   tcl_cv_timezone_long=yes
  6918 else
  6919   echo "configure: failed program was:" >&5
  6920   cat conftest.$ac_ext >&5
  6921   rm -rf conftest*
  6922   tcl_cv_timezone_long=no
  6923 fi
  6924 rm -f conftest*
  6925 fi
  6926 
  6927 echo "$ac_t""$tcl_cv_timezone_long" 1>&6
  6928     if test $tcl_cv_timezone_long = yes ; then
  6929 	cat >> confdefs.h <<\EOF
  6930 #define HAVE_TIMEZONE_VAR 1
  6931 EOF
  6932 
  6933     else
  6934 	#
  6935 	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
  6936 	#
  6937 	echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
  6938 echo "configure:6939: checking time_t timezone variable" >&5
  6939 if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
  6940   echo $ac_n "(cached) $ac_c" 1>&6
  6941 else
  6942   
  6943 	    cat > conftest.$ac_ext <<EOF
  6944 #line 6945 "configure"
  6945 #include "confdefs.h"
  6946 #include <time.h>
  6947 int main() {
  6948 extern time_t timezone;
  6949 		timezone += 1;
  6950 		exit (0);
  6951 ; return 0; }
  6952 EOF
  6953 if { (eval echo configure:6954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6954   rm -rf conftest*
  6955   tcl_cv_timezone_time=yes
  6956 else
  6957   echo "configure: failed program was:" >&5
  6958   cat conftest.$ac_ext >&5
  6959   rm -rf conftest*
  6960   tcl_cv_timezone_time=no
  6961 fi
  6962 rm -f conftest*
  6963 fi
  6964 
  6965 echo "$ac_t""$tcl_cv_timezone_time" 1>&6
  6966 	if test $tcl_cv_timezone_time = yes ; then
  6967 	    cat >> confdefs.h <<\EOF
  6968 #define HAVE_TIMEZONE_VAR 1
  6969 EOF
  6970 
  6971 	fi
  6972     fi
  6973 
  6974 
  6975 #--------------------------------------------------------------------
  6976 #	Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
  6977 #	in struct stat.  But we might be able to use fstatfs instead.
  6978 #--------------------------------------------------------------------
  6979 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  6980 echo "configure:6981: checking for st_blksize in struct stat" >&5
  6981 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  6982   echo $ac_n "(cached) $ac_c" 1>&6
  6983 else
  6984   cat > conftest.$ac_ext <<EOF
  6985 #line 6986 "configure"
  6986 #include "confdefs.h"
  6987 #include <sys/types.h>
  6988 #include <sys/stat.h>
  6989 int main() {
  6990 struct stat s; s.st_blksize;
  6991 ; return 0; }
  6992 EOF
  6993 if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6994   rm -rf conftest*
  6995   ac_cv_struct_st_blksize=yes
  6996 else
  6997   echo "configure: failed program was:" >&5
  6998   cat conftest.$ac_ext >&5
  6999   rm -rf conftest*
  7000   ac_cv_struct_st_blksize=no
  7001 fi
  7002 rm -f conftest*
  7003 fi
  7004 
  7005 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  7006 if test $ac_cv_struct_st_blksize = yes; then
  7007   cat >> confdefs.h <<\EOF
  7008 #define HAVE_ST_BLKSIZE 1
  7009 EOF
  7010 
  7011 fi
  7012 
  7013 echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
  7014 echo "configure:7015: checking for fstatfs" >&5
  7015 if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
  7016   echo $ac_n "(cached) $ac_c" 1>&6
  7017 else
  7018   cat > conftest.$ac_ext <<EOF
  7019 #line 7020 "configure"
  7020 #include "confdefs.h"
  7021 /* System header to define __stub macros and hopefully few prototypes,
  7022     which can conflict with char fstatfs(); below.  */
  7023 #include <assert.h>
  7024 /* Override any gcc2 internal prototype to avoid an error.  */
  7025 /* We use char because int might match the return type of a gcc2
  7026     builtin and then its argument prototype would still apply.  */
  7027 char fstatfs();
  7028 
  7029 int main() {
  7030 
  7031 /* The GNU C library defines this for functions which it implements
  7032     to always fail with ENOSYS.  Some functions are actually named
  7033     something starting with __ and the normal name is an alias.  */
  7034 #if defined (__stub_fstatfs) || defined (__stub___fstatfs)
  7035 choke me
  7036 #else
  7037 fstatfs();
  7038 #endif
  7039 
  7040 ; return 0; }
  7041 EOF
  7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7043   rm -rf conftest*
  7044   eval "ac_cv_func_fstatfs=yes"
  7045 else
  7046   echo "configure: failed program was:" >&5
  7047   cat conftest.$ac_ext >&5
  7048   rm -rf conftest*
  7049   eval "ac_cv_func_fstatfs=no"
  7050 fi
  7051 rm -f conftest*
  7052 fi
  7053 
  7054 if eval "test \"`echo '$ac_cv_func_'fstatfs`\" = yes"; then
  7055   echo "$ac_t""yes" 1>&6
  7056   :
  7057 else
  7058   echo "$ac_t""no" 1>&6
  7059 cat >> confdefs.h <<\EOF
  7060 #define NO_FSTATFS 1
  7061 EOF
  7062 
  7063 fi
  7064 
  7065 
  7066 #--------------------------------------------------------------------
  7067 #       Some system have no memcmp or it does not work with 8 bit
  7068 #       data, this checks it and add memcmp.o to LIBOBJS if needed
  7069 #--------------------------------------------------------------------
  7070 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  7071 echo "configure:7072: checking for 8-bit clean memcmp" >&5
  7072 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  7073   echo $ac_n "(cached) $ac_c" 1>&6
  7074 else
  7075   if test "$cross_compiling" = yes; then
  7076   ac_cv_func_memcmp_clean=no
  7077 else
  7078   cat > conftest.$ac_ext <<EOF
  7079 #line 7080 "configure"
  7080 #include "confdefs.h"
  7081 
  7082 main()
  7083 {
  7084   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  7085   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  7086 }
  7087 
  7088 EOF
  7089 if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7090 then
  7091   ac_cv_func_memcmp_clean=yes
  7092 else
  7093   echo "configure: failed program was:" >&5
  7094   cat conftest.$ac_ext >&5
  7095   rm -fr conftest*
  7096   ac_cv_func_memcmp_clean=no
  7097 fi
  7098 rm -fr conftest*
  7099 fi
  7100 
  7101 fi
  7102 
  7103 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  7104 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
  7105 
  7106 
  7107 #--------------------------------------------------------------------
  7108 #       Some system like SunOS 4 and other BSD like systems
  7109 #       have no memmove (we assume they have bcopy instead).
  7110 #       {The replacement define is in compat/string.h}
  7111 #--------------------------------------------------------------------
  7112 echo $ac_n "checking for memmove""... $ac_c" 1>&6
  7113 echo "configure:7114: checking for memmove" >&5
  7114 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
  7115   echo $ac_n "(cached) $ac_c" 1>&6
  7116 else
  7117   cat > conftest.$ac_ext <<EOF
  7118 #line 7119 "configure"
  7119 #include "confdefs.h"
  7120 /* System header to define __stub macros and hopefully few prototypes,
  7121     which can conflict with char memmove(); below.  */
  7122 #include <assert.h>
  7123 /* Override any gcc2 internal prototype to avoid an error.  */
  7124 /* We use char because int might match the return type of a gcc2
  7125     builtin and then its argument prototype would still apply.  */
  7126 char memmove();
  7127 
  7128 int main() {
  7129 
  7130 /* The GNU C library defines this for functions which it implements
  7131     to always fail with ENOSYS.  Some functions are actually named
  7132     something starting with __ and the normal name is an alias.  */
  7133 #if defined (__stub_memmove) || defined (__stub___memmove)
  7134 choke me
  7135 #else
  7136 memmove();
  7137 #endif
  7138 
  7139 ; return 0; }
  7140 EOF
  7141 if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7142   rm -rf conftest*
  7143   eval "ac_cv_func_memmove=yes"
  7144 else
  7145   echo "configure: failed program was:" >&5
  7146   cat conftest.$ac_ext >&5
  7147   rm -rf conftest*
  7148   eval "ac_cv_func_memmove=no"
  7149 fi
  7150 rm -f conftest*
  7151 fi
  7152 
  7153 if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
  7154   echo "$ac_t""yes" 1>&6
  7155   :
  7156 else
  7157   echo "$ac_t""no" 1>&6
  7158 cat >> confdefs.h <<\EOF
  7159 #define NO_MEMMOVE 1
  7160 EOF
  7161  cat >> confdefs.h <<\EOF
  7162 #define NO_STRING_H 1
  7163 EOF
  7164 
  7165 fi
  7166 
  7167 
  7168 #--------------------------------------------------------------------
  7169 #	On some systems strstr is broken: it returns a pointer even
  7170 #	even if the original string is empty.
  7171 #--------------------------------------------------------------------
  7172 if test "x${ac_cv_func_strstr}" = "xyes"; then
  7173     echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
  7174 echo "configure:7175: checking proper strstr implementation" >&5
  7175 if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then
  7176   echo $ac_n "(cached) $ac_c" 1>&6
  7177 else
  7178   
  7179 	if test "$cross_compiling" = yes; then
  7180   tcl_cv_strstr_unbroken=broken
  7181 else
  7182   cat > conftest.$ac_ext <<EOF
  7183 #line 7184 "configure"
  7184 #include "confdefs.h"
  7185 
  7186 	extern int strstr();
  7187 	int main()
  7188 	{
  7189 	    exit(strstr("\0test", "test") ? 1 : 0);
  7190 	}
  7191 EOF
  7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7193 then
  7194   tcl_cv_strstr_unbroken=ok
  7195 else
  7196   echo "configure: failed program was:" >&5
  7197   cat conftest.$ac_ext >&5
  7198   rm -fr conftest*
  7199   tcl_cv_strstr_unbroken=broken
  7200 fi
  7201 rm -fr conftest*
  7202 fi
  7203 
  7204 fi
  7205 
  7206 echo "$ac_t""$tcl_cv_strstr_unbroken" 1>&6
  7207     if test $tcl_cv_strstr_unbroken = broken; then
  7208         LIBOBJS="$LIBOBJS strstr.o"
  7209     fi
  7210 fi
  7211 
  7212 #--------------------------------------------------------------------
  7213 #	Check for strtoul function.  This is tricky because under some
  7214 #	versions of AIX strtoul returns an incorrect terminator
  7215 #	pointer for the string "0".
  7216 #--------------------------------------------------------------------
  7217 
  7218 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
  7219 echo "configure:7220: checking for strtoul" >&5
  7220 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
  7221   echo $ac_n "(cached) $ac_c" 1>&6
  7222 else
  7223   cat > conftest.$ac_ext <<EOF
  7224 #line 7225 "configure"
  7225 #include "confdefs.h"
  7226 /* System header to define __stub macros and hopefully few prototypes,
  7227     which can conflict with char strtoul(); below.  */
  7228 #include <assert.h>
  7229 /* Override any gcc2 internal prototype to avoid an error.  */
  7230 /* We use char because int might match the return type of a gcc2
  7231     builtin and then its argument prototype would still apply.  */
  7232 char strtoul();
  7233 
  7234 int main() {
  7235 
  7236 /* The GNU C library defines this for functions which it implements
  7237     to always fail with ENOSYS.  Some functions are actually named
  7238     something starting with __ and the normal name is an alias.  */
  7239 #if defined (__stub_strtoul) || defined (__stub___strtoul)
  7240 choke me
  7241 #else
  7242 strtoul();
  7243 #endif
  7244 
  7245 ; return 0; }
  7246 EOF
  7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7248   rm -rf conftest*
  7249   eval "ac_cv_func_strtoul=yes"
  7250 else
  7251   echo "configure: failed program was:" >&5
  7252   cat conftest.$ac_ext >&5
  7253   rm -rf conftest*
  7254   eval "ac_cv_func_strtoul=no"
  7255 fi
  7256 rm -f conftest*
  7257 fi
  7258 
  7259 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
  7260   echo "$ac_t""yes" 1>&6
  7261   tcl_ok=1
  7262 else
  7263   echo "$ac_t""no" 1>&6
  7264 tcl_ok=0
  7265 fi
  7266 
  7267 if test $tcl_ok = 1; then
  7268     echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6
  7269 echo "configure:7270: checking proper strtoul implementation" >&5
  7270 if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then
  7271   echo $ac_n "(cached) $ac_c" 1>&6
  7272 else
  7273   
  7274 	if test "$cross_compiling" = yes; then
  7275   tcl_cv_strtoul_unbroken=broken
  7276 else
  7277   cat > conftest.$ac_ext <<EOF
  7278 #line 7279 "configure"
  7279 #include "confdefs.h"
  7280 
  7281 	extern int strtoul();
  7282 	int main()
  7283 	{
  7284 	    char *string = "0";
  7285 	    char *term;
  7286 	    int value;
  7287 	    value = strtoul(string, &term, 0);
  7288 	    if ((value != 0) || (term != (string+1))) {
  7289 		exit(1);
  7290 	    }
  7291 	    exit(0);
  7292 	}
  7293 EOF
  7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7295 then
  7296   tcl_cv_strtoul_unbroken=ok 
  7297 else
  7298   echo "configure: failed program was:" >&5
  7299   cat conftest.$ac_ext >&5
  7300   rm -fr conftest*
  7301   tcl_cv_strtoul_unbroken=broken
  7302 fi
  7303 rm -fr conftest*
  7304 fi
  7305 
  7306 fi
  7307 
  7308 echo "$ac_t""$tcl_cv_strtoul_unbroken" 1>&6
  7309     if test $tcl_cv_strtoul_unbroken = broken; then
  7310 	tcl_ok=0
  7311     fi
  7312 fi
  7313 if test $tcl_ok = 0; then
  7314     LIBOBJS="$LIBOBJS strtoul.o"
  7315 fi
  7316 
  7317 #--------------------------------------------------------------------
  7318 #	Check for the strtod function.  This is tricky because in some
  7319 #	versions of Linux strtod mis-parses strings starting with "+".
  7320 #--------------------------------------------------------------------
  7321 
  7322 echo $ac_n "checking for strtod""... $ac_c" 1>&6
  7323 echo "configure:7324: checking for strtod" >&5
  7324 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  7325   echo $ac_n "(cached) $ac_c" 1>&6
  7326 else
  7327   cat > conftest.$ac_ext <<EOF
  7328 #line 7329 "configure"
  7329 #include "confdefs.h"
  7330 /* System header to define __stub macros and hopefully few prototypes,
  7331     which can conflict with char strtod(); below.  */
  7332 #include <assert.h>
  7333 /* Override any gcc2 internal prototype to avoid an error.  */
  7334 /* We use char because int might match the return type of a gcc2
  7335     builtin and then its argument prototype would still apply.  */
  7336 char strtod();
  7337 
  7338 int main() {
  7339 
  7340 /* The GNU C library defines this for functions which it implements
  7341     to always fail with ENOSYS.  Some functions are actually named
  7342     something starting with __ and the normal name is an alias.  */
  7343 #if defined (__stub_strtod) || defined (__stub___strtod)
  7344 choke me
  7345 #else
  7346 strtod();
  7347 #endif
  7348 
  7349 ; return 0; }
  7350 EOF
  7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7352   rm -rf conftest*
  7353   eval "ac_cv_func_strtod=yes"
  7354 else
  7355   echo "configure: failed program was:" >&5
  7356   cat conftest.$ac_ext >&5
  7357   rm -rf conftest*
  7358   eval "ac_cv_func_strtod=no"
  7359 fi
  7360 rm -f conftest*
  7361 fi
  7362 
  7363 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  7364   echo "$ac_t""yes" 1>&6
  7365   tcl_ok=1
  7366 else
  7367   echo "$ac_t""no" 1>&6
  7368 tcl_ok=0
  7369 fi
  7370 
  7371 if test $tcl_ok = 1; then
  7372     echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6
  7373 echo "configure:7374: checking proper strtod implementation" >&5
  7374 if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then
  7375   echo $ac_n "(cached) $ac_c" 1>&6
  7376 else
  7377   
  7378 	if test "$cross_compiling" = yes; then
  7379   tcl_cv_strtod_unbroken=broken
  7380 else
  7381   cat > conftest.$ac_ext <<EOF
  7382 #line 7383 "configure"
  7383 #include "confdefs.h"
  7384 
  7385 	extern double strtod();
  7386 	int main()
  7387 	{
  7388 	    char *string = " +69";
  7389 	    char *term;
  7390 	    double value;
  7391 	    value = strtod(string, &term);
  7392 	    if ((value != 69) || (term != (string+4))) {
  7393 		exit(1);
  7394 	    }
  7395 	    exit(0);
  7396 	}
  7397 EOF
  7398 if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7399 then
  7400   tcl_cv_strtod_unbroken=ok 
  7401 else
  7402   echo "configure: failed program was:" >&5
  7403   cat conftest.$ac_ext >&5
  7404   rm -fr conftest*
  7405   tcl_cv_strtod_unbroken=broken
  7406 fi
  7407 rm -fr conftest*
  7408 fi
  7409 
  7410 fi
  7411 
  7412 echo "$ac_t""$tcl_cv_strtod_unbroken" 1>&6
  7413     if test $tcl_cv_strtod_unbroken = broken; then
  7414 	tcl_ok=0
  7415     fi
  7416 fi
  7417 if test $tcl_ok = 0; then
  7418     LIBOBJS="$LIBOBJS strtod.o"
  7419 fi
  7420 
  7421 #--------------------------------------------------------------------
  7422 #	Under Solaris 2.4, strtod returns the wrong value for the
  7423 #	terminating character under some conditions.  Check for this
  7424 #	and if the problem exists use a substitute procedure
  7425 #	"fixstrtod" that corrects the error.
  7426 #--------------------------------------------------------------------
  7427 
  7428 
  7429     echo $ac_n "checking for strtod""... $ac_c" 1>&6
  7430 echo "configure:7431: checking for strtod" >&5
  7431 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  7432   echo $ac_n "(cached) $ac_c" 1>&6
  7433 else
  7434   cat > conftest.$ac_ext <<EOF
  7435 #line 7436 "configure"
  7436 #include "confdefs.h"
  7437 /* System header to define __stub macros and hopefully few prototypes,
  7438     which can conflict with char strtod(); below.  */
  7439 #include <assert.h>
  7440 /* Override any gcc2 internal prototype to avoid an error.  */
  7441 /* We use char because int might match the return type of a gcc2
  7442     builtin and then its argument prototype would still apply.  */
  7443 char strtod();
  7444 
  7445 int main() {
  7446 
  7447 /* The GNU C library defines this for functions which it implements
  7448     to always fail with ENOSYS.  Some functions are actually named
  7449     something starting with __ and the normal name is an alias.  */
  7450 #if defined (__stub_strtod) || defined (__stub___strtod)
  7451 choke me
  7452 #else
  7453 strtod();
  7454 #endif
  7455 
  7456 ; return 0; }
  7457 EOF
  7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7459   rm -rf conftest*
  7460   eval "ac_cv_func_strtod=yes"
  7461 else
  7462   echo "configure: failed program was:" >&5
  7463   cat conftest.$ac_ext >&5
  7464   rm -rf conftest*
  7465   eval "ac_cv_func_strtod=no"
  7466 fi
  7467 rm -f conftest*
  7468 fi
  7469 
  7470 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  7471   echo "$ac_t""yes" 1>&6
  7472   tcl_strtod=1
  7473 else
  7474   echo "$ac_t""no" 1>&6
  7475 tcl_strtod=0
  7476 fi
  7477 
  7478     if test "$tcl_strtod" = 1; then
  7479 	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
  7480 echo "configure:7481: checking for Solaris2.4/Tru64 strtod bugs" >&5
  7481 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
  7482   echo $ac_n "(cached) $ac_c" 1>&6
  7483 else
  7484   
  7485 	    if test "$cross_compiling" = yes; then
  7486   tcl_cv_strtod_buggy=buggy
  7487 else
  7488   cat > conftest.$ac_ext <<EOF
  7489 #line 7490 "configure"
  7490 #include "confdefs.h"
  7491 
  7492 		extern double strtod();
  7493 		int main() {
  7494 		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
  7495 		    char *term;
  7496 		    double value;
  7497 		    value = strtod(infString, &term);
  7498 		    if ((term != infString) && (term[-1] == 0)) {
  7499 			exit(1);
  7500 		    }
  7501 		    value = strtod(nanString, &term);
  7502 		    if ((term != nanString) && (term[-1] == 0)) {
  7503 			exit(1);
  7504 		    }
  7505 		    value = strtod(spaceString, &term);
  7506 		    if (term == (spaceString+1)) {
  7507 			exit(1);
  7508 		    }
  7509 		    exit(0);
  7510 		}
  7511 EOF
  7512 if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7513 then
  7514   tcl_cv_strtod_buggy=ok
  7515 else
  7516   echo "configure: failed program was:" >&5
  7517   cat conftest.$ac_ext >&5
  7518   rm -fr conftest*
  7519   tcl_cv_strtod_buggy=buggy
  7520 fi
  7521 rm -fr conftest*
  7522 fi
  7523 
  7524 fi
  7525 
  7526 echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6
  7527 	if test "$tcl_cv_strtod_buggy" = buggy; then
  7528 	    LIBOBJS="$LIBOBJS fixstrtod.o"
  7529 	    cat >> confdefs.h <<\EOF
  7530 #define strtod fixstrtod
  7531 EOF
  7532 
  7533 	fi
  7534     fi
  7535 
  7536 
  7537 #--------------------------------------------------------------------
  7538 #	Check for various typedefs and provide substitutes if
  7539 #	they don't exist.
  7540 #--------------------------------------------------------------------
  7541 
  7542 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  7543 echo "configure:7544: checking for ANSI C header files" >&5
  7544 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  7545   echo $ac_n "(cached) $ac_c" 1>&6
  7546 else
  7547   cat > conftest.$ac_ext <<EOF
  7548 #line 7549 "configure"
  7549 #include "confdefs.h"
  7550 #include <stdlib.h>
  7551 #include <stdarg.h>
  7552 #include <string.h>
  7553 #include <float.h>
  7554 EOF
  7555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7556 { (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7558 if test -z "$ac_err"; then
  7559   rm -rf conftest*
  7560   ac_cv_header_stdc=yes
  7561 else
  7562   echo "$ac_err" >&5
  7563   echo "configure: failed program was:" >&5
  7564   cat conftest.$ac_ext >&5
  7565   rm -rf conftest*
  7566   ac_cv_header_stdc=no
  7567 fi
  7568 rm -f conftest*
  7569 
  7570 if test $ac_cv_header_stdc = yes; then
  7571   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  7572 cat > conftest.$ac_ext <<EOF
  7573 #line 7574 "configure"
  7574 #include "confdefs.h"
  7575 #include <string.h>
  7576 EOF
  7577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7578   egrep "memchr" >/dev/null 2>&1; then
  7579   :
  7580 else
  7581   rm -rf conftest*
  7582   ac_cv_header_stdc=no
  7583 fi
  7584 rm -f conftest*
  7585 
  7586 fi
  7587 
  7588 if test $ac_cv_header_stdc = yes; then
  7589   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  7590 cat > conftest.$ac_ext <<EOF
  7591 #line 7592 "configure"
  7592 #include "confdefs.h"
  7593 #include <stdlib.h>
  7594 EOF
  7595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7596   egrep "free" >/dev/null 2>&1; then
  7597   :
  7598 else
  7599   rm -rf conftest*
  7600   ac_cv_header_stdc=no
  7601 fi
  7602 rm -f conftest*
  7603 
  7604 fi
  7605 
  7606 if test $ac_cv_header_stdc = yes; then
  7607   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  7608 if test "$cross_compiling" = yes; then
  7609   :
  7610 else
  7611   cat > conftest.$ac_ext <<EOF
  7612 #line 7613 "configure"
  7613 #include "confdefs.h"
  7614 #include <ctype.h>
  7615 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  7616 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  7617 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  7618 int main () { int i; for (i = 0; i < 256; i++)
  7619 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  7620 exit (0); }
  7621 
  7622 EOF
  7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7624 then
  7625   :
  7626 else
  7627   echo "configure: failed program was:" >&5
  7628   cat conftest.$ac_ext >&5
  7629   rm -fr conftest*
  7630   ac_cv_header_stdc=no
  7631 fi
  7632 rm -fr conftest*
  7633 fi
  7634 
  7635 fi
  7636 fi
  7637 
  7638 echo "$ac_t""$ac_cv_header_stdc" 1>&6
  7639 if test $ac_cv_header_stdc = yes; then
  7640   cat >> confdefs.h <<\EOF
  7641 #define STDC_HEADERS 1
  7642 EOF
  7643 
  7644 fi
  7645 
  7646 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  7647 echo "configure:7648: checking for mode_t" >&5
  7648 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  7649   echo $ac_n "(cached) $ac_c" 1>&6
  7650 else
  7651   cat > conftest.$ac_ext <<EOF
  7652 #line 7653 "configure"
  7653 #include "confdefs.h"
  7654 #include <sys/types.h>
  7655 #if STDC_HEADERS
  7656 #include <stdlib.h>
  7657 #include <stddef.h>
  7658 #endif
  7659 EOF
  7660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7661   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7662   rm -rf conftest*
  7663   ac_cv_type_mode_t=yes
  7664 else
  7665   rm -rf conftest*
  7666   ac_cv_type_mode_t=no
  7667 fi
  7668 rm -f conftest*
  7669 
  7670 fi
  7671 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  7672 if test $ac_cv_type_mode_t = no; then
  7673   cat >> confdefs.h <<\EOF
  7674 #define mode_t int
  7675 EOF
  7676 
  7677 fi
  7678 
  7679 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  7680 echo "configure:7681: checking for pid_t" >&5
  7681 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  7682   echo $ac_n "(cached) $ac_c" 1>&6
  7683 else
  7684   cat > conftest.$ac_ext <<EOF
  7685 #line 7686 "configure"
  7686 #include "confdefs.h"
  7687 #include <sys/types.h>
  7688 #if STDC_HEADERS
  7689 #include <stdlib.h>
  7690 #include <stddef.h>
  7691 #endif
  7692 EOF
  7693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7694   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7695   rm -rf conftest*
  7696   ac_cv_type_pid_t=yes
  7697 else
  7698   rm -rf conftest*
  7699   ac_cv_type_pid_t=no
  7700 fi
  7701 rm -f conftest*
  7702 
  7703 fi
  7704 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  7705 if test $ac_cv_type_pid_t = no; then
  7706   cat >> confdefs.h <<\EOF
  7707 #define pid_t int
  7708 EOF
  7709 
  7710 fi
  7711 
  7712 echo $ac_n "checking for size_t""... $ac_c" 1>&6
  7713 echo "configure:7714: checking for size_t" >&5
  7714 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  7715   echo $ac_n "(cached) $ac_c" 1>&6
  7716 else
  7717   cat > conftest.$ac_ext <<EOF
  7718 #line 7719 "configure"
  7719 #include "confdefs.h"
  7720 #include <sys/types.h>
  7721 #if STDC_HEADERS
  7722 #include <stdlib.h>
  7723 #include <stddef.h>
  7724 #endif
  7725 EOF
  7726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7727   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7728   rm -rf conftest*
  7729   ac_cv_type_size_t=yes
  7730 else
  7731   rm -rf conftest*
  7732   ac_cv_type_size_t=no
  7733 fi
  7734 rm -f conftest*
  7735 
  7736 fi
  7737 echo "$ac_t""$ac_cv_type_size_t" 1>&6
  7738 if test $ac_cv_type_size_t = no; then
  7739   cat >> confdefs.h <<\EOF
  7740 #define size_t unsigned
  7741 EOF
  7742 
  7743 fi
  7744 
  7745 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  7746 echo "configure:7747: checking for uid_t in sys/types.h" >&5
  7747 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  7748   echo $ac_n "(cached) $ac_c" 1>&6
  7749 else
  7750   cat > conftest.$ac_ext <<EOF
  7751 #line 7752 "configure"
  7752 #include "confdefs.h"
  7753 #include <sys/types.h>
  7754 EOF
  7755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7756   egrep "uid_t" >/dev/null 2>&1; then
  7757   rm -rf conftest*
  7758   ac_cv_type_uid_t=yes
  7759 else
  7760   rm -rf conftest*
  7761   ac_cv_type_uid_t=no
  7762 fi
  7763 rm -f conftest*
  7764 
  7765 fi
  7766 
  7767 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  7768 if test $ac_cv_type_uid_t = no; then
  7769   cat >> confdefs.h <<\EOF
  7770 #define uid_t int
  7771 EOF
  7772 
  7773   cat >> confdefs.h <<\EOF
  7774 #define gid_t int
  7775 EOF
  7776 
  7777 fi
  7778 
  7779 
  7780 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
  7781 echo "configure:7782: checking for socklen_t" >&5
  7782 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
  7783   echo $ac_n "(cached) $ac_c" 1>&6
  7784 else
  7785   
  7786     cat > conftest.$ac_ext <<EOF
  7787 #line 7788 "configure"
  7788 #include "confdefs.h"
  7789 
  7790     #include <sys/types.h>
  7791     #include <sys/socket.h>
  7792     #if STDC_HEADERS
  7793     #include <stdlib.h>
  7794     #include <stddef.h>
  7795     #endif
  7796     
  7797 EOF
  7798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7799   egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7800   rm -rf conftest*
  7801   ac_cv_type_socklen_t=yes
  7802 else
  7803   rm -rf conftest*
  7804   ac_cv_type_socklen_t=no
  7805 fi
  7806 rm -f conftest*
  7807 
  7808 fi
  7809 
  7810 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
  7811 if test $ac_cv_type_socklen_t = no; then
  7812     cat >> confdefs.h <<\EOF
  7813 #define socklen_t unsigned
  7814 EOF
  7815 
  7816 fi
  7817 
  7818 #--------------------------------------------------------------------
  7819 #	If a system doesn't have an opendir function (man, that's old!)
  7820 #	then we have to supply a different version of dirent.h which
  7821 #	is compatible with the substitute version of opendir that's
  7822 #	provided.  This version only works with V7-style directories.
  7823 #--------------------------------------------------------------------
  7824 
  7825 echo $ac_n "checking for opendir""... $ac_c" 1>&6
  7826 echo "configure:7827: checking for opendir" >&5
  7827 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
  7828   echo $ac_n "(cached) $ac_c" 1>&6
  7829 else
  7830   cat > conftest.$ac_ext <<EOF
  7831 #line 7832 "configure"
  7832 #include "confdefs.h"
  7833 /* System header to define __stub macros and hopefully few prototypes,
  7834     which can conflict with char opendir(); below.  */
  7835 #include <assert.h>
  7836 /* Override any gcc2 internal prototype to avoid an error.  */
  7837 /* We use char because int might match the return type of a gcc2
  7838     builtin and then its argument prototype would still apply.  */
  7839 char opendir();
  7840 
  7841 int main() {
  7842 
  7843 /* The GNU C library defines this for functions which it implements
  7844     to always fail with ENOSYS.  Some functions are actually named
  7845     something starting with __ and the normal name is an alias.  */
  7846 #if defined (__stub_opendir) || defined (__stub___opendir)
  7847 choke me
  7848 #else
  7849 opendir();
  7850 #endif
  7851 
  7852 ; return 0; }
  7853 EOF
  7854 if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7855   rm -rf conftest*
  7856   eval "ac_cv_func_opendir=yes"
  7857 else
  7858   echo "configure: failed program was:" >&5
  7859   cat conftest.$ac_ext >&5
  7860   rm -rf conftest*
  7861   eval "ac_cv_func_opendir=no"
  7862 fi
  7863 rm -f conftest*
  7864 fi
  7865 
  7866 if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
  7867   echo "$ac_t""yes" 1>&6
  7868   :
  7869 else
  7870   echo "$ac_t""no" 1>&6
  7871 cat >> confdefs.h <<\EOF
  7872 #define USE_DIRENT2_H 1
  7873 EOF
  7874 
  7875 fi
  7876 
  7877 
  7878 #--------------------------------------------------------------------
  7879 #	The check below checks whether <sys/wait.h> defines the type
  7880 #	"union wait" correctly.  It's needed because of weirdness in
  7881 #	HP-UX where "union wait" is defined in both the BSD and SYS-V
  7882 #	environments.  Checking the usability of WIFEXITED seems to do
  7883 #	the trick.
  7884 #--------------------------------------------------------------------
  7885 
  7886 echo $ac_n "checking union wait""... $ac_c" 1>&6
  7887 echo "configure:7888: checking union wait" >&5
  7888 if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
  7889   echo $ac_n "(cached) $ac_c" 1>&6
  7890 else
  7891   
  7892     cat > conftest.$ac_ext <<EOF
  7893 #line 7894 "configure"
  7894 #include "confdefs.h"
  7895 #include <sys/types.h> 
  7896 #include <sys/wait.h>
  7897 int main() {
  7898 
  7899 union wait x;
  7900 WIFEXITED(x);		/* Generates compiler error if WIFEXITED
  7901 			 * uses an int. */
  7902     
  7903 ; return 0; }
  7904 EOF
  7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7906   rm -rf conftest*
  7907   tcl_cv_union_wait=yes
  7908 else
  7909   echo "configure: failed program was:" >&5
  7910   cat conftest.$ac_ext >&5
  7911   rm -rf conftest*
  7912   tcl_cv_union_wait=no
  7913 fi
  7914 rm -f conftest*
  7915 fi
  7916 
  7917 echo "$ac_t""$tcl_cv_union_wait" 1>&6
  7918 if test $tcl_cv_union_wait = no; then
  7919     cat >> confdefs.h <<\EOF
  7920 #define NO_UNION_WAIT 1
  7921 EOF
  7922 
  7923 fi
  7924 
  7925 #--------------------------------------------------------------------
  7926 #	Check whether there is an strncasecmp function on this system.
  7927 #	This is a bit tricky because under SCO it's in -lsocket and
  7928 #	under Sequent Dynix it's in -linet.
  7929 #--------------------------------------------------------------------
  7930 
  7931 echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
  7932 echo "configure:7933: checking for strncasecmp" >&5
  7933 if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
  7934   echo $ac_n "(cached) $ac_c" 1>&6
  7935 else
  7936   cat > conftest.$ac_ext <<EOF
  7937 #line 7938 "configure"
  7938 #include "confdefs.h"
  7939 /* System header to define __stub macros and hopefully few prototypes,
  7940     which can conflict with char strncasecmp(); below.  */
  7941 #include <assert.h>
  7942 /* Override any gcc2 internal prototype to avoid an error.  */
  7943 /* We use char because int might match the return type of a gcc2
  7944     builtin and then its argument prototype would still apply.  */
  7945 char strncasecmp();
  7946 
  7947 int main() {
  7948 
  7949 /* The GNU C library defines this for functions which it implements
  7950     to always fail with ENOSYS.  Some functions are actually named
  7951     something starting with __ and the normal name is an alias.  */
  7952 #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
  7953 choke me
  7954 #else
  7955 strncasecmp();
  7956 #endif
  7957 
  7958 ; return 0; }
  7959 EOF
  7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7961   rm -rf conftest*
  7962   eval "ac_cv_func_strncasecmp=yes"
  7963 else
  7964   echo "configure: failed program was:" >&5
  7965   cat conftest.$ac_ext >&5
  7966   rm -rf conftest*
  7967   eval "ac_cv_func_strncasecmp=no"
  7968 fi
  7969 rm -f conftest*
  7970 fi
  7971 
  7972 if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
  7973   echo "$ac_t""yes" 1>&6
  7974   tcl_ok=1
  7975 else
  7976   echo "$ac_t""no" 1>&6
  7977 tcl_ok=0
  7978 fi
  7979 
  7980 if test "$tcl_ok" = 0; then
  7981     echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
  7982 echo "configure:7983: checking for strncasecmp in -lsocket" >&5
  7983 ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
  7984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  7985   echo $ac_n "(cached) $ac_c" 1>&6
  7986 else
  7987   ac_save_LIBS="$LIBS"
  7988 LIBS="-lsocket  $LIBS"
  7989 cat > conftest.$ac_ext <<EOF
  7990 #line 7991 "configure"
  7991 #include "confdefs.h"
  7992 /* Override any gcc2 internal prototype to avoid an error.  */
  7993 /* We use char because int might match the return type of a gcc2
  7994     builtin and then its argument prototype would still apply.  */
  7995 char strncasecmp();
  7996 
  7997 int main() {
  7998 strncasecmp()
  7999 ; return 0; }
  8000 EOF
  8001 if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8002   rm -rf conftest*
  8003   eval "ac_cv_lib_$ac_lib_var=yes"
  8004 else
  8005   echo "configure: failed program was:" >&5
  8006   cat conftest.$ac_ext >&5
  8007   rm -rf conftest*
  8008   eval "ac_cv_lib_$ac_lib_var=no"
  8009 fi
  8010 rm -f conftest*
  8011 LIBS="$ac_save_LIBS"
  8012 
  8013 fi
  8014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8015   echo "$ac_t""yes" 1>&6
  8016   tcl_ok=1
  8017 else
  8018   echo "$ac_t""no" 1>&6
  8019 tcl_ok=0
  8020 fi
  8021 
  8022 fi
  8023 if test "$tcl_ok" = 0; then
  8024     echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
  8025 echo "configure:8026: checking for strncasecmp in -linet" >&5
  8026 ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
  8027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  8028   echo $ac_n "(cached) $ac_c" 1>&6
  8029 else
  8030   ac_save_LIBS="$LIBS"
  8031 LIBS="-linet  $LIBS"
  8032 cat > conftest.$ac_ext <<EOF
  8033 #line 8034 "configure"
  8034 #include "confdefs.h"
  8035 /* Override any gcc2 internal prototype to avoid an error.  */
  8036 /* We use char because int might match the return type of a gcc2
  8037     builtin and then its argument prototype would still apply.  */
  8038 char strncasecmp();
  8039 
  8040 int main() {
  8041 strncasecmp()
  8042 ; return 0; }
  8043 EOF
  8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8045   rm -rf conftest*
  8046   eval "ac_cv_lib_$ac_lib_var=yes"
  8047 else
  8048   echo "configure: failed program was:" >&5
  8049   cat conftest.$ac_ext >&5
  8050   rm -rf conftest*
  8051   eval "ac_cv_lib_$ac_lib_var=no"
  8052 fi
  8053 rm -f conftest*
  8054 LIBS="$ac_save_LIBS"
  8055 
  8056 fi
  8057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8058   echo "$ac_t""yes" 1>&6
  8059   tcl_ok=1
  8060 else
  8061   echo "$ac_t""no" 1>&6
  8062 tcl_ok=0
  8063 fi
  8064 
  8065 fi
  8066 if test "$tcl_ok" = 0; then
  8067     LIBOBJS="$LIBOBJS strncasecmp.o"
  8068 fi
  8069 
  8070 #--------------------------------------------------------------------
  8071 #	The code below deals with several issues related to gettimeofday:
  8072 #	1. Some systems don't provide a gettimeofday function at all
  8073 #	   (set NO_GETTOD if this is the case).
  8074 #	2. SGI systems don't use the BSD form of the gettimeofday function,
  8075 #	   but they have a BSDgettimeofday function that can be used instead.
  8076 #	3. See if gettimeofday is declared in the <sys/time.h> header file.
  8077 #	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
  8078 #	   declare it.
  8079 #--------------------------------------------------------------------
  8080 
  8081 echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
  8082 echo "configure:8083: checking for BSDgettimeofday" >&5
  8083 if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
  8084   echo $ac_n "(cached) $ac_c" 1>&6
  8085 else
  8086   cat > conftest.$ac_ext <<EOF
  8087 #line 8088 "configure"
  8088 #include "confdefs.h"
  8089 /* System header to define __stub macros and hopefully few prototypes,
  8090     which can conflict with char BSDgettimeofday(); below.  */
  8091 #include <assert.h>
  8092 /* Override any gcc2 internal prototype to avoid an error.  */
  8093 /* We use char because int might match the return type of a gcc2
  8094     builtin and then its argument prototype would still apply.  */
  8095 char BSDgettimeofday();
  8096 
  8097 int main() {
  8098 
  8099 /* The GNU C library defines this for functions which it implements
  8100     to always fail with ENOSYS.  Some functions are actually named
  8101     something starting with __ and the normal name is an alias.  */
  8102 #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
  8103 choke me
  8104 #else
  8105 BSDgettimeofday();
  8106 #endif
  8107 
  8108 ; return 0; }
  8109 EOF
  8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8111   rm -rf conftest*
  8112   eval "ac_cv_func_BSDgettimeofday=yes"
  8113 else
  8114   echo "configure: failed program was:" >&5
  8115   cat conftest.$ac_ext >&5
  8116   rm -rf conftest*
  8117   eval "ac_cv_func_BSDgettimeofday=no"
  8118 fi
  8119 rm -f conftest*
  8120 fi
  8121 
  8122 if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
  8123   echo "$ac_t""yes" 1>&6
  8124   cat >> confdefs.h <<\EOF
  8125 #define HAVE_BSDGETTIMEOFDAY 1
  8126 EOF
  8127 
  8128 else
  8129   echo "$ac_t""no" 1>&6
  8130 
  8131     echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  8132 echo "configure:8133: checking for gettimeofday" >&5
  8133 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  8134   echo $ac_n "(cached) $ac_c" 1>&6
  8135 else
  8136   cat > conftest.$ac_ext <<EOF
  8137 #line 8138 "configure"
  8138 #include "confdefs.h"
  8139 /* System header to define __stub macros and hopefully few prototypes,
  8140     which can conflict with char gettimeofday(); below.  */
  8141 #include <assert.h>
  8142 /* Override any gcc2 internal prototype to avoid an error.  */
  8143 /* We use char because int might match the return type of a gcc2
  8144     builtin and then its argument prototype would still apply.  */
  8145 char gettimeofday();
  8146 
  8147 int main() {
  8148 
  8149 /* The GNU C library defines this for functions which it implements
  8150     to always fail with ENOSYS.  Some functions are actually named
  8151     something starting with __ and the normal name is an alias.  */
  8152 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  8153 choke me
  8154 #else
  8155 gettimeofday();
  8156 #endif
  8157 
  8158 ; return 0; }
  8159 EOF
  8160 if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8161   rm -rf conftest*
  8162   eval "ac_cv_func_gettimeofday=yes"
  8163 else
  8164   echo "configure: failed program was:" >&5
  8165   cat conftest.$ac_ext >&5
  8166   rm -rf conftest*
  8167   eval "ac_cv_func_gettimeofday=no"
  8168 fi
  8169 rm -f conftest*
  8170 fi
  8171 
  8172 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  8173   echo "$ac_t""yes" 1>&6
  8174   :
  8175 else
  8176   echo "$ac_t""no" 1>&6
  8177 cat >> confdefs.h <<\EOF
  8178 #define NO_GETTOD 1
  8179 EOF
  8180 
  8181 fi
  8182 
  8183 
  8184 fi
  8185 
  8186 echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
  8187 echo "configure:8188: checking for gettimeofday declaration" >&5
  8188 if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
  8189   echo $ac_n "(cached) $ac_c" 1>&6
  8190 else
  8191   
  8192     cat > conftest.$ac_ext <<EOF
  8193 #line 8194 "configure"
  8194 #include "confdefs.h"
  8195 #include <sys/time.h>
  8196 EOF
  8197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8198   egrep "gettimeofday" >/dev/null 2>&1; then
  8199   rm -rf conftest*
  8200   tcl_cv_grep_gettimeofday=present
  8201 else
  8202   rm -rf conftest*
  8203   tcl_cv_grep_gettimeofday=missing
  8204 fi
  8205 rm -f conftest*
  8206 
  8207 fi
  8208 
  8209 echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6
  8210 if test $tcl_cv_grep_gettimeofday = missing ; then
  8211     cat >> confdefs.h <<\EOF
  8212 #define GETTOD_NOT_DECLARED 1
  8213 EOF
  8214 
  8215 fi
  8216 
  8217 #--------------------------------------------------------------------
  8218 #	The following code checks to see whether it is possible to get
  8219 #	signed chars on this platform.  This is needed in order to
  8220 #	properly generate sign-extended ints from character values.
  8221 #--------------------------------------------------------------------
  8222 
  8223 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  8224 echo "configure:8225: checking whether char is unsigned" >&5
  8225 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  8226   echo $ac_n "(cached) $ac_c" 1>&6
  8227 else
  8228   if test "$GCC" = yes; then
  8229   # GCC predefines this symbol on systems where it applies.
  8230 cat > conftest.$ac_ext <<EOF
  8231 #line 8232 "configure"
  8232 #include "confdefs.h"
  8233 #ifdef __CHAR_UNSIGNED__
  8234   yes
  8235 #endif
  8236 
  8237 EOF
  8238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8239   egrep "yes" >/dev/null 2>&1; then
  8240   rm -rf conftest*
  8241   ac_cv_c_char_unsigned=yes
  8242 else
  8243   rm -rf conftest*
  8244   ac_cv_c_char_unsigned=no
  8245 fi
  8246 rm -f conftest*
  8247 
  8248 else
  8249 if test "$cross_compiling" = yes; then
  8250     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  8251 else
  8252   cat > conftest.$ac_ext <<EOF
  8253 #line 8254 "configure"
  8254 #include "confdefs.h"
  8255 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  8256 #if !defined(__STDC__) || __STDC__ != 1
  8257 #define volatile
  8258 #endif
  8259 main() {
  8260   volatile char c = 255; exit(c < 0);
  8261 }
  8262 EOF
  8263 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8264 then
  8265   ac_cv_c_char_unsigned=yes
  8266 else
  8267   echo "configure: failed program was:" >&5
  8268   cat conftest.$ac_ext >&5
  8269   rm -fr conftest*
  8270   ac_cv_c_char_unsigned=no
  8271 fi
  8272 rm -fr conftest*
  8273 fi
  8274 
  8275 fi
  8276 fi
  8277 
  8278 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  8279 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  8280   cat >> confdefs.h <<\EOF
  8281 #define __CHAR_UNSIGNED__ 1
  8282 EOF
  8283 
  8284 fi
  8285 
  8286 echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
  8287 echo "configure:8288: checking signed char declarations" >&5
  8288 if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
  8289   echo $ac_n "(cached) $ac_c" 1>&6
  8290 else
  8291   
  8292     cat > conftest.$ac_ext <<EOF
  8293 #line 8294 "configure"
  8294 #include "confdefs.h"
  8295 
  8296 int main() {
  8297 
  8298 	signed char *p;
  8299 	p = 0;
  8300 	
  8301 ; return 0; }
  8302 EOF
  8303 if { (eval echo configure:8304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8304   rm -rf conftest*
  8305   tcl_cv_char_signed=yes
  8306 else
  8307   echo "configure: failed program was:" >&5
  8308   cat conftest.$ac_ext >&5
  8309   rm -rf conftest*
  8310   tcl_cv_char_signed=no
  8311 fi
  8312 rm -f conftest*
  8313 fi
  8314 
  8315 echo "$ac_t""$tcl_cv_char_signed" 1>&6
  8316 if test $tcl_cv_char_signed = yes; then
  8317     cat >> confdefs.h <<\EOF
  8318 #define HAVE_SIGNED_CHAR 1
  8319 EOF
  8320 
  8321 fi
  8322 
  8323 #--------------------------------------------------------------------
  8324 #  Does putenv() copy or not?  We need to know to avoid memory leaks.
  8325 #--------------------------------------------------------------------
  8326 
  8327 echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6
  8328 echo "configure:8329: checking for a putenv() that copies the buffer" >&5
  8329 if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then
  8330   echo $ac_n "(cached) $ac_c" 1>&6
  8331 else
  8332   
  8333     if test "$cross_compiling" = yes; then
  8334   tcl_cv_putenv_copy=no
  8335 else
  8336   cat > conftest.$ac_ext <<EOF
  8337 #line 8338 "configure"
  8338 #include "confdefs.h"
  8339 
  8340 	#include <stdlib.h>
  8341 	#define OURVAR "havecopy=yes"
  8342 	int main (int argc, char *argv[])
  8343 	{
  8344 	    char *foo, *bar;
  8345 	    foo = (char *)strdup(OURVAR);
  8346 	    putenv(foo);
  8347 	    strcpy((char *)(strchr(foo, '=') + 1), "no");
  8348 	    bar = getenv("havecopy");
  8349 	    if (!strcmp(bar, "no")) {
  8350 		/* doesnt copy */
  8351 		return 0;
  8352 	    } else {
  8353 		/* does copy */
  8354 		return 1;
  8355 	    }
  8356 	}
  8357     
  8358 EOF
  8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8360 then
  8361   tcl_cv_putenv_copy=no
  8362 else
  8363   echo "configure: failed program was:" >&5
  8364   cat conftest.$ac_ext >&5
  8365   rm -fr conftest*
  8366   tcl_cv_putenv_copy=yes
  8367 fi
  8368 rm -fr conftest*
  8369 fi
  8370 
  8371 fi
  8372 
  8373 echo "$ac_t""$tcl_cv_putenv_copy" 1>&6
  8374 if test $tcl_cv_putenv_copy = yes; then
  8375     cat >> confdefs.h <<\EOF
  8376 #define HAVE_PUTENV_THAT_COPIES 1
  8377 EOF
  8378 
  8379 fi
  8380 
  8381 #--------------------------------------------------------------------
  8382 # Check for support of nl_langinfo function
  8383 #--------------------------------------------------------------------
  8384 
  8385 
  8386     # Check whether --enable-langinfo or --disable-langinfo was given.
  8387 if test "${enable_langinfo+set}" = set; then
  8388   enableval="$enable_langinfo"
  8389   langinfo_ok=$enableval
  8390 else
  8391   langinfo_ok=yes
  8392 fi
  8393 
  8394 
  8395     HAVE_LANGINFO=0
  8396     if test "$langinfo_ok" = "yes"; then
  8397 	ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  8398 echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
  8399 echo "configure:8400: checking for langinfo.h" >&5
  8400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8401   echo $ac_n "(cached) $ac_c" 1>&6
  8402 else
  8403   cat > conftest.$ac_ext <<EOF
  8404 #line 8405 "configure"
  8405 #include "confdefs.h"
  8406 #include <langinfo.h>
  8407 EOF
  8408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8409 { (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8411 if test -z "$ac_err"; then
  8412   rm -rf conftest*
  8413   eval "ac_cv_header_$ac_safe=yes"
  8414 else
  8415   echo "$ac_err" >&5
  8416   echo "configure: failed program was:" >&5
  8417   cat conftest.$ac_ext >&5
  8418   rm -rf conftest*
  8419   eval "ac_cv_header_$ac_safe=no"
  8420 fi
  8421 rm -f conftest*
  8422 fi
  8423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8424   echo "$ac_t""yes" 1>&6
  8425   langinfo_ok=yes
  8426 else
  8427   echo "$ac_t""no" 1>&6
  8428 langinfo_ok=no
  8429 fi
  8430 
  8431     fi
  8432     echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
  8433 echo "configure:8434: checking whether to use nl_langinfo" >&5
  8434     if test "$langinfo_ok" = "yes"; then
  8435 	if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then
  8436   echo $ac_n "(cached) $ac_c" 1>&6
  8437 else
  8438   
  8439 	    cat > conftest.$ac_ext <<EOF
  8440 #line 8441 "configure"
  8441 #include "confdefs.h"
  8442 #include <langinfo.h>
  8443 int main() {
  8444 nl_langinfo(CODESET);
  8445 ; return 0; }
  8446 EOF
  8447 if { (eval echo configure:8448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8448   rm -rf conftest*
  8449   tcl_cv_langinfo_h=yes
  8450 else
  8451   echo "configure: failed program was:" >&5
  8452   cat conftest.$ac_ext >&5
  8453   rm -rf conftest*
  8454   tcl_cv_langinfo_h=no
  8455 fi
  8456 rm -f conftest*
  8457 fi
  8458 
  8459 	echo "$ac_t""$tcl_cv_langinfo_h" 1>&6
  8460 	if test $tcl_cv_langinfo_h = yes; then
  8461 	    cat >> confdefs.h <<\EOF
  8462 #define HAVE_LANGINFO 1
  8463 EOF
  8464 
  8465 	fi
  8466     else 
  8467 	echo "$ac_t""$langinfo_ok" 1>&6
  8468     fi
  8469 
  8470 
  8471 #--------------------------------------------------------------------
  8472 # Darwin specific API checks and defines
  8473 #--------------------------------------------------------------------
  8474 
  8475 if test "`uname -s`" = "Darwin" ; then
  8476     for ac_hdr in copyfile.h
  8477 do
  8478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8479 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8480 echo "configure:8481: checking for $ac_hdr" >&5
  8481 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8482   echo $ac_n "(cached) $ac_c" 1>&6
  8483 else
  8484   cat > conftest.$ac_ext <<EOF
  8485 #line 8486 "configure"
  8486 #include "confdefs.h"
  8487 #include <$ac_hdr>
  8488 EOF
  8489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8490 { (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8492 if test -z "$ac_err"; then
  8493   rm -rf conftest*
  8494   eval "ac_cv_header_$ac_safe=yes"
  8495 else
  8496   echo "$ac_err" >&5
  8497   echo "configure: failed program was:" >&5
  8498   cat conftest.$ac_ext >&5
  8499   rm -rf conftest*
  8500   eval "ac_cv_header_$ac_safe=no"
  8501 fi
  8502 rm -f conftest*
  8503 fi
  8504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8505   echo "$ac_t""yes" 1>&6
  8506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8507   cat >> confdefs.h <<EOF
  8508 #define $ac_tr_hdr 1
  8509 EOF
  8510  
  8511 else
  8512   echo "$ac_t""no" 1>&6
  8513 fi
  8514 done
  8515 
  8516     for ac_func in copyfile
  8517 do
  8518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  8519 echo "configure:8520: checking for $ac_func" >&5
  8520 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  8521   echo $ac_n "(cached) $ac_c" 1>&6
  8522 else
  8523   cat > conftest.$ac_ext <<EOF
  8524 #line 8525 "configure"
  8525 #include "confdefs.h"
  8526 /* System header to define __stub macros and hopefully few prototypes,
  8527     which can conflict with char $ac_func(); below.  */
  8528 #include <assert.h>
  8529 /* Override any gcc2 internal prototype to avoid an error.  */
  8530 /* We use char because int might match the return type of a gcc2
  8531     builtin and then its argument prototype would still apply.  */
  8532 char $ac_func();
  8533 
  8534 int main() {
  8535 
  8536 /* The GNU C library defines this for functions which it implements
  8537     to always fail with ENOSYS.  Some functions are actually named
  8538     something starting with __ and the normal name is an alias.  */
  8539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  8540 choke me
  8541 #else
  8542 $ac_func();
  8543 #endif
  8544 
  8545 ; return 0; }
  8546 EOF
  8547 if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8548   rm -rf conftest*
  8549   eval "ac_cv_func_$ac_func=yes"
  8550 else
  8551   echo "configure: failed program was:" >&5
  8552   cat conftest.$ac_ext >&5
  8553   rm -rf conftest*
  8554   eval "ac_cv_func_$ac_func=no"
  8555 fi
  8556 rm -f conftest*
  8557 fi
  8558 
  8559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  8560   echo "$ac_t""yes" 1>&6
  8561     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  8562   cat >> confdefs.h <<EOF
  8563 #define $ac_tr_func 1
  8564 EOF
  8565  
  8566 else
  8567   echo "$ac_t""no" 1>&6
  8568 fi
  8569 done
  8570 
  8571     if test $tcl_corefoundation = yes; then
  8572 	for ac_hdr in libkern/OSAtomic.h
  8573 do
  8574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8576 echo "configure:8577: checking for $ac_hdr" >&5
  8577 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8578   echo $ac_n "(cached) $ac_c" 1>&6
  8579 else
  8580   cat > conftest.$ac_ext <<EOF
  8581 #line 8582 "configure"
  8582 #include "confdefs.h"
  8583 #include <$ac_hdr>
  8584 EOF
  8585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8586 { (eval echo configure:8587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8588 if test -z "$ac_err"; then
  8589   rm -rf conftest*
  8590   eval "ac_cv_header_$ac_safe=yes"
  8591 else
  8592   echo "$ac_err" >&5
  8593   echo "configure: failed program was:" >&5
  8594   cat conftest.$ac_ext >&5
  8595   rm -rf conftest*
  8596   eval "ac_cv_header_$ac_safe=no"
  8597 fi
  8598 rm -f conftest*
  8599 fi
  8600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8601   echo "$ac_t""yes" 1>&6
  8602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8603   cat >> confdefs.h <<EOF
  8604 #define $ac_tr_hdr 1
  8605 EOF
  8606  
  8607 else
  8608   echo "$ac_t""no" 1>&6
  8609 fi
  8610 done
  8611 
  8612 	for ac_func in OSSpinLockLock
  8613 do
  8614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  8615 echo "configure:8616: checking for $ac_func" >&5
  8616 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  8617   echo $ac_n "(cached) $ac_c" 1>&6
  8618 else
  8619   cat > conftest.$ac_ext <<EOF
  8620 #line 8621 "configure"
  8621 #include "confdefs.h"
  8622 /* System header to define __stub macros and hopefully few prototypes,
  8623     which can conflict with char $ac_func(); below.  */
  8624 #include <assert.h>
  8625 /* Override any gcc2 internal prototype to avoid an error.  */
  8626 /* We use char because int might match the return type of a gcc2
  8627     builtin and then its argument prototype would still apply.  */
  8628 char $ac_func();
  8629 
  8630 int main() {
  8631 
  8632 /* The GNU C library defines this for functions which it implements
  8633     to always fail with ENOSYS.  Some functions are actually named
  8634     something starting with __ and the normal name is an alias.  */
  8635 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  8636 choke me
  8637 #else
  8638 $ac_func();
  8639 #endif
  8640 
  8641 ; return 0; }
  8642 EOF
  8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8644   rm -rf conftest*
  8645   eval "ac_cv_func_$ac_func=yes"
  8646 else
  8647   echo "configure: failed program was:" >&5
  8648   cat conftest.$ac_ext >&5
  8649   rm -rf conftest*
  8650   eval "ac_cv_func_$ac_func=no"
  8651 fi
  8652 rm -f conftest*
  8653 fi
  8654 
  8655 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  8656   echo "$ac_t""yes" 1>&6
  8657     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  8658   cat >> confdefs.h <<EOF
  8659 #define $ac_tr_func 1
  8660 EOF
  8661  
  8662 else
  8663   echo "$ac_t""no" 1>&6
  8664 fi
  8665 done
  8666 
  8667 	for ac_func in pthread_atfork
  8668 do
  8669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  8670 echo "configure:8671: checking for $ac_func" >&5
  8671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  8672   echo $ac_n "(cached) $ac_c" 1>&6
  8673 else
  8674   cat > conftest.$ac_ext <<EOF
  8675 #line 8676 "configure"
  8676 #include "confdefs.h"
  8677 /* System header to define __stub macros and hopefully few prototypes,
  8678     which can conflict with char $ac_func(); below.  */
  8679 #include <assert.h>
  8680 /* Override any gcc2 internal prototype to avoid an error.  */
  8681 /* We use char because int might match the return type of a gcc2
  8682     builtin and then its argument prototype would still apply.  */
  8683 char $ac_func();
  8684 
  8685 int main() {
  8686 
  8687 /* The GNU C library defines this for functions which it implements
  8688     to always fail with ENOSYS.  Some functions are actually named
  8689     something starting with __ and the normal name is an alias.  */
  8690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  8691 choke me
  8692 #else
  8693 $ac_func();
  8694 #endif
  8695 
  8696 ; return 0; }
  8697 EOF
  8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8699   rm -rf conftest*
  8700   eval "ac_cv_func_$ac_func=yes"
  8701 else
  8702   echo "configure: failed program was:" >&5
  8703   cat conftest.$ac_ext >&5
  8704   rm -rf conftest*
  8705   eval "ac_cv_func_$ac_func=no"
  8706 fi
  8707 rm -f conftest*
  8708 fi
  8709 
  8710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  8711   echo "$ac_t""yes" 1>&6
  8712     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  8713   cat >> confdefs.h <<EOF
  8714 #define $ac_tr_func 1
  8715 EOF
  8716  
  8717 else
  8718   echo "$ac_t""no" 1>&6
  8719 fi
  8720 done
  8721 
  8722     fi
  8723     cat >> confdefs.h <<\EOF
  8724 #define USE_VFORK 1
  8725 EOF
  8726 
  8727     cat >> confdefs.h <<\EOF
  8728 #define TCL_DEFAULT_ENCODING "utf-8"
  8729 EOF
  8730 
  8731     cat >> confdefs.h <<\EOF
  8732 #define TCL_LOAD_FROM_MEMORY 1
  8733 EOF
  8734 
  8735     for ac_hdr in AvailabilityMacros.h
  8736 do
  8737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8739 echo "configure:8740: checking for $ac_hdr" >&5
  8740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8741   echo $ac_n "(cached) $ac_c" 1>&6
  8742 else
  8743   cat > conftest.$ac_ext <<EOF
  8744 #line 8745 "configure"
  8745 #include "confdefs.h"
  8746 #include <$ac_hdr>
  8747 EOF
  8748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8749 { (eval echo configure:8750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8751 if test -z "$ac_err"; then
  8752   rm -rf conftest*
  8753   eval "ac_cv_header_$ac_safe=yes"
  8754 else
  8755   echo "$ac_err" >&5
  8756   echo "configure: failed program was:" >&5
  8757   cat conftest.$ac_ext >&5
  8758   rm -rf conftest*
  8759   eval "ac_cv_header_$ac_safe=no"
  8760 fi
  8761 rm -f conftest*
  8762 fi
  8763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8764   echo "$ac_t""yes" 1>&6
  8765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8766   cat >> confdefs.h <<EOF
  8767 #define $ac_tr_hdr 1
  8768 EOF
  8769  
  8770 else
  8771   echo "$ac_t""no" 1>&6
  8772 fi
  8773 done
  8774 
  8775     if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
  8776 	echo $ac_n "checking if weak import is available""... $ac_c" 1>&6
  8777 echo "configure:8778: checking if weak import is available" >&5
  8778 if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then
  8779   echo $ac_n "(cached) $ac_c" 1>&6
  8780 else
  8781   
  8782 	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
  8783 	    cat > conftest.$ac_ext <<EOF
  8784 #line 8785 "configure"
  8785 #include "confdefs.h"
  8786 
  8787 		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
  8788 		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
  8789 		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
  8790 		    #endif
  8791 		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
  8792 		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
  8793 		    #endif
  8794 		    int rand(void) __attribute__((weak_import));
  8795 		
  8796 int main() {
  8797 rand();
  8798 ; return 0; }
  8799 EOF
  8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8801   rm -rf conftest*
  8802   tcl_cv_cc_weak_import=yes
  8803 else
  8804   echo "configure: failed program was:" >&5
  8805   cat conftest.$ac_ext >&5
  8806   rm -rf conftest*
  8807   tcl_cv_cc_weak_import=no
  8808 fi
  8809 rm -f conftest*
  8810 	    CFLAGS=$hold_cflags
  8811 fi
  8812 
  8813 echo "$ac_t""$tcl_cv_cc_weak_import" 1>&6
  8814 	if test $tcl_cv_cc_weak_import = yes; then
  8815 	    cat >> confdefs.h <<\EOF
  8816 #define HAVE_WEAK_IMPORT 1
  8817 EOF
  8818 
  8819 	fi
  8820     fi
  8821 fi
  8822 
  8823 #--------------------------------------------------------------------
  8824 # Check for support of fts functions (readdir replacement)
  8825 #--------------------------------------------------------------------
  8826 
  8827 echo $ac_n "checking for fts""... $ac_c" 1>&6
  8828 echo "configure:8829: checking for fts" >&5
  8829 if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then
  8830   echo $ac_n "(cached) $ac_c" 1>&6
  8831 else
  8832   
  8833     cat > conftest.$ac_ext <<EOF
  8834 #line 8835 "configure"
  8835 #include "confdefs.h"
  8836 
  8837 	    #include <sys/param.h>
  8838 	    #include <sys/stat.h>
  8839 	    #include <fts.h>
  8840 	
  8841 int main() {
  8842 
  8843 	    char*const p[2] = {"/", NULL};
  8844 	    FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
  8845 	    FTSENT *e = fts_read(f); fts_close(f);
  8846 	
  8847 ; return 0; }
  8848 EOF
  8849 if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8850   rm -rf conftest*
  8851   tcl_cv_api_fts=yes
  8852 else
  8853   echo "configure: failed program was:" >&5
  8854   cat conftest.$ac_ext >&5
  8855   rm -rf conftest*
  8856   tcl_cv_api_fts=no
  8857 fi
  8858 rm -f conftest*
  8859 fi
  8860 
  8861 echo "$ac_t""$tcl_cv_api_fts" 1>&6
  8862 if test $tcl_cv_api_fts = yes; then
  8863     cat >> confdefs.h <<\EOF
  8864 #define HAVE_FTS 1
  8865 EOF
  8866 
  8867 fi
  8868 
  8869 #--------------------------------------------------------------------
  8870 #	The statements below check for systems where POSIX-style
  8871 #	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
  8872 #	On these systems (mostly older ones), use the old BSD-style
  8873 #	FIONBIO approach instead.
  8874 #--------------------------------------------------------------------
  8875 
  8876 
  8877     for ac_hdr in sys/ioctl.h
  8878 do
  8879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8881 echo "configure:8882: checking for $ac_hdr" >&5
  8882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8883   echo $ac_n "(cached) $ac_c" 1>&6
  8884 else
  8885   cat > conftest.$ac_ext <<EOF
  8886 #line 8887 "configure"
  8887 #include "confdefs.h"
  8888 #include <$ac_hdr>
  8889 EOF
  8890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8891 { (eval echo configure:8892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8893 if test -z "$ac_err"; then
  8894   rm -rf conftest*
  8895   eval "ac_cv_header_$ac_safe=yes"
  8896 else
  8897   echo "$ac_err" >&5
  8898   echo "configure: failed program was:" >&5
  8899   cat conftest.$ac_ext >&5
  8900   rm -rf conftest*
  8901   eval "ac_cv_header_$ac_safe=no"
  8902 fi
  8903 rm -f conftest*
  8904 fi
  8905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8906   echo "$ac_t""yes" 1>&6
  8907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8908   cat >> confdefs.h <<EOF
  8909 #define $ac_tr_hdr 1
  8910 EOF
  8911  
  8912 else
  8913   echo "$ac_t""no" 1>&6
  8914 fi
  8915 done
  8916 
  8917     for ac_hdr in sys/filio.h
  8918 do
  8919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8921 echo "configure:8922: checking for $ac_hdr" >&5
  8922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8923   echo $ac_n "(cached) $ac_c" 1>&6
  8924 else
  8925   cat > conftest.$ac_ext <<EOF
  8926 #line 8927 "configure"
  8927 #include "confdefs.h"
  8928 #include <$ac_hdr>
  8929 EOF
  8930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8931 { (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8933 if test -z "$ac_err"; then
  8934   rm -rf conftest*
  8935   eval "ac_cv_header_$ac_safe=yes"
  8936 else
  8937   echo "$ac_err" >&5
  8938   echo "configure: failed program was:" >&5
  8939   cat conftest.$ac_ext >&5
  8940   rm -rf conftest*
  8941   eval "ac_cv_header_$ac_safe=no"
  8942 fi
  8943 rm -f conftest*
  8944 fi
  8945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8946   echo "$ac_t""yes" 1>&6
  8947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8948   cat >> confdefs.h <<EOF
  8949 #define $ac_tr_hdr 1
  8950 EOF
  8951  
  8952 else
  8953   echo "$ac_t""no" 1>&6
  8954 fi
  8955 done
  8956 
  8957     
  8958     echo $ac_n "checking system version""... $ac_c" 1>&6
  8959 echo "configure:8960: checking system version" >&5
  8960 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
  8961   echo $ac_n "(cached) $ac_c" 1>&6
  8962 else
  8963   
  8964 	if test -f /usr/lib/NextStep/software_version; then
  8965 	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  8966 	else
  8967 	    tcl_cv_sys_version=`uname -s`-`uname -r`
  8968 	    if test "$?" -ne 0 ; then
  8969 		echo "configure: warning: can't find uname command" 1>&2
  8970 		tcl_cv_sys_version=unknown
  8971 	    else
  8972 		# Special check for weird MP-RAS system (uname returns weird
  8973 		# results, and the version is kept in special file).
  8974 
  8975 		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  8976 		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
  8977 		fi
  8978 		if test "`uname -s`" = "AIX" ; then
  8979 		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
  8980 		fi
  8981 	    fi
  8982 	fi
  8983     
  8984 fi
  8985 
  8986 echo "$ac_t""$tcl_cv_sys_version" 1>&6
  8987     system=$tcl_cv_sys_version
  8988 
  8989     echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
  8990 echo "configure:8991: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
  8991     case $system in
  8992 	# There used to be code here to use FIONBIO under AIX.  However, it
  8993 	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
  8994 	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
  8995 	# code (JO, 5/31/97).
  8996 
  8997 	OSF*)
  8998 	    cat >> confdefs.h <<\EOF
  8999 #define USE_FIONBIO 1
  9000 EOF
  9001 
  9002 	    echo "$ac_t""FIONBIO" 1>&6
  9003 	    ;;
  9004 	SunOS-4*)
  9005 	    cat >> confdefs.h <<\EOF
  9006 #define USE_FIONBIO 1
  9007 EOF
  9008 
  9009 	    echo "$ac_t""FIONBIO" 1>&6
  9010 	    ;;
  9011 	ULTRIX-4.*)
  9012 	    cat >> confdefs.h <<\EOF
  9013 #define USE_FIONBIO 1
  9014 EOF
  9015 
  9016 	    echo "$ac_t""FIONBIO" 1>&6
  9017 	    ;;
  9018 	*)
  9019 	    echo "$ac_t""O_NONBLOCK" 1>&6
  9020 	    ;;
  9021     esac
  9022 
  9023 
  9024 #--------------------------------------------------------------------
  9025 #	The statements below define a collection of symbols related to
  9026 #	building libtcl as a shared library instead of a static library.
  9027 #--------------------------------------------------------------------
  9028 
  9029 TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  9030 TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  9031 eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
  9032 
  9033 # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
  9034 # so that the backslashes quoting the DBX braces are dropped.
  9035 
  9036 # Trick to replace DBGX with TCL_DBGX
  9037 DBGX='${TCL_DBGX}'
  9038 eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
  9039 
  9040 TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
  9041 PRIVATE_INCLUDE_DIR='$(includedir)'
  9042 HTML_DIR='$(DISTDIR)/html'
  9043 
  9044 # Note:  in the following variable, it's important to use the absolute
  9045 # path name of the Tcl directory rather than "..":  this is because
  9046 # AIX remembers this path and will attempt to use it at run-time to look
  9047 # up the Tcl library.
  9048 
  9049 if test "`uname -s`" = "Darwin" ; then
  9050     
  9051     if test "`uname -s`" = "Darwin" ; then
  9052 	echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
  9053 echo "configure:9054: checking how to package libraries" >&5
  9054 	# Check whether --enable-framework or --disable-framework was given.
  9055 if test "${enable_framework+set}" = set; then
  9056   enableval="$enable_framework"
  9057   enable_framework=$enableval
  9058 else
  9059   enable_framework=no
  9060 fi
  9061 
  9062 	if test $enable_framework = yes; then
  9063 	    if test $SHARED_BUILD = 0; then
  9064 		echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2
  9065 		enable_framework=no
  9066 	    fi
  9067 	    if test $tcl_corefoundation = no; then
  9068 		echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2
  9069 		enable_framework=no
  9070 	    fi
  9071 	fi
  9072 	if test $enable_framework = yes; then
  9073 	    echo "$ac_t""framework" 1>&6
  9074 	    FRAMEWORK_BUILD=1
  9075 	else
  9076 	    if test $SHARED_BUILD = 1; then
  9077 		echo "$ac_t""shared library" 1>&6
  9078 	    else
  9079 		echo "$ac_t""static library" 1>&6
  9080 	    fi
  9081 	    FRAMEWORK_BUILD=0
  9082 	fi
  9083     fi
  9084 
  9085     TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`"
  9086     TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000'
  9087 fi
  9088 
  9089 if test "$FRAMEWORK_BUILD" = "1" ; then
  9090     cat >> confdefs.h <<\EOF
  9091 #define TCL_FRAMEWORK 1
  9092 EOF
  9093 
  9094     tcl_config_files="${tcl_config_files} Tcl-Info.plist:../macosx/Tcl-Info.plist.in"
  9095     # Construct a fake local framework structure to make linking with
  9096     # '-framework Tcl' and running of tcltest work
  9097     
  9098     LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
  9099     if test "${libdir}" = '${exec_prefix}/lib'; then
  9100         # override libdir default
  9101         libdir="/Library/Frameworks"
  9102     fi
  9103     TCL_LIB_FILE="Tcl"
  9104     TCL_LIB_FLAG="-framework Tcl"
  9105     TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl"
  9106     TCL_LIB_SPEC="-F${libdir} -framework Tcl"
  9107     libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
  9108     TCL_LIBRARY="${libdir}/Resources/Scripts"
  9109     includedir="${libdir}/Headers"
  9110     PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
  9111     HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
  9112     EXTRA_INSTALL="install-private-headers html-tcl"
  9113     EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' 
  9114     EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"'
  9115     EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
  9116     EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
  9117     TCL_YEAR="`date +%Y`"
  9118     # Don't use AC_DEFINE for the following as the framework version define 
  9119     # needs to go into the Makefile even when using autoheader, so that we  
  9120     # can pick up a potential make override of VERSION. Also, don't put this
  9121     # into CFLAGS as it should not go into tclConfig.sh
  9122     EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
  9123 else
  9124     # libdir must be a fully qualified path and not ${exec_prefix}/lib
  9125     eval libdir="$libdir"
  9126     if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
  9127         if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  9128             TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
  9129         else
  9130             TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
  9131         fi
  9132         TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
  9133         TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
  9134     else
  9135         TCL_BUILD_EXP_FILE="lib.exp"
  9136         eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
  9137     
  9138         # Replace DBGX with TCL_DBGX
  9139         eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""
  9140         
  9141         if test "$GCC" = "yes" ; then
  9142             TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`"
  9143             TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`"
  9144         else
  9145             TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"
  9146             TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
  9147         fi
  9148     fi
  9149 fi
  9150 VERSION='${VERSION}'
  9151 eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
  9152 eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
  9153 eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
  9154 VERSION=${TCL_VERSION}
  9155 
  9156 #--------------------------------------------------------------------
  9157 #	The statements below define the symbol TCL_PACKAGE_PATH, which
  9158 #	gives a list of directories that may contain packages.  The list
  9159 #	consists of one directory for machine-dependent binaries and
  9160 #	another for platform-independent scripts.
  9161 #--------------------------------------------------------------------
  9162 
  9163 if test "$FRAMEWORK_BUILD" = "1" ; then
  9164     TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
  9165 elif test "$prefix" != "$exec_prefix"; then
  9166     TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
  9167 else
  9168     TCL_PACKAGE_PATH="${prefix}/lib"
  9169 fi
  9170 
  9171 #--------------------------------------------------------------------
  9172 #       The statements below define various symbols relating to Tcl
  9173 #       stub support.
  9174 #--------------------------------------------------------------------
  9175 
  9176 # Replace ${VERSION} with contents of ${TCL_VERSION}
  9177 eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
  9178 # Replace DBGX with TCL_DBGX
  9179 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
  9180 eval "TCL_STUB_LIB_DIR=${libdir}"
  9181 
  9182 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  9183     TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"
  9184 else
  9185     TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
  9186 fi
  9187 
  9188 TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
  9189 TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
  9190 TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
  9191 TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
  9192 
  9193 # Install time header dir can be set via --includedir
  9194 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
  9195 
  9196 #------------------------------------------------------------------------
  9197 # tclConfig.sh refers to this by a different name
  9198 #------------------------------------------------------------------------
  9199 
  9200 TCL_SHARED_BUILD=${SHARED_BUILD}
  9201 
  9202 
  9203 
  9204 
  9205 
  9206 
  9207 
  9208 
  9209 
  9210 
  9211 
  9212 
  9213 
  9214 
  9215 
  9216 
  9217 
  9218 
  9219 
  9220 
  9221 
  9222 
  9223 
  9224 
  9225 
  9226 
  9227 
  9228 
  9229 
  9230 
  9231 
  9232 
  9233 
  9234 
  9235 
  9236 
  9237 
  9238 
  9239 
  9240 
  9241 
  9242 
  9243 
  9244 
  9245 
  9246 
  9247 
  9248 
  9249 
  9250 
  9251 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
  9252 
  9253 
  9254 tcl_config_files="${tcl_config_files} Makefile dltest/Makefile tclConfig.sh"
  9255 trap '' 1 2 15
  9256 cat > confcache <<\EOF
  9257 # This file is a shell script that caches the results of configure
  9258 # tests run on this system so they can be shared between configure
  9259 # scripts and configure runs.  It is not useful on other systems.
  9260 # If it contains results you don't want to keep, you may remove or edit it.
  9261 #
  9262 # By default, configure uses ./config.cache as the cache file,
  9263 # creating it if it does not exist already.  You can give configure
  9264 # the --cache-file=FILE option to use a different cache file; that is
  9265 # what configure does when it calls configure scripts in
  9266 # subdirectories, so they share the cache.
  9267 # Giving --cache-file=/dev/null disables caching, for debugging configure.
  9268 # config.status only pays attention to the cache file if you give it the
  9269 # --recheck option to rerun configure.
  9270 #
  9271 EOF
  9272 # The following way of writing the cache mishandles newlines in values,
  9273 # but we know of no workaround that is simple, portable, and efficient.
  9274 # So, don't put newlines in cache variables' values.
  9275 # Ultrix sh set writes to stderr and can't be redirected directly,
  9276 # and sets the high bit in the cache file unless we assign to the vars.
  9277 (set) 2>&1 |
  9278   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  9279   *ac_space=\ *)
  9280     # `set' does not quote correctly, so add quotes (double-quote substitution
  9281     # turns \\\\ into \\, and sed turns \\ into \).
  9282     sed -n \
  9283       -e "s/'/'\\\\''/g" \
  9284       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  9285     ;;
  9286   *)
  9287     # `set' quotes correctly as required by POSIX, so do not add quotes.
  9288     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  9289     ;;
  9290   esac >> confcache
  9291 if cmp -s $cache_file confcache; then
  9292   :
  9293 else
  9294   if test -w $cache_file; then
  9295     echo "updating cache $cache_file"
  9296     cat confcache > $cache_file
  9297   else
  9298     echo "not updating unwritable cache $cache_file"
  9299   fi
  9300 fi
  9301 rm -f confcache
  9302 
  9303 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  9304 
  9305 test "x$prefix" = xNONE && prefix=$ac_default_prefix
  9306 # Let make expand exec_prefix.
  9307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  9308 
  9309 # Any assignment to VPATH causes Sun make to only execute
  9310 # the first set of double-colon rules, so remove it if not needed.
  9311 # If there is a colon in the path, we need to keep it.
  9312 if test "x$srcdir" = x.; then
  9313   ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
  9314 fi
  9315 
  9316 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  9317 
  9318 # Transform confdefs.h into DEFS.
  9319 # Protect against shell expansion while executing Makefile rules.
  9320 # Protect against Makefile macro expansion.
  9321 cat > conftest.defs <<\EOF
  9322 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  9323 s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
  9324 s%\[%\\&%g
  9325 s%\]%\\&%g
  9326 s%\$%$$%g
  9327 EOF
  9328 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  9329 rm -f conftest.defs
  9330 
  9331 
  9332 # Without the "./", some shells look in PATH for config.status.
  9333 : ${CONFIG_STATUS=./config.status}
  9334 
  9335 echo creating $CONFIG_STATUS
  9336 rm -f $CONFIG_STATUS
  9337 cat > $CONFIG_STATUS <<EOF
  9338 #! /bin/sh
  9339 # Generated automatically by configure.
  9340 # Run this file to recreate the current configuration.
  9341 # This directory was configured as follows,
  9342 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  9343 #
  9344 # $0 $ac_configure_args
  9345 #
  9346 # Compiler output produced by configure, useful for debugging
  9347 # configure, is in ./config.log if it exists.
  9348 
  9349 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  9350 for ac_option
  9351 do
  9352   case "\$ac_option" in
  9353   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  9354     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  9355     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  9356   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  9357     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  9358     exit 0 ;;
  9359   -help | --help | --hel | --he | --h)
  9360     echo "\$ac_cs_usage"; exit 0 ;;
  9361   *) echo "\$ac_cs_usage"; exit 1 ;;
  9362   esac
  9363 done
  9364 
  9365 ac_given_srcdir=$srcdir
  9366 
  9367 trap 'rm -fr `echo "${tcl_config_files}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  9368 EOF
  9369 cat >> $CONFIG_STATUS <<EOF
  9370 
  9371 # Protect against being on the right side of a sed subst in config.status.
  9372 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  9373  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  9374 $ac_vpsub
  9375 $extrasub
  9376 s%@SHELL@%$SHELL%g
  9377 s%@CFLAGS@%$CFLAGS%g
  9378 s%@CPPFLAGS@%$CPPFLAGS%g
  9379 s%@CXXFLAGS@%$CXXFLAGS%g
  9380 s%@FFLAGS@%$FFLAGS%g
  9381 s%@DEFS@%$DEFS%g
  9382 s%@LDFLAGS@%$LDFLAGS%g
  9383 s%@LIBS@%$LIBS%g
  9384 s%@exec_prefix@%$exec_prefix%g
  9385 s%@prefix@%$prefix%g
  9386 s%@program_transform_name@%$program_transform_name%g
  9387 s%@bindir@%$bindir%g
  9388 s%@sbindir@%$sbindir%g
  9389 s%@libexecdir@%$libexecdir%g
  9390 s%@datadir@%$datadir%g
  9391 s%@sysconfdir@%$sysconfdir%g
  9392 s%@sharedstatedir@%$sharedstatedir%g
  9393 s%@localstatedir@%$localstatedir%g
  9394 s%@libdir@%$libdir%g
  9395 s%@includedir@%$includedir%g
  9396 s%@oldincludedir@%$oldincludedir%g
  9397 s%@infodir@%$infodir%g
  9398 s%@mandir@%$mandir%g
  9399 s%@MAN_FLAGS@%$MAN_FLAGS%g
  9400 s%@CC@%$CC%g
  9401 s%@CPP@%$CPP%g
  9402 s%@TCL_THREADS@%$TCL_THREADS%g
  9403 s%@TCL_LIBS@%$TCL_LIBS%g
  9404 s%@MATH_LIBS@%$MATH_LIBS%g
  9405 s%@RANLIB@%$RANLIB%g
  9406 s%@AR@%$AR%g
  9407 s%@DL_LIBS@%$DL_LIBS%g
  9408 s%@DL_OBJS@%$DL_OBJS%g
  9409 s%@PLAT_OBJS@%$PLAT_OBJS%g
  9410 s%@PLAT_SRCS@%$PLAT_SRCS%g
  9411 s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
  9412 s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
  9413 s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
  9414 s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
  9415 s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
  9416 s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  9417 s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  9418 s%@STLIB_LD@%$STLIB_LD%g
  9419 s%@SHLIB_LD@%$SHLIB_LD%g
  9420 s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g
  9421 s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
  9422 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  9423 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  9424 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  9425 s%@MAKE_LIB@%$MAKE_LIB%g
  9426 s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
  9427 s%@INSTALL_LIB@%$INSTALL_LIB%g
  9428 s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
  9429 s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
  9430 s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
  9431 s%@LIBOBJS@%$LIBOBJS%g
  9432 s%@TCL_VERSION@%$TCL_VERSION%g
  9433 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
  9434 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
  9435 s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
  9436 s%@TCL_YEAR@%$TCL_YEAR%g
  9437 s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
  9438 s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
  9439 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
  9440 s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
  9441 s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
  9442 s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
  9443 s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
  9444 s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
  9445 s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
  9446 s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g
  9447 s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
  9448 s%@TCL_DBGX@%$TCL_DBGX%g
  9449 s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
  9450 s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
  9451 s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
  9452 s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
  9453 s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  9454 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
  9455 s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g
  9456 s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g
  9457 s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g
  9458 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
  9459 s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
  9460 s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
  9461 s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g
  9462 s%@BUILD_DLTEST@%$BUILD_DLTEST%g
  9463 s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
  9464 s%@TCL_LIBRARY@%$TCL_LIBRARY%g
  9465 s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g
  9466 s%@HTML_DIR@%$HTML_DIR%g
  9467 s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g
  9468 s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g
  9469 s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g
  9470 s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g
  9471 
  9472 CEOF
  9473 EOF
  9474 
  9475 cat >> $CONFIG_STATUS <<\EOF
  9476 
  9477 # Split the substitutions into bite-sized pieces for seds with
  9478 # small command number limits, like on Digital OSF/1 and HP-UX.
  9479 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  9480 ac_file=1 # Number of current file.
  9481 ac_beg=1 # First line for current file.
  9482 ac_end=$ac_max_sed_cmds # Line after last line for current file.
  9483 ac_more_lines=:
  9484 ac_sed_cmds=""
  9485 while $ac_more_lines; do
  9486   if test $ac_beg -gt 1; then
  9487     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  9488   else
  9489     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  9490   fi
  9491   if test ! -s conftest.s$ac_file; then
  9492     ac_more_lines=false
  9493     rm -f conftest.s$ac_file
  9494   else
  9495     if test -z "$ac_sed_cmds"; then
  9496       ac_sed_cmds="sed -f conftest.s$ac_file"
  9497     else
  9498       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  9499     fi
  9500     ac_file=`expr $ac_file + 1`
  9501     ac_beg=$ac_end
  9502     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  9503   fi
  9504 done
  9505 if test -z "$ac_sed_cmds"; then
  9506   ac_sed_cmds=cat
  9507 fi
  9508 EOF
  9509 
  9510 cat >> $CONFIG_STATUS <<EOF
  9511 
  9512 CONFIG_FILES=\${CONFIG_FILES-"${tcl_config_files}"}
  9513 EOF
  9514 cat >> $CONFIG_STATUS <<\EOF
  9515 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  9516   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  9517   case "$ac_file" in
  9518   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  9519        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  9520   *) ac_file_in="${ac_file}.in" ;;
  9521   esac
  9522 
  9523   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  9524 
  9525   # Remove last slash and all that follows it.  Not all systems have dirname.
  9526   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  9527   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  9528     # The file is in a subdirectory.
  9529     test ! -d "$ac_dir" && mkdir "$ac_dir"
  9530     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  9531     # A "../" for each directory in $ac_dir_suffix.
  9532     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  9533   else
  9534     ac_dir_suffix= ac_dots=
  9535   fi
  9536 
  9537   case "$ac_given_srcdir" in
  9538   .)  srcdir=.
  9539       if test -z "$ac_dots"; then top_srcdir=.
  9540       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  9541   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  9542   *) # Relative path.
  9543     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  9544     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  9545   esac
  9546 
  9547 
  9548   echo creating "$ac_file"
  9549   rm -f "$ac_file"
  9550   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  9551   case "$ac_file" in
  9552   *Makefile*) ac_comsub="1i\\
  9553 # $configure_input" ;;
  9554   *) ac_comsub= ;;
  9555   esac
  9556 
  9557   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  9558   sed -e "$ac_comsub
  9559 s%@configure_input@%$configure_input%g
  9560 s%@srcdir@%$srcdir%g
  9561 s%@top_srcdir@%$top_srcdir%g
  9562 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  9563 fi; done
  9564 rm -f conftest.s*
  9565 
  9566 EOF
  9567 cat >> $CONFIG_STATUS <<EOF
  9568 VERSION=${TCL_VERSION} FRAMEWORK_BUILD=${FRAMEWORK_BUILD}
  9569 
  9570 EOF
  9571 cat >> $CONFIG_STATUS <<\EOF
  9572 test "$FRAMEWORK_BUILD" = "1" && n=Tcl &&
  9573 	f=$n.framework && v=Versions/$VERSION &&
  9574 	echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources &&
  9575 	ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
  9576 	ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
  9577 	unset n f v
  9578     
  9579 
  9580 exit 0
  9581 EOF
  9582 chmod +x $CONFIG_STATUS
  9583 rm -fr confdefs* $ac_clean_files
  9584 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  9585