1#! /bin/sh 2 3# Guess values for system-dependent variables and create Makefiles. 4# Generated automatically using autoconf version 2.4.2 5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. 6# 7# This configure script is free software; the Free Software Foundation 8# gives unlimited permission to copy, distribute and modify it. 9 10# Defaults: 11ac_help= 12ac_default_prefix=/usr/local 13# Any additions from configure.in: 14ac_help="$ac_help 15 --enable-gcc allow use of gcc if available" 16ac_help="$ac_help 17 --disable-load disallow dynamic loading and "load" command" 18ac_help="$ac_help 19 --enable-shared build libtcl as a shared library" 20 21# Initialize some variables set by options. 22# The variables have the same names as the options, with 23# dashes changed to underlines. 24build=NONE 25cache_file=./config.cache 26exec_prefix=NONE 27host=NONE 28no_create= 29nonopt=NONE 30no_recursion= 31prefix=NONE 32program_prefix=NONE 33program_suffix=NONE 34program_transform_name=s,x,x, 35silent= 36site= 37srcdir= 38target=NONE 39verbose= 40x_includes=NONE 41x_libraries=NONE 42bindir='${exec_prefix}/bin' 43sbindir='${exec_prefix}/sbin' 44libexecdir='${exec_prefix}/libexec' 45datadir='${prefix}/share' 46sysconfdir='${prefix}/etc' 47sharedstatedir='${prefix}/com' 48localstatedir='${prefix}/var' 49libdir='${exec_prefix}/lib' 50includedir='${prefix}/include' 51oldincludedir='/usr/include' 52infodir='${prefix}/info' 53mandir='${prefix}/man' 54 55# Initialize some other variables. 56subdirs= 57 58ac_prev= 59for ac_option 60do 61 62 # If the previous option needs an argument, assign it. 63 if test -n "$ac_prev"; then 64 eval "$ac_prev=\$ac_option" 65 ac_prev= 66 continue 67 fi 68 69 case "$ac_option" in 70 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 71 *) ac_optarg= ;; 72 esac 73 74 # Accept the important Cygnus configure options, so we can diagnose typos. 75 76 case "$ac_option" in 77 78 -bindir | --bindir | --bindi | --bind | --bin | --bi) 79 ac_prev=bindir ;; 80 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 81 bindir="$ac_optarg" ;; 82 83 -build | --build | --buil | --bui | --bu) 84 ac_prev=build ;; 85 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 86 build="$ac_optarg" ;; 87 88 -cache-file | --cache-file | --cache-fil | --cache-fi \ 89 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 90 ac_prev=cache_file ;; 91 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 92 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 93 cache_file="$ac_optarg" ;; 94 95 -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 96 ac_prev=datadir ;; 97 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 98 | --da=*) 99 datadir="$ac_optarg" ;; 100 101 -disable-* | --disable-*) 102 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 103 # Reject names that are not valid shell variable names. 104 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 105 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 106 fi 107 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 108 eval "enable_${ac_feature}=no" ;; 109 110 -enable-* | --enable-*) 111 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 112 # Reject names that are not valid shell variable names. 113 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 114 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 115 fi 116 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 117 case "$ac_option" in 118 *=*) ;; 119 *) ac_optarg=yes ;; 120 esac 121 eval "enable_${ac_feature}='$ac_optarg'" ;; 122 123 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 124 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 125 | --exec | --exe | --ex) 126 ac_prev=exec_prefix ;; 127 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 128 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 129 | --exec=* | --exe=* | --ex=*) 130 exec_prefix="$ac_optarg" ;; 131 132 -gas | --gas | --ga | --g) 133 # Obsolete; use --with-gas. 134 with_gas=yes ;; 135 136 -help | --help | --hel | --he) 137 # Omit some internal or obsolete options to make the list less imposing. 138 # This message is too long to be a string in the A/UX 3.1 sh. 139 cat << EOF 140Usage: configure [options] [host] 141Options: [defaults in brackets after descriptions] 142Configuration: 143 --cache-file=FILE cache test results in FILE 144 --help print this message 145 --no-create do not create output files 146 --quiet, --silent do not print \`checking...' messages 147 --version print the version of autoconf that created configure 148Directory and file names: 149 --prefix=PREFIX install architecture-independent files in PREFIX 150 [$ac_default_prefix] 151 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 152 [same as prefix] 153 --bindir=DIR user executables in DIR [EPREFIX/bin] 154 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 155 --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 156 --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] 157 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 158 --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] 159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 160 --libdir=DIR object code libraries in DIR [EPREFIX/lib] 161 --includedir=DIR C header files in DIR [PREFIX/include] 162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 163 --infodir=DIR info documentation in DIR [PREFIX/info] 164 --mandir=DIR man documentation in DIR [PREFIX/man] 165 --srcdir=DIR find the sources in DIR [configure dir or ..] 166 --program-prefix=PREFIX prepend PREFIX to installed program names 167 --program-suffix=SUFFIX append SUFFIX to installed program names 168 --program-transform-name=PROGRAM run sed PROGRAM on installed program names 169EOF 170 cat << EOF 171Host type: 172 --build=BUILD configure for building on BUILD [BUILD=HOST] 173 --host=HOST configure for HOST [guessed] 174 --target=TARGET configure for TARGET [TARGET=HOST] 175Features and packages: 176 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 177 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 178 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 179 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 180 --x-includes=DIR X include files are in DIR 181 --x-libraries=DIR X library files are in DIR 182--enable and --with options recognized:$ac_help 183EOF 184 exit 0 ;; 185 186 -host | --host | --hos | --ho) 187 ac_prev=host ;; 188 -host=* | --host=* | --hos=* | --ho=*) 189 host="$ac_optarg" ;; 190 191 -includedir | --includedir | --includedi | --included | --include \ 192 | --includ | --inclu | --incl | --inc) 193 ac_prev=includedir ;; 194 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 195 | --includ=* | --inclu=* | --incl=* | --inc=*) 196 includedir="$ac_optarg" ;; 197 198 -infodir | --infodir | --infodi | --infod | --info | --inf) 199 ac_prev=infodir ;; 200 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 201 infodir="$ac_optarg" ;; 202 203 -libdir | --libdir | --libdi | --libd) 204 ac_prev=libdir ;; 205 -libdir=* | --libdir=* | --libdi=* | --libd=*) 206 libdir="$ac_optarg" ;; 207 208 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 209 | --libexe | --libex | --libe) 210 ac_prev=libexecdir ;; 211 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 212 | --libexe=* | --libex=* | --libe=*) 213 libexecdir="$ac_optarg" ;; 214 215 -localstatedir | --localstatedir | --localstatedi | --localstated \ 216 | --localstate | --localstat | --localsta | --localst \ 217 | --locals | --local | --loca | --loc | --lo) 218 ac_prev=localstatedir ;; 219 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 220 | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 221 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 222 localstatedir="$ac_optarg" ;; 223 224 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 225 ac_prev=mandir ;; 226 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 227 mandir="$ac_optarg" ;; 228 229 -nfp | --nfp | --nf) 230 # Obsolete; use --without-fp. 231 with_fp=no ;; 232 233 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 234 | --no-cr | --no-c) 235 no_create=yes ;; 236 237 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 238 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 239 no_recursion=yes ;; 240 241 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 242 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 243 | --oldin | --oldi | --old | --ol | --o) 244 ac_prev=oldincludedir ;; 245 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 246 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 247 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 248 oldincludedir="$ac_optarg" ;; 249 250 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 251 ac_prev=prefix ;; 252 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 253 prefix="$ac_optarg" ;; 254 255 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 256 | --program-pre | --program-pr | --program-p) 257 ac_prev=program_prefix ;; 258 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 259 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 260 program_prefix="$ac_optarg" ;; 261 262 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 263 | --program-suf | --program-su | --program-s) 264 ac_prev=program_suffix ;; 265 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 266 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 267 program_suffix="$ac_optarg" ;; 268 269 -program-transform-name | --program-transform-name \ 270 | --program-transform-nam | --program-transform-na \ 271 | --program-transform-n | --program-transform- \ 272 | --program-transform | --program-transfor \ 273 | --program-transfo | --program-transf \ 274 | --program-trans | --program-tran \ 275 | --progr-tra | --program-tr | --program-t) 276 ac_prev=program_transform_name ;; 277 -program-transform-name=* | --program-transform-name=* \ 278 | --program-transform-nam=* | --program-transform-na=* \ 279 | --program-transform-n=* | --program-transform-=* \ 280 | --program-transform=* | --program-transfor=* \ 281 | --program-transfo=* | --program-transf=* \ 282 | --program-trans=* | --program-tran=* \ 283 | --progr-tra=* | --program-tr=* | --program-t=*) 284 program_transform_name="$ac_optarg" ;; 285 286 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 287 | -silent | --silent | --silen | --sile | --sil) 288 silent=yes ;; 289 290 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 291 ac_prev=sbindir ;; 292 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 293 | --sbi=* | --sb=*) 294 sbindir="$ac_optarg" ;; 295 296 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 297 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 298 | --sharedst | --shareds | --shared | --share | --shar \ 299 | --sha | --sh) 300 ac_prev=sharedstatedir ;; 301 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 302 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 303 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 304 | --sha=* | --sh=*) 305 sharedstatedir="$ac_optarg" ;; 306 307 -site | --site | --sit) 308 ac_prev=site ;; 309 -site=* | --site=* | --sit=*) 310 site="$ac_optarg" ;; 311 312 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 313 ac_prev=srcdir ;; 314 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 315 srcdir="$ac_optarg" ;; 316 317 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 318 | --syscon | --sysco | --sysc | --sys | --sy) 319 ac_prev=sysconfdir ;; 320 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 321 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 322 sysconfdir="$ac_optarg" ;; 323 324 -target | --target | --targe | --targ | --tar | --ta | --t) 325 ac_prev=target ;; 326 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 327 target="$ac_optarg" ;; 328 329 -v | -verbose | --verbose | --verbos | --verbo | --verb) 330 verbose=yes ;; 331 332 -version | --version | --versio | --versi | --vers) 333 echo "configure generated by autoconf version 2.4.2" 334 exit 0 ;; 335 336 -with-* | --with-*) 337 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 338 # Reject names that are not valid shell variable names. 339 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 340 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 341 fi 342 ac_package=`echo $ac_package| sed 's/-/_/g'` 343 case "$ac_option" in 344 *=*) ;; 345 *) ac_optarg=yes ;; 346 esac 347 eval "with_${ac_package}='$ac_optarg'" ;; 348 349 -without-* | --without-*) 350 ac_package=`echo $ac_option|sed -e 's/-*without-//'` 351 # Reject names that are not valid shell variable names. 352 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 354 fi 355 ac_package=`echo $ac_package| sed 's/-/_/g'` 356 eval "with_${ac_package}=no" ;; 357 358 --x) 359 # Obsolete; use --with-x. 360 with_x=yes ;; 361 362 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 363 | --x-incl | --x-inc | --x-in | --x-i) 364 ac_prev=x_includes ;; 365 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 366 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 367 x_includes="$ac_optarg" ;; 368 369 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 370 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 371 ac_prev=x_libraries ;; 372 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 373 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 374 x_libraries="$ac_optarg" ;; 375 376 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 377 ;; 378 379 *) 380 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 381 echo "configure: warning: $ac_option: invalid host type" 1>&2 382 fi 383 if test "x$nonopt" != xNONE; then 384 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 385 fi 386 nonopt="$ac_option" 387 ;; 388 389 esac 390done 391 392if test -n "$ac_prev"; then 393 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 394fi 395 396trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 397 398# File descriptor usage: 399# 0 standard input 400# 1 file creation 401# 2 errors and warnings 402# 3 some systems may open it to /dev/tty 403# 4 used on the Kubota Titan 404# 6 checking for... messages and results 405# 5 compiler messages saved in config.log 406if test "$silent" = yes; then 407 exec 6>/dev/null 408else 409 exec 6>&1 410fi 411exec 5>./config.log 412 413echo "\ 414This file contains any messages produced by compilers while 415running configure, to aid debugging if configure makes a mistake. 416" 1>&5 417 418# Strip out --no-create and --no-recursion so they do not pile up. 419# Also quote any args containing shell metacharacters. 420ac_configure_args= 421for ac_arg 422do 423 case "$ac_arg" in 424 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 425 | --no-cr | --no-c) ;; 426 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 427 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 428 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 429 ac_configure_args="$ac_configure_args '$ac_arg'" ;; 430 *) ac_configure_args="$ac_configure_args $ac_arg" ;; 431 esac 432done 433 434# NLS nuisances. 435# Only set LANG and LC_ALL to C if already set. 436# These must not be set unconditionally because not all systems understand 437# e.g. LANG=C (notably SCO). 438if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 439if test "${LANG+set}" = set; then LANG=C; export LANG; fi 440 441# confdefs.h avoids OS command line length limits that DEFS can exceed. 442rm -rf conftest* confdefs.h 443# AIX cpp loses on an empty file, so make sure it contains at least a newline. 444echo > confdefs.h 445 446# A filename unique to this package, relative to the directory that 447# configure is in, which we can look for to find out if srcdir is correct. 448ac_unique_file=../generic/tcl.h 449 450# Find the source files, if location was not specified. 451if test -z "$srcdir"; then 452 ac_srcdir_defaulted=yes 453 # Try the directory containing this script, then its parent. 454 ac_prog=$0 455 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 456 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 457 srcdir=$ac_confdir 458 if test ! -r $srcdir/$ac_unique_file; then 459 srcdir=.. 460 fi 461else 462 ac_srcdir_defaulted=no 463fi 464if test ! -r $srcdir/$ac_unique_file; then 465 if test "$ac_srcdir_defaulted" = yes; then 466 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 467 else 468 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 469 fi 470fi 471srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 472 473# Prefer explicitly selected file to automatically selected ones. 474if test -z "$CONFIG_SITE"; then 475 if test "x$prefix" != xNONE; then 476 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 477 else 478 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 479 fi 480fi 481for ac_site_file in $CONFIG_SITE; do 482 if test -r "$ac_site_file"; then 483 echo "loading site script $ac_site_file" 484 . "$ac_site_file" 485 fi 486done 487 488if test -r "$cache_file"; then 489 echo "loading cache $cache_file" 490 . $cache_file 491else 492 echo "creating cache $cache_file" 493 > $cache_file 494fi 495 496ac_ext=c 497# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 498ac_cpp='echo $CPP $CPPFLAGS 1>&5; 499$CPP $CPPFLAGS' 500ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; 501${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' 502ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; 503${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' 504 505if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 506 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 507 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 508 ac_n= ac_c=' 509' ac_t=' ' 510 else 511 ac_n=-n ac_c= ac_t= 512 fi 513else 514 ac_n= ac_c='\c' ac_t= 515fi 516 517 518# SCCS: @(#) configure.in 1.133 97/01/22 08:49:02 519 520TCL_VERSION=8.0 521TCL_MAJOR_VERSION=8 522TCL_MINOR_VERSION=0 523TCL_PATCH_LEVEL=a2 524VERSION=${TCL_VERSION} 525 526if test "${prefix}" = "NONE"; then 527 prefix=/usr/local 528fi 529if test "${exec_prefix}" = "NONE"; then 530 exec_prefix=$prefix 531fi 532TCL_SRC_DIR=`cd $srcdir/..; pwd` 533 534# Extract the first word of "ranlib", so it can be a program name with args. 535set dummy ranlib; ac_word=$2 536echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 537if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 538 echo $ac_n "(cached) $ac_c" 1>&6 539else 540 if test -n "$RANLIB"; then 541 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 542else 543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 544 for ac_dir in :; do 545 test -z "$ac_dir" && ac_dir=. 546 if test -f $ac_dir/$ac_word; then 547 ac_cv_prog_RANLIB="ranlib" 548 break 549 fi 550 done 551 IFS="$ac_save_ifs" 552 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" 553fi 554fi 555RANLIB="$ac_cv_prog_RANLIB" 556if test -n "$RANLIB"; then 557 echo "$ac_t""$RANLIB" 1>&6 558else 559 echo "$ac_t""no" 1>&6 560fi 561 562# Check whether --enable-gcc or --disable-gcc was given. 563if test "${enable_gcc+set}" = set; then 564 enableval="$enable_gcc" 565 tcl_ok=$enableval 566else 567 tcl_ok=no 568fi 569 570if test "$tcl_ok" = "yes"; then 571 # Extract the first word of "gcc", so it can be a program name with args. 572set dummy gcc; ac_word=$2 573echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 574if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 575 echo $ac_n "(cached) $ac_c" 1>&6 576else 577 if test -n "$CC"; then 578 ac_cv_prog_CC="$CC" # Let the user override the test. 579else 580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 581 for ac_dir in cc; do 582 test -z "$ac_dir" && ac_dir=. 583 if test -f $ac_dir/$ac_word; then 584 ac_cv_prog_CC="gcc" 585 break 586 fi 587 done 588 IFS="$ac_save_ifs" 589 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" 590fi 591fi 592CC="$ac_cv_prog_CC" 593if test -n "$CC"; then 594 echo "$ac_t""$CC" 1>&6 595else 596 echo "$ac_t""no" 1>&6 597fi 598 599 600echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 601if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 602 echo $ac_n "(cached) $ac_c" 1>&6 603else 604 cat > conftest.c <<EOF 605#ifdef __GNUC__ 606 yes; 607#endif 608EOF 609if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then 610 ac_cv_prog_gcc=yes 611else 612 ac_cv_prog_gcc=no 613fi 614fi 615 616echo "$ac_t""$ac_cv_prog_gcc" 1>&6 617if test $ac_cv_prog_gcc = yes; then 618 GCC=yes 619 if test "${CFLAGS+set}" != set; then 620 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 621if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then 622 echo $ac_n "(cached) $ac_c" 1>&6 623else 624 echo 'void f(){}' > conftest.c 625if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 626 ac_cv_prog_gcc_g=yes 627else 628 ac_cv_prog_gcc_g=no 629fi 630rm -f conftest* 631 632fi 633 634echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 635 if test $ac_cv_prog_gcc_g = yes; then 636 CFLAGS="-g -O" 637 else 638 CFLAGS="-O" 639 fi 640 fi 641else 642 GCC= 643 test "${CFLAGS+set}" = set || CFLAGS="-g" 644fi 645 646else 647 CC=${CC-cc} 648 649fi 650# If we cannot run a trivial program, we must be cross compiling. 651echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 652if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then 653 echo $ac_n "(cached) $ac_c" 1>&6 654else 655 if test "$cross_compiling" = yes; then 656 ac_cv_c_cross=yes 657else 658cat > conftest.$ac_ext <<EOF 659#line 660 "configure" 660#include "confdefs.h" 661main(){return(0);} 662EOF 663eval $ac_link 664if test -s conftest && (./conftest; exit) 2>/dev/null; then 665 ac_cv_c_cross=no 666else 667 ac_cv_c_cross=yes 668fi 669fi 670rm -fr conftest* 671fi 672 673echo "$ac_t""$ac_cv_c_cross" 1>&6 674cross_compiling=$ac_cv_c_cross 675 676 677#-------------------------------------------------------------------- 678# Supply substitutes for missing POSIX library procedures, or 679# set flags so Tcl uses alternate procedures. 680#-------------------------------------------------------------------- 681 682for ac_func in getcwd opendir strstr 683do 684echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 685if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 686 echo $ac_n "(cached) $ac_c" 1>&6 687else 688 cat > conftest.$ac_ext <<EOF 689#line 690 "configure" 690#include "confdefs.h" 691/* System header to define __stub macros and hopefully few prototypes, 692 which can conflict with char $ac_func(); below. */ 693#include <assert.h> 694/* Override any gcc2 internal prototype to avoid an error. */ 695char $ac_func(); 696 697int main() { return 0; } 698int t() { 699 700/* The GNU C library defines this for functions which it implements 701 to always fail with ENOSYS. Some functions are actually named 702 something starting with __ and the normal name is an alias. */ 703#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 704choke me 705#else 706$ac_func(); 707#endif 708 709; return 0; } 710EOF 711if eval $ac_link; then 712 rm -rf conftest* 713 eval "ac_cv_func_$ac_func=yes" 714else 715 rm -rf conftest* 716 eval "ac_cv_func_$ac_func=no" 717fi 718rm -f conftest* 719 720fi 721if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 722 echo "$ac_t""yes" 1>&6 723 : 724else 725 echo "$ac_t""no" 1>&6 726LIBOBJS="$LIBOBJS ${ac_func}.o" 727fi 728 729done 730 731for ac_func in strtol tmpnam waitpid 732do 733echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 734if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 735 echo $ac_n "(cached) $ac_c" 1>&6 736else 737 cat > conftest.$ac_ext <<EOF 738#line 739 "configure" 739#include "confdefs.h" 740/* System header to define __stub macros and hopefully few prototypes, 741 which can conflict with char $ac_func(); below. */ 742#include <assert.h> 743/* Override any gcc2 internal prototype to avoid an error. */ 744char $ac_func(); 745 746int main() { return 0; } 747int t() { 748 749/* The GNU C library defines this for functions which it implements 750 to always fail with ENOSYS. Some functions are actually named 751 something starting with __ and the normal name is an alias. */ 752#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 753choke me 754#else 755$ac_func(); 756#endif 757 758; return 0; } 759EOF 760if eval $ac_link; then 761 rm -rf conftest* 762 eval "ac_cv_func_$ac_func=yes" 763else 764 rm -rf conftest* 765 eval "ac_cv_func_$ac_func=no" 766fi 767rm -f conftest* 768 769fi 770if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 771 echo "$ac_t""yes" 1>&6 772 : 773else 774 echo "$ac_t""no" 1>&6 775LIBOBJS="$LIBOBJS ${ac_func}.o" 776fi 777 778done 779 780echo $ac_n "checking for strerror""... $ac_c" 1>&6 781if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then 782 echo $ac_n "(cached) $ac_c" 1>&6 783else 784 cat > conftest.$ac_ext <<EOF 785#line 786 "configure" 786#include "confdefs.h" 787/* System header to define __stub macros and hopefully few prototypes, 788 which can conflict with char strerror(); below. */ 789#include <assert.h> 790/* Override any gcc2 internal prototype to avoid an error. */ 791char strerror(); 792 793int main() { return 0; } 794int t() { 795 796/* The GNU C library defines this for functions which it implements 797 to always fail with ENOSYS. Some functions are actually named 798 something starting with __ and the normal name is an alias. */ 799#if defined (__stub_strerror) || defined (__stub___strerror) 800choke me 801#else 802strerror(); 803#endif 804 805; return 0; } 806EOF 807if eval $ac_link; then 808 rm -rf conftest* 809 eval "ac_cv_func_strerror=yes" 810else 811 rm -rf conftest* 812 eval "ac_cv_func_strerror=no" 813fi 814rm -f conftest* 815 816fi 817if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then 818 echo "$ac_t""yes" 1>&6 819 : 820else 821 echo "$ac_t""no" 1>&6 822cat >> confdefs.h <<\EOF 823#define NO_STRERROR 1 824EOF 825 826fi 827 828echo $ac_n "checking for getwd""... $ac_c" 1>&6 829if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then 830 echo $ac_n "(cached) $ac_c" 1>&6 831else 832 cat > conftest.$ac_ext <<EOF 833#line 834 "configure" 834#include "confdefs.h" 835/* System header to define __stub macros and hopefully few prototypes, 836 which can conflict with char getwd(); below. */ 837#include <assert.h> 838/* Override any gcc2 internal prototype to avoid an error. */ 839char getwd(); 840 841int main() { return 0; } 842int t() { 843 844/* The GNU C library defines this for functions which it implements 845 to always fail with ENOSYS. Some functions are actually named 846 something starting with __ and the normal name is an alias. */ 847#if defined (__stub_getwd) || defined (__stub___getwd) 848choke me 849#else 850getwd(); 851#endif 852 853; return 0; } 854EOF 855if eval $ac_link; then 856 rm -rf conftest* 857 eval "ac_cv_func_getwd=yes" 858else 859 rm -rf conftest* 860 eval "ac_cv_func_getwd=no" 861fi 862rm -f conftest* 863 864fi 865if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then 866 echo "$ac_t""yes" 1>&6 867 : 868else 869 echo "$ac_t""no" 1>&6 870cat >> confdefs.h <<\EOF 871#define NO_GETWD 1 872EOF 873 874fi 875 876echo $ac_n "checking for wait3""... $ac_c" 1>&6 877if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then 878 echo $ac_n "(cached) $ac_c" 1>&6 879else 880 cat > conftest.$ac_ext <<EOF 881#line 882 "configure" 882#include "confdefs.h" 883/* System header to define __stub macros and hopefully few prototypes, 884 which can conflict with char wait3(); below. */ 885#include <assert.h> 886/* Override any gcc2 internal prototype to avoid an error. */ 887char wait3(); 888 889int main() { return 0; } 890int t() { 891 892/* The GNU C library defines this for functions which it implements 893 to always fail with ENOSYS. Some functions are actually named 894 something starting with __ and the normal name is an alias. */ 895#if defined (__stub_wait3) || defined (__stub___wait3) 896choke me 897#else 898wait3(); 899#endif 900 901; return 0; } 902EOF 903if eval $ac_link; then 904 rm -rf conftest* 905 eval "ac_cv_func_wait3=yes" 906else 907 rm -rf conftest* 908 eval "ac_cv_func_wait3=no" 909fi 910rm -f conftest* 911 912fi 913if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then 914 echo "$ac_t""yes" 1>&6 915 : 916else 917 echo "$ac_t""no" 1>&6 918cat >> confdefs.h <<\EOF 919#define NO_WAIT3 1 920EOF 921 922fi 923 924echo $ac_n "checking for uname""... $ac_c" 1>&6 925if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then 926 echo $ac_n "(cached) $ac_c" 1>&6 927else 928 cat > conftest.$ac_ext <<EOF 929#line 930 "configure" 930#include "confdefs.h" 931/* System header to define __stub macros and hopefully few prototypes, 932 which can conflict with char uname(); below. */ 933#include <assert.h> 934/* Override any gcc2 internal prototype to avoid an error. */ 935char uname(); 936 937int main() { return 0; } 938int t() { 939 940/* The GNU C library defines this for functions which it implements 941 to always fail with ENOSYS. Some functions are actually named 942 something starting with __ and the normal name is an alias. */ 943#if defined (__stub_uname) || defined (__stub___uname) 944choke me 945#else 946uname(); 947#endif 948 949; return 0; } 950EOF 951if eval $ac_link; then 952 rm -rf conftest* 953 eval "ac_cv_func_uname=yes" 954else 955 rm -rf conftest* 956 eval "ac_cv_func_uname=no" 957fi 958rm -f conftest* 959 960fi 961if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then 962 echo "$ac_t""yes" 1>&6 963 : 964else 965 echo "$ac_t""no" 1>&6 966cat >> confdefs.h <<\EOF 967#define NO_UNAME 1 968EOF 969 970fi 971 972 973#-------------------------------------------------------------------- 974# On a few very rare systems, all of the libm.a stuff is 975# already in libc.a. Set compiler flags accordingly. 976# Also, Linux requires the "ieee" library for math to work 977# right (and it must appear before "-lm"). 978#-------------------------------------------------------------------- 979 980echo $ac_n "checking for sin""... $ac_c" 1>&6 981if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then 982 echo $ac_n "(cached) $ac_c" 1>&6 983else 984 cat > conftest.$ac_ext <<EOF 985#line 986 "configure" 986#include "confdefs.h" 987/* System header to define __stub macros and hopefully few prototypes, 988 which can conflict with char sin(); below. */ 989#include <assert.h> 990/* Override any gcc2 internal prototype to avoid an error. */ 991char sin(); 992 993int main() { return 0; } 994int t() { 995 996/* The GNU C library defines this for functions which it implements 997 to always fail with ENOSYS. Some functions are actually named 998 something starting with __ and the normal name is an alias. */ 999#if defined (__stub_sin) || defined (__stub___sin) 1000choke me 1001#else 1002sin(); 1003#endif 1004 1005; return 0; } 1006EOF 1007if eval $ac_link; then 1008 rm -rf conftest* 1009 eval "ac_cv_func_sin=yes" 1010else 1011 rm -rf conftest* 1012 eval "ac_cv_func_sin=no" 1013fi 1014rm -f conftest* 1015 1016fi 1017if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then 1018 echo "$ac_t""yes" 1>&6 1019 MATH_LIBS="" 1020else 1021 echo "$ac_t""no" 1>&6 1022MATH_LIBS="-lm" 1023fi 1024 1025echo $ac_n "checking for -lieee""... $ac_c" 1>&6 1026ac_lib_var=`echo ieee | tr '+./' 'p__'` 1027if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1028 echo $ac_n "(cached) $ac_c" 1>&6 1029else 1030 ac_save_LIBS="$LIBS" 1031LIBS="-lieee $LIBS" 1032cat > conftest.$ac_ext <<EOF 1033#line 1034 "configure" 1034#include "confdefs.h" 1035 1036int main() { return 0; } 1037int t() { 1038main() 1039; return 0; } 1040EOF 1041if eval $ac_link; then 1042 rm -rf conftest* 1043 eval "ac_cv_lib_$ac_lib_var=yes" 1044else 1045 rm -rf conftest* 1046 eval "ac_cv_lib_$ac_lib_var=no" 1047fi 1048rm -f conftest* 1049LIBS="$ac_save_LIBS" 1050 1051fi 1052if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1053 echo "$ac_t""yes" 1>&6 1054 MATH_LIBS="-lieee $MATH_LIBS" 1055else 1056 echo "$ac_t""no" 1>&6 1057fi 1058 1059 1060#-------------------------------------------------------------------- 1061# On AIX systems, libbsd.a has to be linked in to support 1062# non-blocking file IO. This library has to be linked in after 1063# the MATH_LIBS or it breaks the pow() function. The way to 1064# insure proper sequencing, is to add it to the tail of MATH_LIBS. 1065# This library also supplies gettimeofday. 1066#-------------------------------------------------------------------- 1067libbsd=no 1068if test "`uname -s`" = "AIX" ; then 1069 echo $ac_n "checking for -lbsd""... $ac_c" 1>&6 1070ac_lib_var=`echo bsd | tr '+./' 'p__'` 1071if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 1072 echo $ac_n "(cached) $ac_c" 1>&6 1073else 1074 ac_save_LIBS="$LIBS" 1075LIBS="-lbsd $LIBS" 1076cat > conftest.$ac_ext <<EOF 1077#line 1078 "configure" 1078#include "confdefs.h" 1079 1080int main() { return 0; } 1081int t() { 1082gettimeofday() 1083; return 0; } 1084EOF 1085if eval $ac_link; then 1086 rm -rf conftest* 1087 eval "ac_cv_lib_$ac_lib_var=yes" 1088else 1089 rm -rf conftest* 1090 eval "ac_cv_lib_$ac_lib_var=no" 1091fi 1092rm -f conftest* 1093LIBS="$ac_save_LIBS" 1094 1095fi 1096if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 1097 echo "$ac_t""yes" 1>&6 1098 libbsd=yes 1099else 1100 echo "$ac_t""no" 1>&6 1101fi 1102 1103 if test $libbsd = yes; then 1104 MATH_LIBS="$MATH_LIBS -lbsd" 1105 fi 1106fi 1107 1108#-------------------------------------------------------------------- 1109# Supply substitutes for missing POSIX header files. Special 1110# notes: 1111# - stdlib.h doesn't define strtol, strtoul, or 1112# strtod insome versions of SunOS 1113# - some versions of string.h don't declare procedures such 1114# as strstr 1115#-------------------------------------------------------------------- 1116 1117echo $ac_n "checking dirent.h""... $ac_c" 1>&6 1118cat > conftest.$ac_ext <<EOF 1119#line 1120 "configure" 1120#include "confdefs.h" 1121#include <sys/types.h> 1122#include <dirent.h> 1123int main() { return 0; } 1124int t() { 1125 1126#ifndef _POSIX_SOURCE 1127# ifdef __Lynx__ 1128 /* 1129 * Generate compilation error to make the test fail: Lynx headers 1130 * are only valid if really in the POSIX environment. 1131 */ 1132 1133 missing_procedure(); 1134# endif 1135#endif 1136DIR *d; 1137struct dirent *entryPtr; 1138char *p; 1139d = opendir("foobar"); 1140entryPtr = readdir(d); 1141p = entryPtr->d_name; 1142closedir(d); 1143 1144; return 0; } 1145EOF 1146if eval $ac_link; then 1147 rm -rf conftest* 1148 tcl_ok=yes 1149else 1150 rm -rf conftest* 1151 tcl_ok=no 1152fi 1153rm -f conftest* 1154 1155if test $tcl_ok = no; then 1156 cat >> confdefs.h <<\EOF 1157#define NO_DIRENT_H 1 1158EOF 1159 1160fi 1161echo "$ac_t""$tcl_ok" 1>&6 1162echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1163# On Suns, sometimes $CPP names a directory. 1164if test -n "$CPP" && test -d "$CPP"; then 1165 CPP= 1166fi 1167if test -z "$CPP"; then 1168if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then 1169 echo $ac_n "(cached) $ac_c" 1>&6 1170else 1171 # This must be in double quotes, not single quotes, because CPP may get 1172 # substituted into the Makefile and "${CC-cc}" will confuse make. 1173 CPP="${CC-cc} -E" 1174 # On the NeXT, cc -E runs the code through the compiler's parser, 1175 # not just through cpp. 1176 cat > conftest.$ac_ext <<EOF 1177#line 1178 "configure" 1178#include "confdefs.h" 1179#include <assert.h> 1180Syntax Error 1181EOF 1182eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1183ac_err=`grep -v '^ *+' conftest.out` 1184if test -z "$ac_err"; then 1185 : 1186else 1187 echo "$ac_err" >&5 1188 rm -rf conftest* 1189 CPP="${CC-cc} -E -traditional-cpp" 1190 cat > conftest.$ac_ext <<EOF 1191#line 1192 "configure" 1192#include "confdefs.h" 1193#include <assert.h> 1194Syntax Error 1195EOF 1196eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1197ac_err=`grep -v '^ *+' conftest.out` 1198if test -z "$ac_err"; then 1199 : 1200else 1201 echo "$ac_err" >&5 1202 rm -rf conftest* 1203 CPP=/lib/cpp 1204fi 1205rm -f conftest* 1206fi 1207rm -f conftest* 1208 ac_cv_prog_CPP="$CPP" 1209fi 1210 CPP="$ac_cv_prog_CPP" 1211else 1212 ac_cv_prog_CPP="$CPP" 1213fi 1214echo "$ac_t""$CPP" 1>&6 1215 1216ac_safe=`echo "errno.h" | tr './\055' '___'` 1217echo $ac_n "checking for errno.h""... $ac_c" 1>&6 1218if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1219 echo $ac_n "(cached) $ac_c" 1>&6 1220else 1221 cat > conftest.$ac_ext <<EOF 1222#line 1223 "configure" 1223#include "confdefs.h" 1224#include <errno.h> 1225EOF 1226eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1227ac_err=`grep -v '^ *+' conftest.out` 1228if test -z "$ac_err"; then 1229 rm -rf conftest* 1230 eval "ac_cv_header_$ac_safe=yes" 1231else 1232 echo "$ac_err" >&5 1233 rm -rf conftest* 1234 eval "ac_cv_header_$ac_safe=no" 1235fi 1236rm -f conftest* 1237fi 1238if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1239 echo "$ac_t""yes" 1>&6 1240 : 1241else 1242 echo "$ac_t""no" 1>&6 1243cat >> confdefs.h <<\EOF 1244#define NO_ERRNO_H 1 1245EOF 1246 1247fi 1248 1249ac_safe=`echo "float.h" | tr './\055' '___'` 1250echo $ac_n "checking for float.h""... $ac_c" 1>&6 1251if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1252 echo $ac_n "(cached) $ac_c" 1>&6 1253else 1254 cat > conftest.$ac_ext <<EOF 1255#line 1256 "configure" 1256#include "confdefs.h" 1257#include <float.h> 1258EOF 1259eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1260ac_err=`grep -v '^ *+' conftest.out` 1261if test -z "$ac_err"; then 1262 rm -rf conftest* 1263 eval "ac_cv_header_$ac_safe=yes" 1264else 1265 echo "$ac_err" >&5 1266 rm -rf conftest* 1267 eval "ac_cv_header_$ac_safe=no" 1268fi 1269rm -f conftest* 1270fi 1271if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1272 echo "$ac_t""yes" 1>&6 1273 : 1274else 1275 echo "$ac_t""no" 1>&6 1276cat >> confdefs.h <<\EOF 1277#define NO_FLOAT_H 1 1278EOF 1279 1280fi 1281 1282ac_safe=`echo "limits.h" | tr './\055' '___'` 1283echo $ac_n "checking for limits.h""... $ac_c" 1>&6 1284if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1285 echo $ac_n "(cached) $ac_c" 1>&6 1286else 1287 cat > conftest.$ac_ext <<EOF 1288#line 1289 "configure" 1289#include "confdefs.h" 1290#include <limits.h> 1291EOF 1292eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1293ac_err=`grep -v '^ *+' conftest.out` 1294if test -z "$ac_err"; then 1295 rm -rf conftest* 1296 eval "ac_cv_header_$ac_safe=yes" 1297else 1298 echo "$ac_err" >&5 1299 rm -rf conftest* 1300 eval "ac_cv_header_$ac_safe=no" 1301fi 1302rm -f conftest* 1303fi 1304if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1305 echo "$ac_t""yes" 1>&6 1306 : 1307else 1308 echo "$ac_t""no" 1>&6 1309cat >> confdefs.h <<\EOF 1310#define NO_LIMITS_H 1 1311EOF 1312 1313fi 1314 1315ac_safe=`echo "stdlib.h" | tr './\055' '___'` 1316echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 1317if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1318 echo $ac_n "(cached) $ac_c" 1>&6 1319else 1320 cat > conftest.$ac_ext <<EOF 1321#line 1322 "configure" 1322#include "confdefs.h" 1323#include <stdlib.h> 1324EOF 1325eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1326ac_err=`grep -v '^ *+' conftest.out` 1327if test -z "$ac_err"; then 1328 rm -rf conftest* 1329 eval "ac_cv_header_$ac_safe=yes" 1330else 1331 echo "$ac_err" >&5 1332 rm -rf conftest* 1333 eval "ac_cv_header_$ac_safe=no" 1334fi 1335rm -f conftest* 1336fi 1337if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1338 echo "$ac_t""yes" 1>&6 1339 tcl_ok=1 1340else 1341 echo "$ac_t""no" 1>&6 1342tcl_ok=0 1343fi 1344 1345cat > conftest.$ac_ext <<EOF 1346#line 1347 "configure" 1347#include "confdefs.h" 1348#include <stdlib.h> 1349EOF 1350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1351 egrep "strtol" >/dev/null 2>&1; then 1352 : 1353else 1354 rm -rf conftest* 1355 tcl_ok=0 1356fi 1357rm -f conftest* 1358 1359cat > conftest.$ac_ext <<EOF 1360#line 1361 "configure" 1361#include "confdefs.h" 1362#include <stdlib.h> 1363EOF 1364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1365 egrep "strtoul" >/dev/null 2>&1; then 1366 : 1367else 1368 rm -rf conftest* 1369 tcl_ok=0 1370fi 1371rm -f conftest* 1372 1373cat > conftest.$ac_ext <<EOF 1374#line 1375 "configure" 1375#include "confdefs.h" 1376#include <stdlib.h> 1377EOF 1378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1379 egrep "strtod" >/dev/null 2>&1; then 1380 : 1381else 1382 rm -rf conftest* 1383 tcl_ok=0 1384fi 1385rm -f conftest* 1386 1387if test $tcl_ok = 0; then 1388 cat >> confdefs.h <<\EOF 1389#define NO_STDLIB_H 1 1390EOF 1391 1392fi 1393ac_safe=`echo "string.h" | tr './\055' '___'` 1394echo $ac_n "checking for string.h""... $ac_c" 1>&6 1395if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1396 echo $ac_n "(cached) $ac_c" 1>&6 1397else 1398 cat > conftest.$ac_ext <<EOF 1399#line 1400 "configure" 1400#include "confdefs.h" 1401#include <string.h> 1402EOF 1403eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1404ac_err=`grep -v '^ *+' conftest.out` 1405if test -z "$ac_err"; then 1406 rm -rf conftest* 1407 eval "ac_cv_header_$ac_safe=yes" 1408else 1409 echo "$ac_err" >&5 1410 rm -rf conftest* 1411 eval "ac_cv_header_$ac_safe=no" 1412fi 1413rm -f conftest* 1414fi 1415if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1416 echo "$ac_t""yes" 1>&6 1417 tcl_ok=1 1418else 1419 echo "$ac_t""no" 1>&6 1420tcl_ok=0 1421fi 1422 1423cat > conftest.$ac_ext <<EOF 1424#line 1425 "configure" 1425#include "confdefs.h" 1426#include <string.h> 1427EOF 1428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1429 egrep "strstr" >/dev/null 2>&1; then 1430 : 1431else 1432 rm -rf conftest* 1433 tcl_ok=0 1434fi 1435rm -f conftest* 1436 1437cat > conftest.$ac_ext <<EOF 1438#line 1439 "configure" 1439#include "confdefs.h" 1440#include <string.h> 1441EOF 1442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1443 egrep "strerror" >/dev/null 2>&1; then 1444 : 1445else 1446 rm -rf conftest* 1447 tcl_ok=0 1448fi 1449rm -f conftest* 1450 1451if test $tcl_ok = 0; then 1452 cat >> confdefs.h <<\EOF 1453#define NO_STRING_H 1 1454EOF 1455 1456fi 1457ac_safe=`echo "sys/wait.h" | tr './\055' '___'` 1458echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6 1459if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1460 echo $ac_n "(cached) $ac_c" 1>&6 1461else 1462 cat > conftest.$ac_ext <<EOF 1463#line 1464 "configure" 1464#include "confdefs.h" 1465#include <sys/wait.h> 1466EOF 1467eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1468ac_err=`grep -v '^ *+' conftest.out` 1469if test -z "$ac_err"; then 1470 rm -rf conftest* 1471 eval "ac_cv_header_$ac_safe=yes" 1472else 1473 echo "$ac_err" >&5 1474 rm -rf conftest* 1475 eval "ac_cv_header_$ac_safe=no" 1476fi 1477rm -f conftest* 1478fi 1479if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1480 echo "$ac_t""yes" 1>&6 1481 : 1482else 1483 echo "$ac_t""no" 1>&6 1484cat >> confdefs.h <<\EOF 1485#define NO_SYS_WAIT_H 1 1486EOF 1487 1488fi 1489 1490ac_safe=`echo "dlfcn.h" | tr './\055' '___'` 1491echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 1492if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1493 echo $ac_n "(cached) $ac_c" 1>&6 1494else 1495 cat > conftest.$ac_ext <<EOF 1496#line 1497 "configure" 1497#include "confdefs.h" 1498#include <dlfcn.h> 1499EOF 1500eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1501ac_err=`grep -v '^ *+' conftest.out` 1502if test -z "$ac_err"; then 1503 rm -rf conftest* 1504 eval "ac_cv_header_$ac_safe=yes" 1505else 1506 echo "$ac_err" >&5 1507 rm -rf conftest* 1508 eval "ac_cv_header_$ac_safe=no" 1509fi 1510rm -f conftest* 1511fi 1512if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1513 echo "$ac_t""yes" 1>&6 1514 : 1515else 1516 echo "$ac_t""no" 1>&6 1517cat >> confdefs.h <<\EOF 1518#define NO_DLFCN_H 1 1519EOF 1520 1521fi 1522 1523for ac_hdr in unistd.h 1524do 1525ac_safe=`echo "$ac_hdr" | tr './\055' '___'` 1526echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1527if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1528 echo $ac_n "(cached) $ac_c" 1>&6 1529else 1530 cat > conftest.$ac_ext <<EOF 1531#line 1532 "configure" 1532#include "confdefs.h" 1533#include <$ac_hdr> 1534EOF 1535eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1536ac_err=`grep -v '^ *+' conftest.out` 1537if test -z "$ac_err"; then 1538 rm -rf conftest* 1539 eval "ac_cv_header_$ac_safe=yes" 1540else 1541 echo "$ac_err" >&5 1542 rm -rf conftest* 1543 eval "ac_cv_header_$ac_safe=no" 1544fi 1545rm -f conftest* 1546fi 1547if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1548 echo "$ac_t""yes" 1>&6 1549 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` 1550 cat >> confdefs.h <<EOF 1551#define $ac_tr_hdr 1 1552EOF 1553 1554else 1555 echo "$ac_t""no" 1>&6 1556fi 1557done 1558 1559 1560#--------------------------------------------------------------------------- 1561# Determine which interface to use to talk to the serial port. 1562# Note that #include lines must begin in leftmost column for 1563# some compilers to recognize them as preprocessor directives. 1564#--------------------------------------------------------------------------- 1565 1566echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 1567if test "$cross_compiling" = yes; then 1568 tk_ok=no 1569else 1570cat > conftest.$ac_ext <<EOF 1571#line 1572 "configure" 1572#include "confdefs.h" 1573 1574#include <termios.h> 1575 1576main() 1577{ 1578 struct termios t; 1579 if (tcgetattr(0, &t) == 0) { 1580 cfsetospeed(&t, 0); 1581 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; 1582 return 0; 1583 } 1584 return 1; 1585} 1586EOF 1587eval $ac_link 1588if test -s conftest && (./conftest; exit) 2>/dev/null; then 1589 tk_ok=termios 1590else 1591 tk_ok=no 1592fi 1593fi 1594rm -fr conftest* 1595if test $tk_ok = termios; then 1596 cat >> confdefs.h <<\EOF 1597#define USE_TERMIOS 1 1598EOF 1599 1600else 1601if test "$cross_compiling" = yes; then 1602 tk_ok=no 1603else 1604cat > conftest.$ac_ext <<EOF 1605#line 1606 "configure" 1606#include "confdefs.h" 1607 1608#include <termio.h> 1609 1610main() 1611{ 1612 struct termio t; 1613 if (ioctl(0, TCGETA, &t) == 0) { 1614 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; 1615 return 0; 1616 } 1617 return 1; 1618} 1619EOF 1620eval $ac_link 1621if test -s conftest && (./conftest; exit) 2>/dev/null; then 1622 tk_ok=termio 1623else 1624 tk_ok=no 1625fi 1626fi 1627rm -fr conftest* 1628if test $tk_ok = termio; then 1629 cat >> confdefs.h <<\EOF 1630#define USE_TERMIO 1 1631EOF 1632 1633else 1634if test "$cross_compiling" = yes; then 1635 tk_ok=none 1636else 1637cat > conftest.$ac_ext <<EOF 1638#line 1639 "configure" 1639#include "confdefs.h" 1640 1641#include <sgtty.h> 1642 1643main() 1644{ 1645 struct sgttyb t; 1646 if (ioctl(0, TIOCGETP, &t) == 0) { 1647 t.sg_ospeed = 0; 1648 t.sg_flags |= ODDP | EVENP | RAW; 1649 return 0; 1650 } 1651 return 1; 1652} 1653EOF 1654eval $ac_link 1655if test -s conftest && (./conftest; exit) 2>/dev/null; then 1656 tk_ok=sgtty 1657else 1658 tk_ok=none 1659fi 1660fi 1661rm -fr conftest* 1662if test $tk_ok = sgtty; then 1663 cat >> confdefs.h <<\EOF 1664#define USE_SGTTY 1 1665EOF 1666 1667fi 1668fi 1669fi 1670echo "$ac_t""$tk_ok" 1>&6 1671 1672#-------------------------------------------------------------------- 1673# Include sys/select.h if it exists and if it supplies things 1674# that appear to be useful and aren't already in sys/types.h. 1675# This appears to be true only on the RS/6000 under AIX. Some 1676# systems like OSF/1 have a sys/select.h that's of no use, and 1677# other systems like SCO UNIX have a sys/select.h that's 1678# pernicious. If "fd_set" isn't defined anywhere then set a 1679# special flag. 1680#-------------------------------------------------------------------- 1681 1682echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 1683cat > conftest.$ac_ext <<EOF 1684#line 1685 "configure" 1685#include "confdefs.h" 1686#include <sys/types.h> 1687int main() { return 0; } 1688int t() { 1689fd_set readMask, writeMask; 1690; return 0; } 1691EOF 1692if eval $ac_compile; then 1693 rm -rf conftest* 1694 tk_ok=yes 1695else 1696 rm -rf conftest* 1697 tk_ok=no 1698fi 1699rm -f conftest* 1700 1701if test $tk_ok = no; then 1702 cat > conftest.$ac_ext <<EOF 1703#line 1704 "configure" 1704#include "confdefs.h" 1705#include <sys/select.h> 1706EOF 1707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1708 egrep "fd_mask" >/dev/null 2>&1; then 1709 rm -rf conftest* 1710 tk_ok=yes 1711fi 1712rm -f conftest* 1713 1714 if test $tk_ok = yes; then 1715 cat >> confdefs.h <<\EOF 1716#define HAVE_SYS_SELECT_H 1 1717EOF 1718 1719 fi 1720fi 1721echo "$ac_t""$tk_ok" 1>&6 1722if test $tk_ok = no; then 1723 cat >> confdefs.h <<\EOF 1724#define NO_FD_SET 1 1725EOF 1726 1727fi 1728 1729#------------------------------------------------------------------------------ 1730# Find out all about time handling differences. 1731#------------------------------------------------------------------------------ 1732 1733for ac_hdr in sys/time.h 1734do 1735ac_safe=`echo "$ac_hdr" | tr './\055' '___'` 1736echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1737if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1738 echo $ac_n "(cached) $ac_c" 1>&6 1739else 1740 cat > conftest.$ac_ext <<EOF 1741#line 1742 "configure" 1742#include "confdefs.h" 1743#include <$ac_hdr> 1744EOF 1745eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1746ac_err=`grep -v '^ *+' conftest.out` 1747if test -z "$ac_err"; then 1748 rm -rf conftest* 1749 eval "ac_cv_header_$ac_safe=yes" 1750else 1751 echo "$ac_err" >&5 1752 rm -rf conftest* 1753 eval "ac_cv_header_$ac_safe=no" 1754fi 1755rm -f conftest* 1756fi 1757if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1758 echo "$ac_t""yes" 1>&6 1759 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` 1760 cat >> confdefs.h <<EOF 1761#define $ac_tr_hdr 1 1762EOF 1763 1764else 1765 echo "$ac_t""no" 1>&6 1766fi 1767done 1768 1769echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 1770if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 1771 echo $ac_n "(cached) $ac_c" 1>&6 1772else 1773 cat > conftest.$ac_ext <<EOF 1774#line 1775 "configure" 1775#include "confdefs.h" 1776#include <sys/types.h> 1777#include <sys/time.h> 1778#include <time.h> 1779int main() { return 0; } 1780int t() { 1781struct tm *tp; 1782; return 0; } 1783EOF 1784if eval $ac_compile; then 1785 rm -rf conftest* 1786 ac_cv_header_time=yes 1787else 1788 rm -rf conftest* 1789 ac_cv_header_time=no 1790fi 1791rm -f conftest* 1792 1793fi 1794 1795echo "$ac_t""$ac_cv_header_time" 1>&6 1796if test $ac_cv_header_time = yes; then 1797 cat >> confdefs.h <<\EOF 1798#define TIME_WITH_SYS_TIME 1 1799EOF 1800 1801fi 1802 1803echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 1804if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then 1805 echo $ac_n "(cached) $ac_c" 1>&6 1806else 1807 cat > conftest.$ac_ext <<EOF 1808#line 1809 "configure" 1809#include "confdefs.h" 1810#include <sys/types.h> 1811#include <time.h> 1812int main() { return 0; } 1813int t() { 1814struct tm *tp; tp->tm_sec; 1815; return 0; } 1816EOF 1817if eval $ac_compile; then 1818 rm -rf conftest* 1819 ac_cv_struct_tm=time.h 1820else 1821 rm -rf conftest* 1822 ac_cv_struct_tm=sys/time.h 1823fi 1824rm -f conftest* 1825 1826fi 1827 1828echo "$ac_t""$ac_cv_struct_tm" 1>&6 1829if test $ac_cv_struct_tm = sys/time.h; then 1830 cat >> confdefs.h <<\EOF 1831#define TM_IN_SYS_TIME 1 1832EOF 1833 1834fi 1835 1836echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 1837if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then 1838 echo $ac_n "(cached) $ac_c" 1>&6 1839else 1840 cat > conftest.$ac_ext <<EOF 1841#line 1842 "configure" 1842#include "confdefs.h" 1843#include <sys/types.h> 1844#include <$ac_cv_struct_tm> 1845int main() { return 0; } 1846int t() { 1847struct tm tm; tm.tm_zone; 1848; return 0; } 1849EOF 1850if eval $ac_compile; then 1851 rm -rf conftest* 1852 ac_cv_struct_tm_zone=yes 1853else 1854 rm -rf conftest* 1855 ac_cv_struct_tm_zone=no 1856fi 1857rm -f conftest* 1858 1859fi 1860 1861echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 1862if test "$ac_cv_struct_tm_zone" = yes; then 1863 cat >> confdefs.h <<\EOF 1864#define HAVE_TM_ZONE 1 1865EOF 1866 1867else 1868 echo $ac_n "checking for tzname""... $ac_c" 1>&6 1869if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then 1870 echo $ac_n "(cached) $ac_c" 1>&6 1871else 1872 cat > conftest.$ac_ext <<EOF 1873#line 1874 "configure" 1874#include "confdefs.h" 1875#include <time.h> 1876#ifndef tzname /* For SGI. */ 1877extern char *tzname[]; /* RS6000 and others reject char **tzname. */ 1878#endif 1879int main() { return 0; } 1880int t() { 1881atoi(*tzname); 1882; return 0; } 1883EOF 1884if eval $ac_link; then 1885 rm -rf conftest* 1886 ac_cv_var_tzname=yes 1887else 1888 rm -rf conftest* 1889 ac_cv_var_tzname=no 1890fi 1891rm -f conftest* 1892 1893fi 1894 1895echo "$ac_t""$ac_cv_var_tzname" 1>&6 1896 if test $ac_cv_var_tzname = yes; then 1897 cat >> confdefs.h <<\EOF 1898#define HAVE_TZNAME 1 1899EOF 1900 1901 fi 1902fi 1903 1904 1905echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 1906cat > conftest.$ac_ext <<EOF 1907#line 1908 "configure" 1908#include "confdefs.h" 1909#include <time.h> 1910int main() { return 0; } 1911int t() { 1912struct tm tm; tm.tm_tzadj; 1913; return 0; } 1914EOF 1915if eval $ac_compile; then 1916 rm -rf conftest* 1917 cat >> confdefs.h <<\EOF 1918#define HAVE_TM_TZADJ 1 1919EOF 1920 1921 echo "$ac_t""yes" 1>&6 1922else 1923 rm -rf conftest* 1924 echo "$ac_t""no" 1>&6 1925fi 1926rm -f conftest* 1927 1928 1929echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 1930cat > conftest.$ac_ext <<EOF 1931#line 1932 "configure" 1932#include "confdefs.h" 1933#include <time.h> 1934int main() { return 0; } 1935int t() { 1936struct tm tm; tm.tm_gmtoff; 1937; return 0; } 1938EOF 1939if eval $ac_compile; then 1940 rm -rf conftest* 1941 cat >> confdefs.h <<\EOF 1942#define HAVE_TM_GMTOFF 1 1943EOF 1944 1945 echo "$ac_t""yes" 1>&6 1946else 1947 rm -rf conftest* 1948 echo "$ac_t""no" 1>&6 1949fi 1950rm -f conftest* 1951 1952 1953# 1954# Its important to include time.h in this check, as some systems (like convex) 1955# have timezone functions, etc. 1956# 1957have_timezone=no 1958echo $ac_n "checking long timezone variable""... $ac_c" 1>&6 1959cat > conftest.$ac_ext <<EOF 1960#line 1961 "configure" 1961#include "confdefs.h" 1962#include <time.h> 1963int main() { return 0; } 1964int t() { 1965extern long timezone; 1966 timezone += 1; 1967 exit (0); 1968; return 0; } 1969EOF 1970if eval $ac_compile; then 1971 rm -rf conftest* 1972 have_timezone=yes 1973 cat >> confdefs.h <<\EOF 1974#define HAVE_TIMEZONE_VAR 1 1975EOF 1976 1977 echo "$ac_t""yes" 1>&6 1978else 1979 rm -rf conftest* 1980 echo "$ac_t""no" 1>&6 1981fi 1982rm -f conftest* 1983 1984 1985# 1986# On some systems (eg IRIX 6.2), timezone is a time_t and not a long. 1987# 1988if test "$have_timezone" = no; then 1989 echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6 1990 cat > conftest.$ac_ext <<EOF 1991#line 1992 "configure" 1992#include "confdefs.h" 1993#include <time.h> 1994int main() { return 0; } 1995int t() { 1996extern time_t timezone; 1997 timezone += 1; 1998 exit (0); 1999; return 0; } 2000EOF 2001if eval $ac_compile; then 2002 rm -rf conftest* 2003 cat >> confdefs.h <<\EOF 2004#define HAVE_TIMEZONE_VAR 1 2005EOF 2006 2007 echo "$ac_t""yes" 1>&6 2008else 2009 rm -rf conftest* 2010 echo "$ac_t""no" 1>&6 2011fi 2012rm -f conftest* 2013 2014fi 2015 2016# 2017# AIX does not have a timezone field in struct tm. When the AIX bsd 2018# library is used, the timezone global and the gettimeofday methods are 2019# to be avoided for timezone deduction instead, we deduce the timezone 2020# by comparing the localtime result on a known GMT value. 2021# 2022if test $libbsd = yes; then 2023 cat >> confdefs.h <<\EOF 2024#define USE_DELTA_FOR_TZ 1 2025EOF 2026 2027fi 2028 2029#-------------------------------------------------------------------- 2030# On some systems strstr is broken: it returns a pointer even 2031# even if the original string is empty. 2032#-------------------------------------------------------------------- 2033 2034echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 2035if test "$cross_compiling" = yes; then 2036 tcl_ok=no 2037else 2038cat > conftest.$ac_ext <<EOF 2039#line 2040 "configure" 2040#include "confdefs.h" 2041 2042extern int strstr(); 2043int main() 2044{ 2045 exit(strstr("\0test", "test") ? 1 : 0); 2046} 2047 2048EOF 2049eval $ac_link 2050if test -s conftest && (./conftest; exit) 2>/dev/null; then 2051 tcl_ok=yes 2052else 2053 tcl_ok=no 2054fi 2055fi 2056rm -fr conftest* 2057if test $tcl_ok = yes; then 2058 echo "$ac_t""yes" 1>&6 2059else 2060 echo "$ac_t""broken, using substitute" 1>&6 2061 LIBOBJS="$LIBOBJS strstr.o" 2062fi 2063 2064#-------------------------------------------------------------------- 2065# Check for strtoul function. This is tricky because under some 2066# versions of AIX strtoul returns an incorrect terminator 2067# pointer for the string "0". 2068#-------------------------------------------------------------------- 2069 2070echo $ac_n "checking for strtoul""... $ac_c" 1>&6 2071if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then 2072 echo $ac_n "(cached) $ac_c" 1>&6 2073else 2074 cat > conftest.$ac_ext <<EOF 2075#line 2076 "configure" 2076#include "confdefs.h" 2077/* System header to define __stub macros and hopefully few prototypes, 2078 which can conflict with char strtoul(); below. */ 2079#include <assert.h> 2080/* Override any gcc2 internal prototype to avoid an error. */ 2081char strtoul(); 2082 2083int main() { return 0; } 2084int t() { 2085 2086/* The GNU C library defines this for functions which it implements 2087 to always fail with ENOSYS. Some functions are actually named 2088 something starting with __ and the normal name is an alias. */ 2089#if defined (__stub_strtoul) || defined (__stub___strtoul) 2090choke me 2091#else 2092strtoul(); 2093#endif 2094 2095; return 0; } 2096EOF 2097if eval $ac_link; then 2098 rm -rf conftest* 2099 eval "ac_cv_func_strtoul=yes" 2100else 2101 rm -rf conftest* 2102 eval "ac_cv_func_strtoul=no" 2103fi 2104rm -f conftest* 2105 2106fi 2107if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then 2108 echo "$ac_t""yes" 1>&6 2109 tcl_ok=1 2110else 2111 echo "$ac_t""no" 1>&6 2112tcl_ok=0 2113fi 2114 2115if test "$cross_compiling" = yes; then 2116 tcl_ok=0 2117else 2118cat > conftest.$ac_ext <<EOF 2119#line 2120 "configure" 2120#include "confdefs.h" 2121 2122extern int strtoul(); 2123int main() 2124{ 2125 char *string = "0"; 2126 char *term; 2127 int value; 2128 value = strtoul(string, &term, 0); 2129 if ((value != 0) || (term != (string+1))) { 2130 exit(1); 2131 } 2132 exit(0); 2133} 2134EOF 2135eval $ac_link 2136if test -s conftest && (./conftest; exit) 2>/dev/null; then 2137 : 2138else 2139 tcl_ok=0 2140fi 2141fi 2142rm -fr conftest* 2143if test "$tcl_ok" = 0; then 2144 test -n "$verbose" && echo " Adding strtoul.o." 2145 LIBOBJS="$LIBOBJS strtoul.o" 2146fi 2147 2148#-------------------------------------------------------------------- 2149# Check for the strtod function. This is tricky because in some 2150# versions of Linux strtod mis-parses strings starting with "+". 2151#-------------------------------------------------------------------- 2152 2153echo $ac_n "checking for strtod""... $ac_c" 1>&6 2154if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then 2155 echo $ac_n "(cached) $ac_c" 1>&6 2156else 2157 cat > conftest.$ac_ext <<EOF 2158#line 2159 "configure" 2159#include "confdefs.h" 2160/* System header to define __stub macros and hopefully few prototypes, 2161 which can conflict with char strtod(); below. */ 2162#include <assert.h> 2163/* Override any gcc2 internal prototype to avoid an error. */ 2164char strtod(); 2165 2166int main() { return 0; } 2167int t() { 2168 2169/* The GNU C library defines this for functions which it implements 2170 to always fail with ENOSYS. Some functions are actually named 2171 something starting with __ and the normal name is an alias. */ 2172#if defined (__stub_strtod) || defined (__stub___strtod) 2173choke me 2174#else 2175strtod(); 2176#endif 2177 2178; return 0; } 2179EOF 2180if eval $ac_link; then 2181 rm -rf conftest* 2182 eval "ac_cv_func_strtod=yes" 2183else 2184 rm -rf conftest* 2185 eval "ac_cv_func_strtod=no" 2186fi 2187rm -f conftest* 2188 2189fi 2190if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then 2191 echo "$ac_t""yes" 1>&6 2192 tcl_ok=1 2193else 2194 echo "$ac_t""no" 1>&6 2195tcl_ok=0 2196fi 2197 2198if test "$cross_compiling" = yes; then 2199 tcl_ok=0 2200else 2201cat > conftest.$ac_ext <<EOF 2202#line 2203 "configure" 2203#include "confdefs.h" 2204 2205extern double strtod(); 2206int main() 2207{ 2208 char *string = " +69"; 2209 char *term; 2210 double value; 2211 value = strtod(string, &term); 2212 if ((value != 69) || (term != (string+4))) { 2213 exit(1); 2214 } 2215 exit(0); 2216} 2217EOF 2218eval $ac_link 2219if test -s conftest && (./conftest; exit) 2>/dev/null; then 2220 : 2221else 2222 tcl_ok=0 2223fi 2224fi 2225rm -fr conftest* 2226if test "$tcl_ok" = 0; then 2227 test -n "$verbose" && echo " Adding strtod.o." 2228 LIBOBJS="$LIBOBJS strtod.o" 2229fi 2230 2231#-------------------------------------------------------------------- 2232# Under Solaris 2.4, strtod returns the wrong value for the 2233# terminating character under some conditions. Check for this 2234# and if the problem exists use a substitute procedure 2235# "fixstrtod" that corrects the error. 2236#-------------------------------------------------------------------- 2237 2238echo $ac_n "checking for strtod""... $ac_c" 1>&6 2239if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then 2240 echo $ac_n "(cached) $ac_c" 1>&6 2241else 2242 cat > conftest.$ac_ext <<EOF 2243#line 2244 "configure" 2244#include "confdefs.h" 2245/* System header to define __stub macros and hopefully few prototypes, 2246 which can conflict with char strtod(); below. */ 2247#include <assert.h> 2248/* Override any gcc2 internal prototype to avoid an error. */ 2249char strtod(); 2250 2251int main() { return 0; } 2252int t() { 2253 2254/* The GNU C library defines this for functions which it implements 2255 to always fail with ENOSYS. Some functions are actually named 2256 something starting with __ and the normal name is an alias. */ 2257#if defined (__stub_strtod) || defined (__stub___strtod) 2258choke me 2259#else 2260strtod(); 2261#endif 2262 2263; return 0; } 2264EOF 2265if eval $ac_link; then 2266 rm -rf conftest* 2267 eval "ac_cv_func_strtod=yes" 2268else 2269 rm -rf conftest* 2270 eval "ac_cv_func_strtod=no" 2271fi 2272rm -f conftest* 2273 2274fi 2275if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then 2276 echo "$ac_t""yes" 1>&6 2277 tcl_strtod=1 2278else 2279 echo "$ac_t""no" 1>&6 2280tcl_strtod=0 2281fi 2282 2283if test "$tcl_strtod" = 1; then 2284 echo $ac_n "checking for Solaris strtod bug""... $ac_c" 1>&6 2285 if test "$cross_compiling" = yes; then 2286 tcl_ok=0 2287else 2288cat > conftest.$ac_ext <<EOF 2289#line 2290 "configure" 2290#include "confdefs.h" 2291 2292extern double strtod(); 2293int main() 2294{ 2295 char *string = "NaN"; 2296 char *term; 2297 strtod(string, &term); 2298 if ((term != string) && (term[-1] == 0)) { 2299 exit(1); 2300 } 2301 exit(0); 2302} 2303EOF 2304eval $ac_link 2305if test -s conftest && (./conftest; exit) 2>/dev/null; then 2306 tcl_ok=1 2307else 2308 tcl_ok=0 2309fi 2310fi 2311rm -fr conftest* 2312 if test $tcl_ok = 1; then 2313 echo "$ac_t""ok" 1>&6 2314 else 2315 echo "$ac_t""buggy" 1>&6 2316 LIBOBJS="$LIBOBJS fixstrtod.o" 2317 cat >> confdefs.h <<\EOF 2318#define strtod fixstrtod 2319EOF 2320 2321 fi 2322fi 2323 2324#-------------------------------------------------------------------- 2325# Check for various typedefs and provide substitutes if 2326# they don't exist. 2327#-------------------------------------------------------------------- 2328 2329echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 2330if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 2331 echo $ac_n "(cached) $ac_c" 1>&6 2332else 2333 cat > conftest.$ac_ext <<EOF 2334#line 2335 "configure" 2335#include "confdefs.h" 2336#include <stdlib.h> 2337#include <stdarg.h> 2338#include <string.h> 2339#include <float.h> 2340EOF 2341eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2342ac_err=`grep -v '^ *+' conftest.out` 2343if test -z "$ac_err"; then 2344 rm -rf conftest* 2345 ac_cv_header_stdc=yes 2346else 2347 echo "$ac_err" >&5 2348 rm -rf conftest* 2349 ac_cv_header_stdc=no 2350fi 2351rm -f conftest* 2352 2353if test $ac_cv_header_stdc = yes; then 2354 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 2355cat > conftest.$ac_ext <<EOF 2356#line 2357 "configure" 2357#include "confdefs.h" 2358#include <string.h> 2359EOF 2360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2361 egrep "memchr" >/dev/null 2>&1; then 2362 : 2363else 2364 rm -rf conftest* 2365 ac_cv_header_stdc=no 2366fi 2367rm -f conftest* 2368 2369fi 2370 2371if test $ac_cv_header_stdc = yes; then 2372 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 2373cat > conftest.$ac_ext <<EOF 2374#line 2375 "configure" 2375#include "confdefs.h" 2376#include <stdlib.h> 2377EOF 2378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2379 egrep "free" >/dev/null 2>&1; then 2380 : 2381else 2382 rm -rf conftest* 2383 ac_cv_header_stdc=no 2384fi 2385rm -f conftest* 2386 2387fi 2388 2389if test $ac_cv_header_stdc = yes; then 2390 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 2391if test "$cross_compiling" = yes; then 2392 ac_cv_header_stdc=no 2393else 2394cat > conftest.$ac_ext <<EOF 2395#line 2396 "configure" 2396#include "confdefs.h" 2397#include <ctype.h> 2398#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 2399#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 2400#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 2401int main () { int i; for (i = 0; i < 256; i++) 2402if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); 2403exit (0); } 2404 2405EOF 2406eval $ac_link 2407if test -s conftest && (./conftest; exit) 2>/dev/null; then 2408 : 2409else 2410 ac_cv_header_stdc=no 2411fi 2412fi 2413rm -fr conftest* 2414fi 2415fi 2416 2417echo "$ac_t""$ac_cv_header_stdc" 1>&6 2418if test $ac_cv_header_stdc = yes; then 2419 cat >> confdefs.h <<\EOF 2420#define STDC_HEADERS 1 2421EOF 2422 2423fi 2424 2425echo $ac_n "checking for mode_t""... $ac_c" 1>&6 2426if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then 2427 echo $ac_n "(cached) $ac_c" 1>&6 2428else 2429 cat > conftest.$ac_ext <<EOF 2430#line 2431 "configure" 2431#include "confdefs.h" 2432#include <sys/types.h> 2433#if STDC_HEADERS 2434#include <stdlib.h> 2435#endif 2436EOF 2437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2438 egrep "mode_t" >/dev/null 2>&1; then 2439 rm -rf conftest* 2440 ac_cv_type_mode_t=yes 2441else 2442 rm -rf conftest* 2443 ac_cv_type_mode_t=no 2444fi 2445rm -f conftest* 2446 2447fi 2448echo "$ac_t""$ac_cv_type_mode_t" 1>&6 2449if test $ac_cv_type_mode_t = no; then 2450 cat >> confdefs.h <<\EOF 2451#define mode_t int 2452EOF 2453 2454fi 2455 2456echo $ac_n "checking for pid_t""... $ac_c" 1>&6 2457if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then 2458 echo $ac_n "(cached) $ac_c" 1>&6 2459else 2460 cat > conftest.$ac_ext <<EOF 2461#line 2462 "configure" 2462#include "confdefs.h" 2463#include <sys/types.h> 2464#if STDC_HEADERS 2465#include <stdlib.h> 2466#endif 2467EOF 2468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2469 egrep "pid_t" >/dev/null 2>&1; then 2470 rm -rf conftest* 2471 ac_cv_type_pid_t=yes 2472else 2473 rm -rf conftest* 2474 ac_cv_type_pid_t=no 2475fi 2476rm -f conftest* 2477 2478fi 2479echo "$ac_t""$ac_cv_type_pid_t" 1>&6 2480if test $ac_cv_type_pid_t = no; then 2481 cat >> confdefs.h <<\EOF 2482#define pid_t int 2483EOF 2484 2485fi 2486 2487echo $ac_n "checking for size_t""... $ac_c" 1>&6 2488if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then 2489 echo $ac_n "(cached) $ac_c" 1>&6 2490else 2491 cat > conftest.$ac_ext <<EOF 2492#line 2493 "configure" 2493#include "confdefs.h" 2494#include <sys/types.h> 2495#if STDC_HEADERS 2496#include <stdlib.h> 2497#endif 2498EOF 2499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2500 egrep "size_t" >/dev/null 2>&1; then 2501 rm -rf conftest* 2502 ac_cv_type_size_t=yes 2503else 2504 rm -rf conftest* 2505 ac_cv_type_size_t=no 2506fi 2507rm -f conftest* 2508 2509fi 2510echo "$ac_t""$ac_cv_type_size_t" 1>&6 2511if test $ac_cv_type_size_t = no; then 2512 cat >> confdefs.h <<\EOF 2513#define size_t unsigned 2514EOF 2515 2516fi 2517 2518echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 2519if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then 2520 echo $ac_n "(cached) $ac_c" 1>&6 2521else 2522 cat > conftest.$ac_ext <<EOF 2523#line 2524 "configure" 2524#include "confdefs.h" 2525#include <sys/types.h> 2526EOF 2527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2528 egrep "uid_t" >/dev/null 2>&1; then 2529 rm -rf conftest* 2530 ac_cv_type_uid_t=yes 2531else 2532 rm -rf conftest* 2533 ac_cv_type_uid_t=no 2534fi 2535rm -f conftest* 2536 2537fi 2538 2539echo "$ac_t""$ac_cv_type_uid_t" 1>&6 2540if test $ac_cv_type_uid_t = no; then 2541 cat >> confdefs.h <<\EOF 2542#define uid_t int 2543EOF 2544 2545 cat >> confdefs.h <<\EOF 2546#define gid_t int 2547EOF 2548 2549fi 2550 2551echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 2552if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then 2553 echo $ac_n "(cached) $ac_c" 1>&6 2554else 2555 ac_cv_c_bigendian=unknown 2556# See if sys/param.h defines the BYTE_ORDER macro. 2557cat > conftest.$ac_ext <<EOF 2558#line 2559 "configure" 2559#include "confdefs.h" 2560#include <sys/types.h> 2561#include <sys/param.h> 2562int main() { return 0; } 2563int t() { 2564 2565#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 2566 bogus endian macros 2567#endif 2568; return 0; } 2569EOF 2570if eval $ac_compile; then 2571 rm -rf conftest* 2572 # It does; now see whether it defined to BIG_ENDIAN or not. 2573cat > conftest.$ac_ext <<EOF 2574#line 2575 "configure" 2575#include "confdefs.h" 2576#include <sys/types.h> 2577#include <sys/param.h> 2578int main() { return 0; } 2579int t() { 2580 2581#if BYTE_ORDER != BIG_ENDIAN 2582 not big endian 2583#endif 2584; return 0; } 2585EOF 2586if eval $ac_compile; then 2587 rm -rf conftest* 2588 ac_cv_c_bigendian=yes 2589else 2590 rm -rf conftest* 2591 ac_cv_c_bigendian=no 2592fi 2593rm -f conftest* 2594 2595fi 2596rm -f conftest* 2597 2598if test $ac_cv_c_bigendian = unknown; then 2599if test "$cross_compiling" = yes; then 2600 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } 2601else 2602cat > conftest.$ac_ext <<EOF 2603#line 2604 "configure" 2604#include "confdefs.h" 2605main () { 2606 /* Are we little or big endian? From Harbison&Steele. */ 2607 union 2608 { 2609 long l; 2610 char c[sizeof (long)]; 2611 } u; 2612 u.l = 1; 2613 exit (u.c[sizeof (long) - 1] == 1); 2614} 2615EOF 2616eval $ac_link 2617if test -s conftest && (./conftest; exit) 2>/dev/null; then 2618 ac_cv_c_bigendian=no 2619else 2620 ac_cv_c_bigendian=yes 2621fi 2622fi 2623rm -fr conftest* 2624fi 2625fi 2626 2627echo "$ac_t""$ac_cv_c_bigendian" 1>&6 2628if test $ac_cv_c_bigendian = yes; then 2629 cat >> confdefs.h <<\EOF 2630#define WORDS_BIGENDIAN 1 2631EOF 2632 2633fi 2634 2635 2636#-------------------------------------------------------------------- 2637# If a system doesn't have an opendir function (man, that's old!) 2638# then we have to supply a different version of dirent.h which 2639# is compatible with the substitute version of opendir that's 2640# provided. This version only works with V7-style directories. 2641#-------------------------------------------------------------------- 2642 2643echo $ac_n "checking for opendir""... $ac_c" 1>&6 2644if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then 2645 echo $ac_n "(cached) $ac_c" 1>&6 2646else 2647 cat > conftest.$ac_ext <<EOF 2648#line 2649 "configure" 2649#include "confdefs.h" 2650/* System header to define __stub macros and hopefully few prototypes, 2651 which can conflict with char opendir(); below. */ 2652#include <assert.h> 2653/* Override any gcc2 internal prototype to avoid an error. */ 2654char opendir(); 2655 2656int main() { return 0; } 2657int t() { 2658 2659/* The GNU C library defines this for functions which it implements 2660 to always fail with ENOSYS. Some functions are actually named 2661 something starting with __ and the normal name is an alias. */ 2662#if defined (__stub_opendir) || defined (__stub___opendir) 2663choke me 2664#else 2665opendir(); 2666#endif 2667 2668; return 0; } 2669EOF 2670if eval $ac_link; then 2671 rm -rf conftest* 2672 eval "ac_cv_func_opendir=yes" 2673else 2674 rm -rf conftest* 2675 eval "ac_cv_func_opendir=no" 2676fi 2677rm -f conftest* 2678 2679fi 2680if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then 2681 echo "$ac_t""yes" 1>&6 2682 : 2683else 2684 echo "$ac_t""no" 1>&6 2685cat >> confdefs.h <<\EOF 2686#define USE_DIRENT2_H 1 2687EOF 2688 2689fi 2690 2691 2692#-------------------------------------------------------------------- 2693# The check below checks whether <sys/wait.h> defines the type 2694# "union wait" correctly. It's needed because of weirdness in 2695# HP-UX where "union wait" is defined in both the BSD and SYS-V 2696# environments. Checking the usability of WIFEXITED seems to do 2697# the trick. 2698#-------------------------------------------------------------------- 2699 2700echo $ac_n "checking union wait""... $ac_c" 1>&6 2701cat > conftest.$ac_ext <<EOF 2702#line 2703 "configure" 2703#include "confdefs.h" 2704#include <sys/types.h> 2705#include <sys/wait.h> 2706int main() { return 0; } 2707int t() { 2708 2709union wait x; 2710WIFEXITED(x); /* Generates compiler error if WIFEXITED 2711 * uses an int. */ 2712 2713; return 0; } 2714EOF 2715if eval $ac_link; then 2716 rm -rf conftest* 2717 tcl_ok=yes 2718else 2719 rm -rf conftest* 2720 tcl_ok=no 2721fi 2722rm -f conftest* 2723 2724echo "$ac_t""$tcl_ok" 1>&6 2725if test $tcl_ok = no; then 2726 cat >> confdefs.h <<\EOF 2727#define NO_UNION_WAIT 1 2728EOF 2729 2730fi 2731 2732#-------------------------------------------------------------------- 2733# Check to see whether the system supports the matherr function 2734# and its associated type "struct exception". 2735#-------------------------------------------------------------------- 2736 2737echo $ac_n "checking matherr support""... $ac_c" 1>&6 2738cat > conftest.$ac_ext <<EOF 2739#line 2740 "configure" 2740#include "confdefs.h" 2741#include <math.h> 2742int main() { return 0; } 2743int t() { 2744 2745struct exception x; 2746x.type = DOMAIN; 2747x.type = SING; 2748 2749; return 0; } 2750EOF 2751if eval $ac_compile; then 2752 rm -rf conftest* 2753 tcl_ok=yes 2754else 2755 rm -rf conftest* 2756 tcl_ok=no 2757fi 2758rm -f conftest* 2759 2760echo "$ac_t""$tcl_ok" 1>&6 2761if test $tcl_ok = yes; then 2762 cat >> confdefs.h <<\EOF 2763#define NEED_MATHERR 1 2764EOF 2765 2766fi 2767 2768#-------------------------------------------------------------------- 2769# Check to see whether the system provides a vfork kernel call. 2770# If not, then use fork instead. Also, check for a problem with 2771# vforks and signals that can cause core dumps if a vforked child 2772# resets a signal handler. If the problem exists, then use fork 2773# instead of vfork. 2774#-------------------------------------------------------------------- 2775 2776echo $ac_n "checking for vfork""... $ac_c" 1>&6 2777if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then 2778 echo $ac_n "(cached) $ac_c" 1>&6 2779else 2780 cat > conftest.$ac_ext <<EOF 2781#line 2782 "configure" 2782#include "confdefs.h" 2783/* System header to define __stub macros and hopefully few prototypes, 2784 which can conflict with char vfork(); below. */ 2785#include <assert.h> 2786/* Override any gcc2 internal prototype to avoid an error. */ 2787char vfork(); 2788 2789int main() { return 0; } 2790int t() { 2791 2792/* The GNU C library defines this for functions which it implements 2793 to always fail with ENOSYS. Some functions are actually named 2794 something starting with __ and the normal name is an alias. */ 2795#if defined (__stub_vfork) || defined (__stub___vfork) 2796choke me 2797#else 2798vfork(); 2799#endif 2800 2801; return 0; } 2802EOF 2803if eval $ac_link; then 2804 rm -rf conftest* 2805 eval "ac_cv_func_vfork=yes" 2806else 2807 rm -rf conftest* 2808 eval "ac_cv_func_vfork=no" 2809fi 2810rm -f conftest* 2811 2812fi 2813if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then 2814 echo "$ac_t""yes" 1>&6 2815 tcl_ok=1 2816else 2817 echo "$ac_t""no" 1>&6 2818tcl_ok=0 2819fi 2820 2821if test "$tcl_ok" = 1; then 2822 echo $ac_n "checking vfork/signal bug""... $ac_c" 1>&6; 2823 if test "$cross_compiling" = yes; then 2824 tcl_ok=0 2825else 2826cat > conftest.$ac_ext <<EOF 2827#line 2828 "configure" 2828#include "confdefs.h" 2829 2830#include <stdio.h> 2831#include <signal.h> 2832#include <sys/wait.h> 2833int gotSignal = 0; 2834sigProc(sig) 2835 int sig; 2836{ 2837 gotSignal = 1; 2838} 2839main() 2840{ 2841 int pid, sts; 2842 (void) signal(SIGCHLD, sigProc); 2843 pid = vfork(); 2844 if (pid < 0) { 2845 exit(1); 2846 } else if (pid == 0) { 2847 (void) signal(SIGCHLD, SIG_DFL); 2848 _exit(0); 2849 } else { 2850 (void) wait(&sts); 2851 } 2852 exit((gotSignal) ? 0 : 1); 2853} 2854EOF 2855eval $ac_link 2856if test -s conftest && (./conftest; exit) 2>/dev/null; then 2857 tcl_ok=1 2858else 2859 tcl_ok=0 2860fi 2861fi 2862rm -fr conftest* 2863 if test "$tcl_ok" = 1; then 2864 echo "$ac_t""ok" 1>&6 2865 else 2866 echo "$ac_t""buggy, using fork instead" 1>&6 2867 fi 2868fi 2869rm -f core 2870if test "$tcl_ok" = 0; then 2871 cat >> confdefs.h <<\EOF 2872#define vfork fork 2873EOF 2874 2875fi 2876 2877#-------------------------------------------------------------------- 2878# Check whether there is an strncasecmp function on this system. 2879# This is a bit tricky because under SCO it's in -lsocket and 2880# under Sequent Dynix it's in -linet. 2881#-------------------------------------------------------------------- 2882 2883echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 2884if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then 2885 echo $ac_n "(cached) $ac_c" 1>&6 2886else 2887 cat > conftest.$ac_ext <<EOF 2888#line 2889 "configure" 2889#include "confdefs.h" 2890/* System header to define __stub macros and hopefully few prototypes, 2891 which can conflict with char strncasecmp(); below. */ 2892#include <assert.h> 2893/* Override any gcc2 internal prototype to avoid an error. */ 2894char strncasecmp(); 2895 2896int main() { return 0; } 2897int t() { 2898 2899/* The GNU C library defines this for functions which it implements 2900 to always fail with ENOSYS. Some functions are actually named 2901 something starting with __ and the normal name is an alias. */ 2902#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) 2903choke me 2904#else 2905strncasecmp(); 2906#endif 2907 2908; return 0; } 2909EOF 2910if eval $ac_link; then 2911 rm -rf conftest* 2912 eval "ac_cv_func_strncasecmp=yes" 2913else 2914 rm -rf conftest* 2915 eval "ac_cv_func_strncasecmp=no" 2916fi 2917rm -f conftest* 2918 2919fi 2920if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then 2921 echo "$ac_t""yes" 1>&6 2922 tcl_ok=1 2923else 2924 echo "$ac_t""no" 1>&6 2925tcl_ok=0 2926fi 2927 2928if test "$tcl_ok" = 0; then 2929 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 2930ac_lib_var=`echo socket | tr '+./' 'p__'` 2931if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 2932 echo $ac_n "(cached) $ac_c" 1>&6 2933else 2934 ac_save_LIBS="$LIBS" 2935LIBS="-lsocket $LIBS" 2936cat > conftest.$ac_ext <<EOF 2937#line 2938 "configure" 2938#include "confdefs.h" 2939 2940int main() { return 0; } 2941int t() { 2942strncasecmp() 2943; return 0; } 2944EOF 2945if eval $ac_link; then 2946 rm -rf conftest* 2947 eval "ac_cv_lib_$ac_lib_var=yes" 2948else 2949 rm -rf conftest* 2950 eval "ac_cv_lib_$ac_lib_var=no" 2951fi 2952rm -f conftest* 2953LIBS="$ac_save_LIBS" 2954 2955fi 2956if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 2957 echo "$ac_t""yes" 1>&6 2958 tcl_ok=1 2959else 2960 echo "$ac_t""no" 1>&6 2961tcl_ok=0 2962fi 2963 2964fi 2965if test "$tcl_ok" = 0; then 2966 echo $ac_n "checking for -linet""... $ac_c" 1>&6 2967ac_lib_var=`echo inet | tr '+./' 'p__'` 2968if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 2969 echo $ac_n "(cached) $ac_c" 1>&6 2970else 2971 ac_save_LIBS="$LIBS" 2972LIBS="-linet $LIBS" 2973cat > conftest.$ac_ext <<EOF 2974#line 2975 "configure" 2975#include "confdefs.h" 2976 2977int main() { return 0; } 2978int t() { 2979strncasecmp() 2980; return 0; } 2981EOF 2982if eval $ac_link; then 2983 rm -rf conftest* 2984 eval "ac_cv_lib_$ac_lib_var=yes" 2985else 2986 rm -rf conftest* 2987 eval "ac_cv_lib_$ac_lib_var=no" 2988fi 2989rm -f conftest* 2990LIBS="$ac_save_LIBS" 2991 2992fi 2993if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 2994 echo "$ac_t""yes" 1>&6 2995 tcl_ok=1 2996else 2997 echo "$ac_t""no" 1>&6 2998tcl_ok=0 2999fi 3000 3001fi 3002if test "$tcl_ok" = 0; then 3003 LIBOBJS="$LIBOBJS strncasecmp.o" 3004fi 3005 3006#-------------------------------------------------------------------- 3007# The code below deals with several issues related to gettimeofday: 3008# 1. Some systems don't provide a gettimeofday function at all 3009# (set NO_GETTOD if this is the case). 3010# 2. SGI systems don't use the BSD form of the gettimeofday function, 3011# but they have a BSDgettimeofday function that can be used instead. 3012# 3. See if gettimeofday is declared in the <sys/time.h> header file. 3013# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can 3014# declare it. 3015#-------------------------------------------------------------------- 3016 3017echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 3018if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then 3019 echo $ac_n "(cached) $ac_c" 1>&6 3020else 3021 cat > conftest.$ac_ext <<EOF 3022#line 3023 "configure" 3023#include "confdefs.h" 3024/* System header to define __stub macros and hopefully few prototypes, 3025 which can conflict with char BSDgettimeofday(); below. */ 3026#include <assert.h> 3027/* Override any gcc2 internal prototype to avoid an error. */ 3028char BSDgettimeofday(); 3029 3030int main() { return 0; } 3031int t() { 3032 3033/* The GNU C library defines this for functions which it implements 3034 to always fail with ENOSYS. Some functions are actually named 3035 something starting with __ and the normal name is an alias. */ 3036#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) 3037choke me 3038#else 3039BSDgettimeofday(); 3040#endif 3041 3042; return 0; } 3043EOF 3044if eval $ac_link; then 3045 rm -rf conftest* 3046 eval "ac_cv_func_BSDgettimeofday=yes" 3047else 3048 rm -rf conftest* 3049 eval "ac_cv_func_BSDgettimeofday=no" 3050fi 3051rm -f conftest* 3052 3053fi 3054if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then 3055 echo "$ac_t""yes" 1>&6 3056 cat >> confdefs.h <<\EOF 3057#define HAVE_BSDGETTIMEOFDAY 1 3058EOF 3059 3060else 3061 echo "$ac_t""no" 1>&6 3062echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 3063if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then 3064 echo $ac_n "(cached) $ac_c" 1>&6 3065else 3066 cat > conftest.$ac_ext <<EOF 3067#line 3068 "configure" 3068#include "confdefs.h" 3069/* System header to define __stub macros and hopefully few prototypes, 3070 which can conflict with char gettimeofday(); below. */ 3071#include <assert.h> 3072/* Override any gcc2 internal prototype to avoid an error. */ 3073char gettimeofday(); 3074 3075int main() { return 0; } 3076int t() { 3077 3078/* The GNU C library defines this for functions which it implements 3079 to always fail with ENOSYS. Some functions are actually named 3080 something starting with __ and the normal name is an alias. */ 3081#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) 3082choke me 3083#else 3084gettimeofday(); 3085#endif 3086 3087; return 0; } 3088EOF 3089if eval $ac_link; then 3090 rm -rf conftest* 3091 eval "ac_cv_func_gettimeofday=yes" 3092else 3093 rm -rf conftest* 3094 eval "ac_cv_func_gettimeofday=no" 3095fi 3096rm -f conftest* 3097 3098fi 3099if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then 3100 echo "$ac_t""yes" 1>&6 3101 : 3102else 3103 echo "$ac_t""no" 1>&6 3104cat >> confdefs.h <<\EOF 3105#define NO_GETTOD 1 3106EOF 3107 3108fi 3109 3110fi 3111 3112echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 3113cat > conftest.$ac_ext <<EOF 3114#line 3115 "configure" 3115#include "confdefs.h" 3116#include <sys/time.h> 3117EOF 3118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3119 egrep "gettimeofday" >/dev/null 2>&1; then 3120 rm -rf conftest* 3121 echo "$ac_t""present" 1>&6 3122else 3123 rm -rf conftest* 3124 3125 echo "$ac_t""missing" 1>&6 3126 cat >> confdefs.h <<\EOF 3127#define GETTOD_NOT_DECLARED 1 3128EOF 3129 3130 3131fi 3132rm -f conftest* 3133 3134 3135#-------------------------------------------------------------------- 3136# Interactive UNIX requires -linet instead of -lsocket, plus it 3137# needs net/errno.h to define the socket-related error codes. 3138#-------------------------------------------------------------------- 3139 3140echo $ac_n "checking for -linet""... $ac_c" 1>&6 3141ac_lib_var=`echo inet | tr '+./' 'p__'` 3142if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3143 echo $ac_n "(cached) $ac_c" 1>&6 3144else 3145 ac_save_LIBS="$LIBS" 3146LIBS="-linet $LIBS" 3147cat > conftest.$ac_ext <<EOF 3148#line 3149 "configure" 3149#include "confdefs.h" 3150 3151int main() { return 0; } 3152int t() { 3153main() 3154; return 0; } 3155EOF 3156if eval $ac_link; then 3157 rm -rf conftest* 3158 eval "ac_cv_lib_$ac_lib_var=yes" 3159else 3160 rm -rf conftest* 3161 eval "ac_cv_lib_$ac_lib_var=no" 3162fi 3163rm -f conftest* 3164LIBS="$ac_save_LIBS" 3165 3166fi 3167if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3168 echo "$ac_t""yes" 1>&6 3169 LIBS="$LIBS -linet" 3170else 3171 echo "$ac_t""no" 1>&6 3172fi 3173 3174ac_safe=`echo "net/errno.h" | tr './\055' '___'` 3175echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6 3176if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 3177 echo $ac_n "(cached) $ac_c" 1>&6 3178else 3179 cat > conftest.$ac_ext <<EOF 3180#line 3181 "configure" 3181#include "confdefs.h" 3182#include <net/errno.h> 3183EOF 3184eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 3185ac_err=`grep -v '^ *+' conftest.out` 3186if test -z "$ac_err"; then 3187 rm -rf conftest* 3188 eval "ac_cv_header_$ac_safe=yes" 3189else 3190 echo "$ac_err" >&5 3191 rm -rf conftest* 3192 eval "ac_cv_header_$ac_safe=no" 3193fi 3194rm -f conftest* 3195fi 3196if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 3197 echo "$ac_t""yes" 1>&6 3198 cat >> confdefs.h <<\EOF 3199#define HAVE_NET_ERRNO_H 1 3200EOF 3201 3202else 3203 echo "$ac_t""no" 1>&6 3204fi 3205 3206 3207#-------------------------------------------------------------------- 3208# The following code checks to see whether it is possible to get 3209# signed chars on this platform. This is needed in order to 3210# properly generate sign-extended ints from character values. 3211#-------------------------------------------------------------------- 3212 3213echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 3214if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then 3215 echo $ac_n "(cached) $ac_c" 1>&6 3216else 3217 if test "$GCC" = yes; then 3218 # GCC predefines this symbol on systems where it applies. 3219cat > conftest.$ac_ext <<EOF 3220#line 3221 "configure" 3221#include "confdefs.h" 3222#ifdef __CHAR_UNSIGNED__ 3223 yes 3224#endif 3225 3226EOF 3227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3228 egrep "yes" >/dev/null 2>&1; then 3229 rm -rf conftest* 3230 ac_cv_c_char_unsigned=yes 3231else 3232 rm -rf conftest* 3233 ac_cv_c_char_unsigned=no 3234fi 3235rm -f conftest* 3236 3237else 3238if test "$cross_compiling" = yes; then 3239 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } 3240else 3241cat > conftest.$ac_ext <<EOF 3242#line 3243 "configure" 3243#include "confdefs.h" 3244/* volatile prevents gcc2 from optimizing the test away on sparcs. */ 3245#if !defined(__STDC__) || __STDC__ != 1 3246#define volatile 3247#endif 3248main() { 3249 volatile char c = 255; exit(c < 0); 3250} 3251EOF 3252eval $ac_link 3253if test -s conftest && (./conftest; exit) 2>/dev/null; then 3254 ac_cv_c_char_unsigned=yes 3255else 3256 ac_cv_c_char_unsigned=no 3257fi 3258fi 3259rm -fr conftest* 3260fi 3261fi 3262 3263echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 3264if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then 3265 cat >> confdefs.h <<\EOF 3266#define __CHAR_UNSIGNED__ 1 3267EOF 3268 3269fi 3270 3271echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 3272cat > conftest.$ac_ext <<EOF 3273#line 3274 "configure" 3274#include "confdefs.h" 3275 3276int main() { return 0; } 3277int t() { 3278 3279signed char *p; 3280p = 0; 3281 3282; return 0; } 3283EOF 3284if eval $ac_compile; then 3285 rm -rf conftest* 3286 tcl_ok=yes 3287else 3288 rm -rf conftest* 3289 tcl_ok=no 3290fi 3291rm -f conftest* 3292 3293echo "$ac_t""$tcl_ok" 1>&6 3294if test $tcl_ok = yes; then 3295 cat >> confdefs.h <<\EOF 3296#define HAVE_SIGNED_CHAR 1 3297EOF 3298 3299fi 3300 3301#-------------------------------------------------------------------- 3302# Check for the existence of the -lsocket and -lnsl libraries. 3303# The order here is important, so that they end up in the right 3304# order in the command line generated by make. Here are some 3305# special considerations: 3306# 1. Use "connect" and "accept" to check for -lsocket, and 3307# "gethostbyname" to check for -lnsl. 3308# 2. Use each function name only once: can't redo a check because 3309# autoconf caches the results of the last check and won't redo it. 3310# 3. Use -lnsl and -lsocket only if they supply procedures that 3311# aren't already present in the normal libraries. This is because 3312# IRIX 5.2 has libraries, but they aren't needed and they're 3313# bogus: they goof up name resolution if used. 3314# 4. On some SVR4 systems, can't use -lsocket without -lnsl too. 3315# To get around this problem, check for both libraries together 3316# if -lsocket doesn't work by itself. 3317#-------------------------------------------------------------------- 3318 3319tcl_checkBoth=0 3320echo $ac_n "checking for connect""... $ac_c" 1>&6 3321if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then 3322 echo $ac_n "(cached) $ac_c" 1>&6 3323else 3324 cat > conftest.$ac_ext <<EOF 3325#line 3326 "configure" 3326#include "confdefs.h" 3327/* System header to define __stub macros and hopefully few prototypes, 3328 which can conflict with char connect(); below. */ 3329#include <assert.h> 3330/* Override any gcc2 internal prototype to avoid an error. */ 3331char connect(); 3332 3333int main() { return 0; } 3334int t() { 3335 3336/* The GNU C library defines this for functions which it implements 3337 to always fail with ENOSYS. Some functions are actually named 3338 something starting with __ and the normal name is an alias. */ 3339#if defined (__stub_connect) || defined (__stub___connect) 3340choke me 3341#else 3342connect(); 3343#endif 3344 3345; return 0; } 3346EOF 3347if eval $ac_link; then 3348 rm -rf conftest* 3349 eval "ac_cv_func_connect=yes" 3350else 3351 rm -rf conftest* 3352 eval "ac_cv_func_connect=no" 3353fi 3354rm -f conftest* 3355 3356fi 3357if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then 3358 echo "$ac_t""yes" 1>&6 3359 tcl_checkSocket=0 3360else 3361 echo "$ac_t""no" 1>&6 3362tcl_checkSocket=1 3363fi 3364 3365if test "$tcl_checkSocket" = 1; then 3366 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 3367ac_lib_var=`echo socket | tr '+./' 'p__'` 3368if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3369 echo $ac_n "(cached) $ac_c" 1>&6 3370else 3371 ac_save_LIBS="$LIBS" 3372LIBS="-lsocket $LIBS" 3373cat > conftest.$ac_ext <<EOF 3374#line 3375 "configure" 3375#include "confdefs.h" 3376 3377int main() { return 0; } 3378int t() { 3379main() 3380; return 0; } 3381EOF 3382if eval $ac_link; then 3383 rm -rf conftest* 3384 eval "ac_cv_lib_$ac_lib_var=yes" 3385else 3386 rm -rf conftest* 3387 eval "ac_cv_lib_$ac_lib_var=no" 3388fi 3389rm -f conftest* 3390LIBS="$ac_save_LIBS" 3391 3392fi 3393if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3394 echo "$ac_t""yes" 1>&6 3395 LIBS="$LIBS -lsocket" 3396else 3397 echo "$ac_t""no" 1>&6 3398tcl_checkBoth=1 3399fi 3400 3401fi 3402if test "$tcl_checkBoth" = 1; then 3403 tk_oldLibs=$LIBS 3404 LIBS="$LIBS -lsocket -lnsl" 3405 echo $ac_n "checking for accept""... $ac_c" 1>&6 3406if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then 3407 echo $ac_n "(cached) $ac_c" 1>&6 3408else 3409 cat > conftest.$ac_ext <<EOF 3410#line 3411 "configure" 3411#include "confdefs.h" 3412/* System header to define __stub macros and hopefully few prototypes, 3413 which can conflict with char accept(); below. */ 3414#include <assert.h> 3415/* Override any gcc2 internal prototype to avoid an error. */ 3416char accept(); 3417 3418int main() { return 0; } 3419int t() { 3420 3421/* The GNU C library defines this for functions which it implements 3422 to always fail with ENOSYS. Some functions are actually named 3423 something starting with __ and the normal name is an alias. */ 3424#if defined (__stub_accept) || defined (__stub___accept) 3425choke me 3426#else 3427accept(); 3428#endif 3429 3430; return 0; } 3431EOF 3432if eval $ac_link; then 3433 rm -rf conftest* 3434 eval "ac_cv_func_accept=yes" 3435else 3436 rm -rf conftest* 3437 eval "ac_cv_func_accept=no" 3438fi 3439rm -f conftest* 3440 3441fi 3442if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then 3443 echo "$ac_t""yes" 1>&6 3444 tcl_checkNsl=0 3445else 3446 echo "$ac_t""no" 1>&6 3447LIBS=$tk_oldLibs 3448fi 3449 3450fi 3451echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 3452if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then 3453 echo $ac_n "(cached) $ac_c" 1>&6 3454else 3455 cat > conftest.$ac_ext <<EOF 3456#line 3457 "configure" 3457#include "confdefs.h" 3458/* System header to define __stub macros and hopefully few prototypes, 3459 which can conflict with char gethostbyname(); below. */ 3460#include <assert.h> 3461/* Override any gcc2 internal prototype to avoid an error. */ 3462char gethostbyname(); 3463 3464int main() { return 0; } 3465int t() { 3466 3467/* The GNU C library defines this for functions which it implements 3468 to always fail with ENOSYS. Some functions are actually named 3469 something starting with __ and the normal name is an alias. */ 3470#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) 3471choke me 3472#else 3473gethostbyname(); 3474#endif 3475 3476; return 0; } 3477EOF 3478if eval $ac_link; then 3479 rm -rf conftest* 3480 eval "ac_cv_func_gethostbyname=yes" 3481else 3482 rm -rf conftest* 3483 eval "ac_cv_func_gethostbyname=no" 3484fi 3485rm -f conftest* 3486 3487fi 3488if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then 3489 echo "$ac_t""yes" 1>&6 3490 : 3491else 3492 echo "$ac_t""no" 1>&6 3493echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 3494ac_lib_var=`echo nsl | tr '+./' 'p__'` 3495if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3496 echo $ac_n "(cached) $ac_c" 1>&6 3497else 3498 ac_save_LIBS="$LIBS" 3499LIBS="-lnsl $LIBS" 3500cat > conftest.$ac_ext <<EOF 3501#line 3502 "configure" 3502#include "confdefs.h" 3503 3504int main() { return 0; } 3505int t() { 3506main() 3507; return 0; } 3508EOF 3509if eval $ac_link; then 3510 rm -rf conftest* 3511 eval "ac_cv_lib_$ac_lib_var=yes" 3512else 3513 rm -rf conftest* 3514 eval "ac_cv_lib_$ac_lib_var=no" 3515fi 3516rm -f conftest* 3517LIBS="$ac_save_LIBS" 3518 3519fi 3520if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3521 echo "$ac_t""yes" 1>&6 3522 LIBS="$LIBS -lnsl" 3523else 3524 echo "$ac_t""no" 1>&6 3525fi 3526 3527fi 3528 3529 3530#-------------------------------------------------------------------- 3531# The statements below define a collection of symbols related to 3532# dynamic loading and shared libraries: 3533# 3534# DL_OBJS - Name of the object file that implements dynamic 3535# loading for Tcl on this system. 3536# DL_LIBS - Library file(s) to include in tclsh and other base 3537# applications in order for the "load" command to work. 3538# LD_FLAGS - Flags to pass to the compiler when linking object 3539# files into an executable application binary such 3540# as tclsh. 3541# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", 3542# that tell the run-time dynamic linker where to look 3543# for shared libraries such as libtcl.so. Depends on 3544# the variable LIB_RUNTIME_DIR in the Makefile. 3545# MAKE_LIB - Command to execute to build the Tcl library; 3546# differs depending on whether or not Tcl is being 3547# compiled as a shared library. 3548# SHLIB_CFLAGS - Flags to pass to cc when compiling the components 3549# of a shared library (may request position-independent 3550# code, among other things). 3551# SHLIB_LD - Base command to use for combining object files 3552# into a shared library. 3553# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when 3554# creating shared libraries. This symbol typically 3555# goes at the end of the "ld" commands that build 3556# shared libraries. The value of the symbol is 3557# "${LIBS}" if all of the dependent libraries should 3558# be specified when creating a shared library. If 3559# dependent libraries should not be specified (as on 3560# SunOS 4.x, where they cause the link to fail, or in 3561# general if Tcl and Tk aren't themselves shared 3562# libraries), then this symbol has an empty string 3563# as its value. 3564# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable 3565# extensions. An empty string means we don't know how 3566# to use shared libraries on this platform. 3567# TCL_LIB_FILE - Name of the file that contains the Tcl library, such 3568# as libtcl7.8.so or libtcl7.8.a. 3569# TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" 3570# in the shared library name, using the $VERSION variable 3571# to put the version in the right place. This is used 3572# by platforms that need non-standard library names. 3573# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs 3574# to have a version after the .so, and ${VERSION}.a 3575# on AIX, since the Tcl shared library needs to have 3576# a .a extension whereas shared objects for loadable 3577# extensions have a .so extension. Defaults to 3578# ${VERSION}${SHLIB_SUFFIX}. 3579#-------------------------------------------------------------------- 3580 3581# Step 1: set the variable "system" to hold the name and version number 3582# for the system. This can usually be done via the "uname" command, but 3583# there are a few systems, like Next, where this doesn't work. 3584 3585echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 3586if test -f /usr/lib/NextStep/software_version; then 3587 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 3588else 3589 system=`uname -s`-`uname -r` 3590 if test "$?" -ne 0 ; then 3591 echo "$ac_t""unknown (can't find uname command)" 1>&6 3592 system=unknown 3593 else 3594 # Special check for weird MP-RAS system (uname returns weird 3595 # results, and the version is kept in special file). 3596 3597 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 3598 system=MP-RAS-`awk '{print $3}' /etc/.relid'` 3599 fi 3600 if test "`uname -s`" = "AIX" ; then 3601 system=AIX-`uname -v`.`uname -r` 3602 fi 3603 echo "$ac_t""$system" 1>&6 3604 fi 3605fi 3606 3607# Step 2: check for existence of -ldl library. This is needed because 3608# Linux can use either -ldl or -ldld for dynamic loading. 3609 3610echo $ac_n "checking for -ldl""... $ac_c" 1>&6 3611ac_lib_var=`echo dl | tr '+./' 'p__'` 3612if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3613 echo $ac_n "(cached) $ac_c" 1>&6 3614else 3615 ac_save_LIBS="$LIBS" 3616LIBS="-ldl $LIBS" 3617cat > conftest.$ac_ext <<EOF 3618#line 3619 "configure" 3619#include "confdefs.h" 3620 3621int main() { return 0; } 3622int t() { 3623dlopen() 3624; return 0; } 3625EOF 3626if eval $ac_link; then 3627 rm -rf conftest* 3628 eval "ac_cv_lib_$ac_lib_var=yes" 3629else 3630 rm -rf conftest* 3631 eval "ac_cv_lib_$ac_lib_var=no" 3632fi 3633rm -f conftest* 3634LIBS="$ac_save_LIBS" 3635 3636fi 3637if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3638 echo "$ac_t""yes" 1>&6 3639 have_dl=yes 3640else 3641 echo "$ac_t""no" 1>&6 3642have_dl=no 3643fi 3644 3645 3646# Step 3: set configuration options based on system name and version. 3647 3648fullSrcDir=`cd $srcdir; pwd` 3649AIX=no 3650TCL_SHARED_LIB_SUFFIX="" 3651TCL_UNSHARED_LIB_SUFFIX="" 3652TCL_LIB_VERSIONS_OK=ok 3653case $system in 3654 AIX-*) 3655 SHLIB_CFLAGS="" 3656 SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" 3657 SHLIB_LD_LIBS='${LIBS}' 3658 SHLIB_SUFFIX=".so" 3659 DL_OBJS="tclLoadDl.o tclLoadAix.o" 3660 DL_LIBS="-lld" 3661 LD_FLAGS="" 3662 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3663 AIX=yes 3664 TCL_SHARED_LIB_SUFFIX='${VERSION}.a' 3665 ;; 3666 BSD/OS-2.1*|BSD/OS-3*) 3667 SHLIB_CFLAGS="" 3668 SHLIB_LD="ld -r" 3669 SHLIB_LD_FLAGS="" 3670 SHLIB_SUFFIX=".so" 3671 DL_OBJS="tclLoadDl.o" 3672 DL_LIBS="-ldl" 3673 LD_FLAGS="" 3674 LD_SEARCH_FLAGS="" 3675 ;; 3676 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) 3677 echo $ac_n "checking for -ldld""... $ac_c" 1>&6 3678ac_lib_var=`echo dld | tr '+./' 'p__'` 3679if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3680 echo $ac_n "(cached) $ac_c" 1>&6 3681else 3682 ac_save_LIBS="$LIBS" 3683LIBS="-ldld $LIBS" 3684cat > conftest.$ac_ext <<EOF 3685#line 3686 "configure" 3686#include "confdefs.h" 3687 3688int main() { return 0; } 3689int t() { 3690shl_load() 3691; return 0; } 3692EOF 3693if eval $ac_link; then 3694 rm -rf conftest* 3695 eval "ac_cv_lib_$ac_lib_var=yes" 3696else 3697 rm -rf conftest* 3698 eval "ac_cv_lib_$ac_lib_var=no" 3699fi 3700rm -f conftest* 3701LIBS="$ac_save_LIBS" 3702 3703fi 3704if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3705 echo "$ac_t""yes" 1>&6 3706 tcl_ok=yes 3707else 3708 echo "$ac_t""no" 1>&6 3709tcl_ok=no 3710fi 3711 3712 if test "$tcl_ok" = yes; then 3713 SHLIB_CFLAGS="+z" 3714 SHLIB_LD="ld -b" 3715 SHLIB_LD_LIBS="" 3716 SHLIB_SUFFIX=".sl" 3717 DL_OBJS="tclLoadShl.o" 3718 DL_LIBS="-ldld" 3719 LD_FLAGS="-Wl,-E" 3720 LD_SEARCH_FLAGS='-Wl,+b,${LIB_RUNTIME_DIR}:.' 3721 fi 3722 ;; 3723 IRIX-4.*) 3724 SHLIB_CFLAGS="-G 0" 3725 SHLIB_SUFFIX="..o" 3726 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 3727 SHLIB_LD_LIBS='${LIBS}' 3728 DL_OBJS="tclLoadAout.o" 3729 DL_LIBS="" 3730 LD_FLAGS="-Wl,-D,08000000" 3731 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3732 TCL_SHARED_LIB_SUFFIX='${VERSION}.a' 3733 ;; 3734 IRIX-5.*|IRIX-6.*) 3735 SHLIB_CFLAGS="" 3736 SHLIB_LD="ld -shared -rdata_shared" 3737 SHLIB_LD_LIBS="" 3738 SHLIB_SUFFIX=".so" 3739 DL_OBJS="tclLoadDl.o" 3740 DL_LIBS="" 3741 LD_FLAGS="" 3742 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 3743 ;; 3744 IRIX64-6.*) 3745 SHLIB_CFLAGS="" 3746 SHLIB_LD="ld -32 -shared -rdata_shared -rpath /usr/local/lib" 3747 SHLIB_LD_LIBS="" 3748 SHLIB_SUFFIX=".so" 3749 DL_OBJS="tclLoadDl.o" 3750 DL_LIBS="" 3751 LD_FLAGS="" 3752 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 3753 ;; 3754 Linux*) 3755 SHLIB_CFLAGS="-fPIC" 3756 SHLIB_LD_LIBS="" 3757 SHLIB_SUFFIX=".so" 3758 if test "$have_dl" = yes; then 3759 SHLIB_LD="${CC} -shared" 3760 DL_OBJS="tclLoadDl.o" 3761 DL_LIBS="-ldl" 3762 LD_FLAGS="-rdynamic" 3763 LD_SEARCH_FLAGS="" 3764 else 3765 ac_safe=`echo "dld.h" | tr './\055' '___'` 3766echo $ac_n "checking for dld.h""... $ac_c" 1>&6 3767if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 3768 echo $ac_n "(cached) $ac_c" 1>&6 3769else 3770 cat > conftest.$ac_ext <<EOF 3771#line 3772 "configure" 3772#include "confdefs.h" 3773#include <dld.h> 3774EOF 3775eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 3776ac_err=`grep -v '^ *+' conftest.out` 3777if test -z "$ac_err"; then 3778 rm -rf conftest* 3779 eval "ac_cv_header_$ac_safe=yes" 3780else 3781 echo "$ac_err" >&5 3782 rm -rf conftest* 3783 eval "ac_cv_header_$ac_safe=no" 3784fi 3785rm -f conftest* 3786fi 3787if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 3788 echo "$ac_t""yes" 1>&6 3789 3790 SHLIB_LD="ld -shared" 3791 DL_OBJS="tclLoadDld.o" 3792 DL_LIBS="-ldld" 3793 LD_FLAGS="" 3794 LD_SEARCH_FLAGS="" 3795else 3796 echo "$ac_t""no" 1>&6 3797fi 3798 3799 fi 3800 ;; 3801 MP-RAS-02*) 3802 SHLIB_CFLAGS="-K PIC" 3803 SHLIB_LD="cc -G" 3804 SHLIB_LD_LIBS="" 3805 SHLIB_SUFFIX=".so" 3806 DL_OBJS="tclLoadDl.o" 3807 DL_LIBS="-ldl" 3808 LD_FLAGS="" 3809 LD_SEARCH_FLAGS="" 3810 ;; 3811 MP-RAS-*) 3812 SHLIB_CFLAGS="-K PIC" 3813 SHLIB_LD="cc -G" 3814 SHLIB_LD_LIBS="" 3815 SHLIB_SUFFIX=".so" 3816 DL_OBJS="tclLoadDl.o" 3817 DL_LIBS="-ldl" 3818 LD_FLAGS="-Wl,-Bexport" 3819 LD_SEARCH_FLAGS="" 3820 ;; 3821 NetBSD-*|FreeBSD-*|OpenBSD-*) 3822 # Not available on all versions: check for include file. 3823 ac_safe=`echo "dlfcn.h" | tr './\055' '___'` 3824echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 3825if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 3826 echo $ac_n "(cached) $ac_c" 1>&6 3827else 3828 cat > conftest.$ac_ext <<EOF 3829#line 3830 "configure" 3830#include "confdefs.h" 3831#include <dlfcn.h> 3832EOF 3833eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 3834ac_err=`grep -v '^ *+' conftest.out` 3835if test -z "$ac_err"; then 3836 rm -rf conftest* 3837 eval "ac_cv_header_$ac_safe=yes" 3838else 3839 echo "$ac_err" >&5 3840 rm -rf conftest* 3841 eval "ac_cv_header_$ac_safe=no" 3842fi 3843rm -f conftest* 3844fi 3845if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 3846 echo "$ac_t""yes" 1>&6 3847 3848 SHLIB_CFLAGS="-fpic" 3849 SHLIB_LD="ld -Bshareable -x" 3850 SHLIB_LD_LIBS="" 3851 SHLIB_SUFFIX=".so" 3852 DL_OBJS="tclLoadDl.o" 3853 DL_LIBS="" 3854 LD_FLAGS="" 3855 LD_SEARCH_FLAGS="" 3856 TCL_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0' 3857 3858else 3859 echo "$ac_t""no" 1>&6 3860 3861 SHLIB_CFLAGS="" 3862 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 3863 SHLIB_LD_LIBS='${LIBS}' 3864 SHLIB_SUFFIX="..o" 3865 DL_OBJS="tclLoadAout.o" 3866 DL_LIBS="" 3867 LD_FLAGS="" 3868 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3869 TCL_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a' 3870 3871fi 3872 3873 3874 # FreeBSD doesn't handle version numbers with dots. 3875 3876 TCL_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a' 3877 TCL_LIB_VERSIONS_OK=nodots 3878 ;; 3879 NEXTSTEP-*) 3880 SHLIB_CFLAGS="" 3881 SHLIB_LD="cc -nostdlib -r" 3882 SHLIB_LD_LIBS="" 3883 SHLIB_SUFFIX=".so" 3884 DL_OBJS="tclLoadNext.o" 3885 DL_LIBS="" 3886 LD_FLAGS="" 3887 LD_SEARCH_FLAGS="" 3888 ;; 3889 OSF1-1.0|OSF1-1.1|OSF1-1.2) 3890 # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 3891 SHLIB_CFLAGS="" 3892 # Hack: make package name same as library name 3893 SHLIB_LD='ld -R -export $@:' 3894 SHLIB_LD_LIBS="" 3895 SHLIB_SUFFIX=".so" 3896 DL_OBJS="tclLoadOSF.o" 3897 DL_LIBS="" 3898 LD_FLAGS="" 3899 LD_SEARCH_FLAGS="" 3900 ;; 3901 OSF1-1.*) 3902 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 3903 SHLIB_CFLAGS="-fpic" 3904 SHLIB_LD="ld -shared" 3905 SHLIB_LD_LIBS="" 3906 SHLIB_SUFFIX=".so" 3907 DL_OBJS="tclLoadDl.o" 3908 DL_LIBS="" 3909 LD_FLAGS="" 3910 LD_SEARCH_FLAGS="" 3911 ;; 3912 OSF1-V*) 3913 # Digital OSF/1 3914 SHLIB_CFLAGS="" 3915 SHLIB_LD='ld -shared -expect_unresolved "*"' 3916 SHLIB_LD_LIBS="" 3917 SHLIB_SUFFIX=".so" 3918 DL_OBJS="tclLoadDl.o" 3919 DL_LIBS="" 3920 LD_FLAGS="" 3921 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 3922 ;; 3923 RISCos-*) 3924 SHLIB_CFLAGS="-G 0" 3925 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 3926 SHLIB_LD_LIBS='${LIBS}' 3927 SHLIB_SUFFIX="..o" 3928 DL_OBJS="tclLoadAout.o" 3929 DL_LIBS="" 3930 LD_FLAGS="-Wl,-D,08000000" 3931 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3932 TCL_SHARED_LIB_SUFFIX='${VERSION}.a' 3933 ;; 3934 SCO_SV-3.2*) 3935 # Note, dlopen is available only on SCO 3.2.5 and greater. However, 3936 # this test works, since "uname -s" was non-standard in 3.2.4 and 3937 # below. 3938 SHLIB_CFLAGS="-Kpic -belf" 3939 SHLIB_LD="ld -G" 3940 SHLIB_LD_LIBS="" 3941 SHLIB_SUFFIX=".so" 3942 DL_OBJS="tclLoadDl.o" 3943 DL_LIBS="" 3944 LD_FLAGS="-belf -Wl,-Bexport" 3945 LD_SEARCH_FLAGS="" 3946 ;; 3947 SINIX*5.4*) 3948 SHLIB_CFLAGS="-K PIC" 3949 SHLIB_LD="cc -G" 3950 SHLIB_LD_LIBS="" 3951 SHLIB_SUFFIX=".so" 3952 DL_OBJS="tclLoadDl.o" 3953 DL_LIBS="-ldl" 3954 LD_FLAGS="" 3955 LD_SEARCH_FLAGS="" 3956 ;; 3957 SunOS-4*) 3958 SHLIB_CFLAGS="-PIC" 3959 SHLIB_LD="ld" 3960 SHLIB_LD_LIBS="" 3961 SHLIB_SUFFIX=".so" 3962 DL_OBJS="tclLoadDl.o" 3963 DL_LIBS="-ldl" 3964 LD_FLAGS="" 3965 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3966 3967 # SunOS can't handle version numbers with dots in them in library 3968 # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it 3969 # requires an extra version number at the end of .so file names. 3970 # So, the library has to have a name like libtcl75.so.1.0 3971 3972 TCL_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0' 3973 TCL_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a' 3974 TCL_LIB_VERSIONS_OK=nodots 3975 ;; 3976 SunOS-5*) 3977 SHLIB_CFLAGS="-KPIC" 3978 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 3979 SHLIB_LD_LIBS="" 3980 SHLIB_SUFFIX=".so" 3981 DL_OBJS="tclLoadDl.o" 3982 DL_LIBS="-ldl" 3983 LD_FLAGS="" 3984 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 3985 ;; 3986 ULTRIX-4.*) 3987 SHLIB_CFLAGS="-G 0" 3988 SHLIB_SUFFIX="..o" 3989 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 3990 SHLIB_LD_LIBS='${LIBS}' 3991 DL_OBJS="tclLoadAout.o" 3992 DL_LIBS="" 3993 LD_FLAGS="-Wl,-D,08000000" 3994 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 3995 TCL_SHARED_LIB_SUFFIX='${VERSION}.a' 3996 ;; 3997 UNIX_SV*) 3998 SHLIB_CFLAGS="-KPIC" 3999 SHLIB_LD="cc -G" 4000 SHLIB_LD_LIBS="" 4001 SHLIB_SUFFIX=".so" 4002 DL_OBJS="tclLoadDl.o" 4003 DL_LIBS="-ldl" 4004 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers 4005 # that don't grok the -Bexport option. Test that it does. 4006 hold_ldflags=$LDFLAGS 4007 echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 4008 LDFLAGS="${LDFLAGS} -Wl,-Bexport" 4009 cat > conftest.$ac_ext <<EOF 4010#line 4011 "configure" 4011#include "confdefs.h" 4012 4013int main() { return 0; } 4014int t() { 4015int i; 4016; return 0; } 4017EOF 4018if eval $ac_link; then 4019 rm -rf conftest* 4020 found=yes 4021else 4022 rm -rf conftest* 4023 found=no 4024fi 4025rm -f conftest* 4026 4027 LDFLAGS=$hold_ldflags 4028 echo "$ac_t""$found" 1>&6 4029 if test $found = yes; then 4030 LD_FLAGS="-Wl,-Bexport" 4031 else 4032 LD_FLAGS="" 4033 fi 4034 LD_SEARCH_FLAGS="" 4035 ;; 4036esac 4037 4038# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic 4039# Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, 4040# New Orleans, LA, Computerized Processes Unlimited, 1994), then we need 4041# to determine which of several header files defines the a.out file 4042# format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we 4043# support only a file format that is more or less version-7-compatible. 4044# In particular, 4045# - a.out files must begin with `struct exec'. 4046# - the N_TXTOFF on the `struct exec' must compute the seek address 4047# of the text segment 4048# - The `struct exec' must contain a_magic, a_text, a_data, a_bss 4049# and a_entry fields. 4050# The following compilation should succeed if and only if either sys/exec.h 4051# or a.out.h is usable for the purpose. 4052# 4053# Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the 4054# `struct exec' includes a second header that contains information that 4055# duplicates the v7 fields that are needed. 4056 4057if test "x$DL_OBJS" = "xtclLoadAout.o" ; then 4058 echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 4059 cat > conftest.$ac_ext <<EOF 4060#line 4061 "configure" 4061#include "confdefs.h" 4062#include <sys/exec.h> 4063int main() { return 0; } 4064int t() { 4065 4066 struct exec foo; 4067 unsigned long seek; 4068 int flag; 4069#if defined(__mips) || defined(mips) 4070 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 4071#else 4072 seek = N_TXTOFF (foo); 4073#endif 4074 flag = (foo.a_magic == OMAGIC); 4075 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 4076 4077; return 0; } 4078EOF 4079if eval $ac_compile; then 4080 rm -rf conftest* 4081 tcl_ok=usable 4082else 4083 rm -rf conftest* 4084 tcl_ok=unusable 4085fi 4086rm -f conftest* 4087 4088 echo "$ac_t""$tcl_ok" 1>&6 4089 if test $tcl_ok = usable; then 4090 cat >> confdefs.h <<\EOF 4091#define USE_SYS_EXEC_H 1 4092EOF 4093 4094 else 4095 echo $ac_n "checking a.out.h""... $ac_c" 1>&6 4096 cat > conftest.$ac_ext <<EOF 4097#line 4098 "configure" 4098#include "confdefs.h" 4099#include <a.out.h> 4100int main() { return 0; } 4101int t() { 4102 4103 struct exec foo; 4104 unsigned long seek; 4105 int flag; 4106#if defined(__mips) || defined(mips) 4107 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 4108#else 4109 seek = N_TXTOFF (foo); 4110#endif 4111 flag = (foo.a_magic == OMAGIC); 4112 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 4113 4114; return 0; } 4115EOF 4116if eval $ac_compile; then 4117 rm -rf conftest* 4118 tcl_ok=usable 4119else 4120 rm -rf conftest* 4121 tcl_ok=unusable 4122fi 4123rm -f conftest* 4124 4125 echo "$ac_t""$tcl_ok" 1>&6 4126 if test $tcl_ok = usable; then 4127 cat >> confdefs.h <<\EOF 4128#define USE_A_OUT_H 1 4129EOF 4130 4131 else 4132 echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 4133 cat > conftest.$ac_ext <<EOF 4134#line 4135 "configure" 4135#include "confdefs.h" 4136#include <sys/exec_aout.h> 4137int main() { return 0; } 4138int t() { 4139 4140 struct exec foo; 4141 unsigned long seek; 4142 int flag; 4143#if defined(__mips) || defined(mips) 4144 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 4145#else 4146 seek = N_TXTOFF (foo); 4147#endif 4148 flag = (foo.a_midmag == OMAGIC); 4149 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 4150 4151; return 0; } 4152EOF 4153if eval $ac_compile; then 4154 rm -rf conftest* 4155 tcl_ok=usable 4156else 4157 rm -rf conftest* 4158 tcl_ok=unusable 4159fi 4160rm -f conftest* 4161 4162 echo "$ac_t""$tcl_ok" 1>&6 4163 if test $tcl_ok = usable; then 4164 cat >> confdefs.h <<\EOF 4165#define USE_SYS_EXEC_AOUT_H 1 4166EOF 4167 4168 else 4169 DL_OBJS="" 4170 fi 4171 fi 4172 fi 4173fi 4174 4175# Step 5: disable dynamic loading if requested via a command-line switch. 4176 4177# Check whether --enable-load or --disable-load was given. 4178if test "${enable_load+set}" = set; then 4179 enableval="$enable_load" 4180 tcl_ok=$enableval 4181else 4182 tcl_ok=yes 4183fi 4184 4185if test "$tcl_ok" = "no"; then 4186 DL_OBJS="" 4187fi 4188 4189if test "x$DL_OBJS" != "x" ; then 4190 BUILD_DLTEST="\$(DLTEST_TARGETS)" 4191else 4192 echo "Can't figure out how to do dynamic loading or shared libraries" 4193 echo "on this system." 4194 SHLIB_CFLAGS="" 4195 SHLIB_LD="" 4196 SHLIB_SUFFIX="" 4197 DL_OBJS="tclLoadNone.o" 4198 DL_LIBS="" 4199 LD_FLAGS="" 4200 LD_SEARCH_FLAGS="" 4201 BUILD_DLTEST="" 4202fi 4203 4204# If we're running gcc, then change the C flags for compiling shared 4205# libraries to the right flags for gcc, instead of those for the 4206# standard manufacturer compiler. 4207 4208if test "$DL_OBJS" != "tclLoadNone.o" ; then 4209 if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then 4210 case $system in 4211 AIX-*) 4212 ;; 4213 BSD/OS*) 4214 ;; 4215 IRIX*) 4216 ;; 4217 NetBSD-*|FreeBSD-*|OpenBSD-*) 4218 ;; 4219 RISCos-*) 4220 ;; 4221 ULTRIX-4.*) 4222 ;; 4223 *) 4224 SHLIB_CFLAGS="-fPIC" 4225 ;; 4226 esac 4227 fi 4228fi 4229 4230#-------------------------------------------------------------------- 4231# The statements below check for systems where POSIX-style 4232# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 4233# On these systems (mostly older ones), use the old BSD-style 4234# FIONBIO approach instead. 4235#-------------------------------------------------------------------- 4236 4237for ac_hdr in sys/ioctl.h 4238do 4239ac_safe=`echo "$ac_hdr" | tr './\055' '___'` 4240echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 4241if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 4242 echo $ac_n "(cached) $ac_c" 1>&6 4243else 4244 cat > conftest.$ac_ext <<EOF 4245#line 4246 "configure" 4246#include "confdefs.h" 4247#include <$ac_hdr> 4248EOF 4249eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 4250ac_err=`grep -v '^ *+' conftest.out` 4251if test -z "$ac_err"; then 4252 rm -rf conftest* 4253 eval "ac_cv_header_$ac_safe=yes" 4254else 4255 echo "$ac_err" >&5 4256 rm -rf conftest* 4257 eval "ac_cv_header_$ac_safe=no" 4258fi 4259rm -f conftest* 4260fi 4261if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 4262 echo "$ac_t""yes" 1>&6 4263 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` 4264 cat >> confdefs.h <<EOF 4265#define $ac_tr_hdr 1 4266EOF 4267 4268else 4269 echo "$ac_t""no" 1>&6 4270fi 4271done 4272 4273for ac_hdr in sys/filio.h 4274do 4275ac_safe=`echo "$ac_hdr" | tr './\055' '___'` 4276echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 4277if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 4278 echo $ac_n "(cached) $ac_c" 1>&6 4279else 4280 cat > conftest.$ac_ext <<EOF 4281#line 4282 "configure" 4282#include "confdefs.h" 4283#include <$ac_hdr> 4284EOF 4285eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 4286ac_err=`grep -v '^ *+' conftest.out` 4287if test -z "$ac_err"; then 4288 rm -rf conftest* 4289 eval "ac_cv_header_$ac_safe=yes" 4290else 4291 echo "$ac_err" >&5 4292 rm -rf conftest* 4293 eval "ac_cv_header_$ac_safe=no" 4294fi 4295rm -f conftest* 4296fi 4297if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 4298 echo "$ac_t""yes" 1>&6 4299 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` 4300 cat >> confdefs.h <<EOF 4301#define $ac_tr_hdr 1 4302EOF 4303 4304else 4305 echo "$ac_t""no" 1>&6 4306fi 4307done 4308 4309echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 4310if test -f /usr/lib/NextStep/software_version; then 4311 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 4312else 4313 system=`uname -s`-`uname -r` 4314 if test "$?" -ne 0 ; then 4315 system=unknown 4316 else 4317 # Special check for weird MP-RAS system (uname returns weird 4318 # results, and the version is kept in special file). 4319 4320 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 4321 system=MP-RAS-`awk '{print $3}' /etc/.relid'` 4322 fi 4323 if test "`uname -s`" = "AIX" ; then 4324 system=AIX-`uname -v`.`uname -r` 4325 fi 4326 fi 4327fi 4328case $system in 4329 AIX-*) 4330 cat >> confdefs.h <<\EOF 4331#define USE_FIONBIO 1 4332EOF 4333 4334 echo "$ac_t""FIONBIO" 1>&6 4335 ;; 4336 OSF*) 4337 cat >> confdefs.h <<\EOF 4338#define USE_FIONBIO 1 4339EOF 4340 4341 echo "$ac_t""FIONBIO" 1>&6 4342 ;; 4343 SunOS-4*) 4344 cat >> confdefs.h <<\EOF 4345#define USE_FIONBIO 1 4346EOF 4347 4348 echo "$ac_t""FIONBIO" 1>&6 4349 ;; 4350 ULTRIX-4.*) 4351 cat >> confdefs.h <<\EOF 4352#define USE_FIONBIO 1 4353EOF 4354 4355 echo "$ac_t""FIONBIO" 1>&6 4356 ;; 4357 *) 4358 echo "$ac_t""O_NONBLOCK" 1>&6 4359 ;; 4360esac 4361 4362#-------------------------------------------------------------------- 4363# The statements below define a collection of symbols related to 4364# building libtcl as a shared library instead of a static library. 4365#-------------------------------------------------------------------- 4366 4367realRanlib=$RANLIB 4368if test "$TCL_SHARED_LIB_SUFFIX" = "" ; then 4369 TCL_SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' 4370fi 4371if test "$TCL_UNSHARED_LIB_SUFFIX" = "" ; then 4372 TCL_UNSHARED_LIB_SUFFIX='${VERSION}.a' 4373fi 4374# Check whether --enable-shared or --disable-shared was given. 4375if test "${enable_shared+set}" = set; then 4376 enableval="$enable_shared" 4377 tcl_ok=$enableval 4378else 4379 tcl_ok=no 4380fi 4381 4382if test "$tcl_ok" = "yes" -a "${SHLIB_SUFFIX}" != "" \ 4383 -a "${DL_OBJS}" != "tclLoadAout.o" ; then 4384 TCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}" 4385 TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" 4386 eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}" 4387 MAKE_LIB="\${SHLIB_LD} -o ${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}" 4388 RANLIB=":" 4389else 4390 if test "$AIX" = "no" ; then 4391 SHLIB_LD_LIBS="" 4392 fi 4393 TCL_SHLIB_CFLAGS="" 4394 TCL_LD_SEARCH_FLAGS="" 4395 eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}" 4396 MAKE_LIB="ar cr ${TCL_LIB_FILE} \${OBJS}" 4397fi 4398 4399# Note: in the following variable, it's important to use the absolute 4400# path name of the Tcl directory rather than "..": this is because 4401# AIX remembers this path and will attempt to use it at run-time to look 4402# up the Tcl library. 4403 4404if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then 4405 TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl${VERSION}" 4406 TCL_LIB_SPEC="-L${exec_prefix}/lib -ltcl${VERSION}" 4407else 4408 TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl`echo ${VERSION} | tr -d .`" 4409 TCL_LIB_SPEC="-L${exec_prefix}/lib -ltcl`echo ${VERSION} | tr -d .`" 4410fi 4411 4412#-------------------------------------------------------------------- 4413# The statements below define the symbol TCL_PACKAGE_PATH, which 4414# gives a list of directories that may contain packages. The list 4415# consists of one directory for machine-dependent binaries and 4416# another for platform-independent scripts. 4417#-------------------------------------------------------------------- 4418 4419if test "$prefix" != "$exec_prefix"; then 4420 TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib" 4421else 4422 TCL_PACKAGE_PATH="${prefix}/lib" 4423fi 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450trap '' 1 2 15 4451cat > confcache <<\EOF 4452# This file is a shell script that caches the results of configure 4453# tests run on this system so they can be shared between configure 4454# scripts and configure runs. It is not useful on other systems. 4455# If it contains results you don't want to keep, you may remove or edit it. 4456# 4457# By default, configure uses ./config.cache as the cache file, 4458# creating it if it does not exist already. You can give configure 4459# the --cache-file=FILE option to use a different cache file; that is 4460# what configure does when it calls configure scripts in 4461# subdirectories, so they share the cache. 4462# Giving --cache-file=/dev/null disables caching, for debugging configure. 4463# config.status only pays attention to the cache file if you give it the 4464# --recheck option to rerun configure. 4465# 4466EOF 4467# Ultrix sh set writes to stderr and can't be redirected directly, 4468# and sets the high bit in the cache file unless we assign to the vars. 4469(set) 2>&1 | 4470 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ 4471 >> confcache 4472if cmp -s $cache_file confcache; then 4473 : 4474else 4475 if test -w $cache_file; then 4476 echo "updating cache $cache_file" 4477 cat confcache > $cache_file 4478 else 4479 echo "not updating unwritable cache $cache_file" 4480 fi 4481fi 4482rm -f confcache 4483 4484trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 4485 4486test "x$prefix" = xNONE && prefix=$ac_default_prefix 4487# Let make expand exec_prefix. 4488test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 4489 4490# Any assignment to VPATH causes Sun make to only execute 4491# the first set of double-colon rules, so remove it if not needed. 4492# If there is a colon in the path, we need to keep it. 4493if test "x$srcdir" = x.; then 4494 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 4495fi 4496 4497trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 4498 4499# Transform confdefs.h into DEFS. 4500# Protect against shell expansion while executing Makefile rules. 4501# Protect against Makefile macro expansion. 4502cat > conftest.defs <<\EOF 4503s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g 4504s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g 4505s%\[%\\&%g 4506s%\]%\\&%g 4507s%\$%$$%g 4508EOF 4509DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` 4510rm -f conftest.defs 4511 4512 4513# Without the "./", some shells look in PATH for config.status. 4514: ${CONFIG_STATUS=./config.status} 4515 4516echo creating $CONFIG_STATUS 4517rm -f $CONFIG_STATUS 4518cat > $CONFIG_STATUS <<EOF 4519#! /bin/sh 4520# Generated automatically by configure. 4521# Run this file to recreate the current configuration. 4522# This directory was configured as follows, 4523# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4524# 4525# $0 $ac_configure_args 4526# 4527# Compiler output produced by configure, useful for debugging 4528# configure, is in ./config.log if it exists. 4529 4530ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 4531for ac_option 4532do 4533 case "\$ac_option" in 4534 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 4535 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 4536 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 4537 -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 4538 echo "$CONFIG_STATUS generated by autoconf version 2.4.2" 4539 exit 0 ;; 4540 -help | --help | --hel | --he | --h) 4541 echo "\$ac_cs_usage"; exit 0 ;; 4542 *) echo "\$ac_cs_usage"; exit 1 ;; 4543 esac 4544done 4545 4546ac_given_srcdir=$srcdir 4547 4548trap 'rm -fr `echo "Makefile tclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 4549 4550# Protect against being on the right side of a sed subst in config.status. 4551sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 4552 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF 4553$ac_vpsub 4554$extrasub 4555s%@CFLAGS@%$CFLAGS%g 4556s%@CPPFLAGS@%$CPPFLAGS%g 4557s%@CXXFLAGS@%$CXXFLAGS%g 4558s%@DEFS@%$DEFS%g 4559s%@LDFLAGS@%$LDFLAGS%g 4560s%@LIBS@%$LIBS%g 4561s%@exec_prefix@%$exec_prefix%g 4562s%@prefix@%$prefix%g 4563s%@program_transform_name@%$program_transform_name%g 4564s%@bindir@%$bindir%g 4565s%@sbindir@%$sbindir%g 4566s%@libexecdir@%$libexecdir%g 4567s%@datadir@%$datadir%g 4568s%@sysconfdir@%$sysconfdir%g 4569s%@sharedstatedir@%$sharedstatedir%g 4570s%@localstatedir@%$localstatedir%g 4571s%@libdir@%$libdir%g 4572s%@includedir@%$includedir%g 4573s%@oldincludedir@%$oldincludedir%g 4574s%@infodir@%$infodir%g 4575s%@mandir@%$mandir%g 4576s%@RANLIB@%$RANLIB%g 4577s%@CC@%$CC%g 4578s%@LIBOBJS@%$LIBOBJS%g 4579s%@CPP@%$CPP%g 4580s%@BUILD_DLTEST@%$BUILD_DLTEST%g 4581s%@DL_LIBS@%$DL_LIBS%g 4582s%@DL_OBJS@%$DL_OBJS%g 4583s%@LD_FLAGS@%$LD_FLAGS%g 4584s%@MAKE_LIB@%$MAKE_LIB%g 4585s%@MATH_LIBS@%$MATH_LIBS%g 4586s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g 4587s%@SHLIB_LD@%$SHLIB_LD%g 4588s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g 4589s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g 4590s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g 4591s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g 4592s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g 4593s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g 4594s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g 4595s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g 4596s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g 4597s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g 4598s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g 4599s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g 4600s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g 4601s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g 4602s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g 4603s%@TCL_VERSION@%$TCL_VERSION%g 4604 4605CEOF 4606EOF 4607cat >> $CONFIG_STATUS <<EOF 4608 4609CONFIG_FILES=\${CONFIG_FILES-"Makefile tclConfig.sh"} 4610EOF 4611cat >> $CONFIG_STATUS <<\EOF 4612for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 4613 # Support "outfile[:infile]", defaulting infile="outfile.in". 4614 case "$ac_file" in 4615 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` 4616 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 4617 *) ac_file_in="${ac_file}.in" ;; 4618 esac 4619 4620 # Adjust relative srcdir, etc. for subdirectories. 4621 4622 # Remove last slash and all that follows it. Not all systems have dirname. 4623 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 4624 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 4625 # The file is in a subdirectory. 4626 test ! -d "$ac_dir" && mkdir "$ac_dir" 4627 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 4628 # A "../" for each directory in $ac_dir_suffix. 4629 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 4630 else 4631 ac_dir_suffix= ac_dots= 4632 fi 4633 4634 case "$ac_given_srcdir" in 4635 .) srcdir=. 4636 if test -z "$ac_dots"; then top_srcdir=. 4637 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 4638 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 4639 *) # Relative path. 4640 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 4641 top_srcdir="$ac_dots$ac_given_srcdir" ;; 4642 esac 4643 4644 echo creating "$ac_file" 4645 rm -f "$ac_file" 4646 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 4647 case "$ac_file" in 4648 *Makefile*) ac_comsub="1i\\ 4649# $configure_input" ;; 4650 *) ac_comsub= ;; 4651 esac 4652 sed -e "$ac_comsub 4653s%@configure_input@%$configure_input%g 4654s%@srcdir@%$srcdir%g 4655s%@top_srcdir@%$top_srcdir%g 4656" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file 4657fi; done 4658rm -f conftest.subs 4659 4660 4661 4662exit 0 4663EOF 4664chmod +x $CONFIG_STATUS 4665rm -fr confdefs* $ac_clean_files 4666test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 4667 4668