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