| 1 | #! /bin/sh |
| 2 | |
| 3 | # Guess values for system-dependent variables and create Makefiles. |
| 4 | # Generated automatically using autoconf version 2.13 |
| 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
| 6 | # |
| 7 | # This configure script is free software; the Free Software Foundation |
| 8 | # gives unlimited permission to copy, distribute and modify it. |
| 9 | |
| 10 | # Defaults: |
| 11 | ac_help= |
| 12 | ac_default_prefix=/usr/local |
| 13 | # Any additions from configure.in: |
| 14 | ac_help="$ac_help |
| 15 | --enable-man-symlinks use symlinks for the manpages" |
| 16 | ac_help="$ac_help |
| 17 | --enable-man-compression=PROG |
| 18 | compress the manpages with PROG" |
| 19 | ac_help="$ac_help |
| 20 | --enable-threads build with threads" |
| 21 | ac_help="$ac_help |
| 22 | --enable-langinfo use nl_langinfo if possible to determine |
| 23 | encoding at startup, otherwise use old heuristic" |
| 24 | ac_help="$ac_help |
| 25 | --enable-shared build and link with shared libraries [--enable-shared]" |
| 26 | ac_help="$ac_help |
| 27 | --enable-64bit enable 64bit support (where applicable)" |
| 28 | ac_help="$ac_help |
| 29 | --enable-64bit-vis enable 64bit Sparc VIS support" |
| 30 | ac_help="$ac_help |
| 31 | --disable-load disallow dynamic loading and "load" command" |
| 32 | ac_help="$ac_help |
| 33 | --enable-symbols build with debugging symbols [--disable-symbols]" |
| 34 | ac_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. |
| 40 | build=NONE |
| 41 | cache_file=./config.cache |
| 42 | exec_prefix=NONE |
| 43 | host=NONE |
| 44 | no_create= |
| 45 | nonopt=NONE |
| 46 | no_recursion= |
| 47 | prefix=NONE |
| 48 | program_prefix=NONE |
| 49 | program_suffix=NONE |
| 50 | program_transform_name=s,x,x, |
| 51 | silent= |
| 52 | site= |
| 53 | srcdir= |
| 54 | target=NONE |
| 55 | verbose= |
| 56 | x_includes=NONE |
| 57 | x_libraries=NONE |
| 58 | bindir='${exec_prefix}/bin' |
| 59 | sbindir='${exec_prefix}/sbin' |
| 60 | libexecdir='${exec_prefix}/libexec' |
| 61 | datadir='${prefix}/share' |
| 62 | sysconfdir='${prefix}/etc' |
| 63 | sharedstatedir='${prefix}/com' |
| 64 | localstatedir='${prefix}/var' |
| 65 | libdir='${exec_prefix}/lib' |
| 66 | includedir='${prefix}/include' |
| 67 | oldincludedir='/usr/include' |
| 68 | infodir='${prefix}/info' |
| 69 | mandir='${prefix}/man' |
| 70 | |
| 71 | # Initialize some other variables. |
| 72 | subdirs= |
| 73 | MFLAGS= MAKEFLAGS= |
| 74 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 75 | # Maximum number of lines to put in a shell here document. |
| 76 | ac_max_here_lines=12 |
| 77 | |
| 78 | ac_prev= |
| 79 | for ac_option |
| 80 | do |
| 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 |
| 160 | Usage: configure [options] [host] |
| 161 | Options: [defaults in brackets after descriptions] |
| 162 | Configuration: |
| 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 |
| 168 | Directory 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 |
| 192 | EOF |
| 193 | cat << EOF |
| 194 | Host 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] |
| 198 | Features 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 |
| 205 | EOF |
| 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 |
| 415 | done |
| 416 | |
| 417 | if test -n "$ac_prev"; then |
| 418 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
| 419 | fi |
| 420 | |
| 421 | trap '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 |
| 431 | if test "$silent" = yes; then |
| 432 | exec 6>/dev/null |
| 433 | else |
| 434 | exec 6>&1 |
| 435 | fi |
| 436 | exec 5>./config.log |
| 437 | |
| 438 | echo "\ |
| 439 | This file contains any messages produced by compilers while |
| 440 | running 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. |
| 445 | ac_configure_args= |
| 446 | for ac_arg |
| 447 | do |
| 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 |
| 457 | done |
| 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. |
| 464 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
| 465 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 466 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 467 | if 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. |
| 470 | rm -rf conftest* confdefs.h |
| 471 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 472 | echo > 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. |
| 476 | ac_unique_file=../generic/tcl.h |
| 477 | |
| 478 | # Find the source files, if location was not specified. |
| 479 | if 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 |
| 489 | else |
| 490 | ac_srcdir_defaulted=no |
| 491 | fi |
| 492 | if 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 |
| 498 | fi |
| 499 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 500 | |
| 501 | # Prefer explicitly selected file to automatically selected ones. |
| 502 | if 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 |
| 508 | fi |
| 509 | for 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 |
| 514 | done |
| 515 | |
| 516 | if test -r "$cache_file"; then |
| 517 | echo "loading cache $cache_file" |
| 518 | . $cache_file |
| 519 | else |
| 520 | echo "creating cache $cache_file" |
| 521 | > $cache_file |
| 522 | fi |
| 523 | |
| 524 | ac_ext=c |
| 525 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 526 | ac_cpp='$CPP $CPPFLAGS' |
| 527 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 528 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 529 | cross_compiling=$ac_cv_prog_cc_cross |
| 530 | |
| 531 | ac_exeext= |
| 532 | ac_objext=o |
| 533 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 534 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. |
| 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 |
| 541 | else |
| 542 | ac_n= ac_c='\c' ac_t= |
| 543 | fi |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | TCL_VERSION=8.4 |
| 549 | TCL_MAJOR_VERSION=8 |
| 550 | TCL_MINOR_VERSION=4 |
| 551 | TCL_PATCH_LEVEL=".5" |
| 552 | VERSION=${TCL_VERSION} |
| 553 | |
| 554 | #------------------------------------------------------------------------ |
| 555 | # Handle the --prefix=... option |
| 556 | #------------------------------------------------------------------------ |
| 557 | |
| 558 | if test "${prefix}" = "NONE"; then |
| 559 | prefix=/usr/local |
| 560 | fi |
| 561 | if test "${exec_prefix}" = "NONE"; then |
| 562 | exec_prefix=$prefix |
| 563 | fi |
| 564 | # libdir must be a fully qualified path and (not ${exec_prefix}/lib) |
| 565 | eval libdir="$libdir" |
| 566 | TCL_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 |
| 574 | echo "configure:575: checking whether to use symlinks for manpages" >&5 |
| 575 | # Check whether --enable-man-symlinks or --disable-man-symlinks was given. |
| 576 | if test "${enable_man_symlinks+set}" = set; then |
| 577 | enableval="$enable_man_symlinks" |
| 578 | test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --symlinks" |
| 579 | else |
| 580 | enableval="no" |
| 581 | fi |
| 582 | |
| 583 | echo "$ac_t""$enableval" 1>&6 |
| 584 | |
| 585 | echo $ac_n "checking compression for manpages""... $ac_c" 1>&6 |
| 586 | echo "configure:587: checking compression for manpages" >&5 |
| 587 | # Check whether --enable-man-compression or --disable-man-compression was given. |
| 588 | if 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" |
| 592 | else |
| 593 | enableval="no" |
| 594 | fi |
| 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". |
| 607 | if test "${CFLAGS+set}" != "set" ; then |
| 608 | CFLAGS="" |
| 609 | fi |
| 610 | |
| 611 | # Extract the first word of "gcc", so it can be a program name with args. |
| 612 | set dummy gcc; ac_word=$2 |
| 613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 614 | echo "configure:615: checking for $ac_word" >&5 |
| 615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 616 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 617 | else |
| 618 | if test -n "$CC"; then |
| 619 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 620 | else |
| 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" |
| 631 | fi |
| 632 | fi |
| 633 | CC="$ac_cv_prog_CC" |
| 634 | if test -n "$CC"; then |
| 635 | echo "$ac_t""$CC" 1>&6 |
| 636 | else |
| 637 | echo "$ac_t""no" 1>&6 |
| 638 | fi |
| 639 | |
| 640 | if test -z "$CC"; then |
| 641 | # Extract the first word of "cc", so it can be a program name with args. |
| 642 | set dummy cc; ac_word=$2 |
| 643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 644 | echo "configure:645: checking for $ac_word" >&5 |
| 645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 646 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 647 | else |
| 648 | if test -n "$CC"; then |
| 649 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 650 | else |
| 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" |
| 666 | if 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 |
| 679 | fi |
| 680 | fi |
| 681 | fi |
| 682 | CC="$ac_cv_prog_CC" |
| 683 | if test -n "$CC"; then |
| 684 | echo "$ac_t""$CC" 1>&6 |
| 685 | else |
| 686 | echo "$ac_t""no" 1>&6 |
| 687 | fi |
| 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. |
| 693 | set dummy cl; ac_word=$2 |
| 694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 695 | echo "configure:696: checking for $ac_word" >&5 |
| 696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 697 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 698 | else |
| 699 | if test -n "$CC"; then |
| 700 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 701 | else |
| 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" |
| 712 | fi |
| 713 | fi |
| 714 | CC="$ac_cv_prog_CC" |
| 715 | if test -n "$CC"; then |
| 716 | echo "$ac_t""$CC" 1>&6 |
| 717 | else |
| 718 | echo "$ac_t""no" 1>&6 |
| 719 | fi |
| 720 | ;; |
| 721 | esac |
| 722 | fi |
| 723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 724 | fi |
| 725 | |
| 726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
| 728 | |
| 729 | ac_ext=c |
| 730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 731 | ac_cpp='$CPP $CPPFLAGS' |
| 732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 734 | cross_compiling=$ac_cv_prog_cc_cross |
| 735 | |
| 736 | cat > conftest.$ac_ext << EOF |
| 737 | |
| 738 | #line 739 "configure" |
| 739 | #include "confdefs.h" |
| 740 | |
| 741 | main(){return(0);} |
| 742 | EOF |
| 743 | if { (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 |
| 751 | else |
| 752 | echo "configure: failed program was:" >&5 |
| 753 | cat conftest.$ac_ext >&5 |
| 754 | ac_cv_prog_cc_works=no |
| 755 | fi |
| 756 | rm -fr conftest* |
| 757 | ac_ext=c |
| 758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 759 | ac_cpp='$CPP $CPPFLAGS' |
| 760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 762 | cross_compiling=$ac_cv_prog_cc_cross |
| 763 | |
| 764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 765 | if 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; } |
| 767 | fi |
| 768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| 770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 771 | cross_compiling=$ac_cv_prog_cc_cross |
| 772 | |
| 773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
| 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
| 775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| 776 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 777 | else |
| 778 | cat > conftest.c <<EOF |
| 779 | #ifdef __GNUC__ |
| 780 | yes; |
| 781 | #endif |
| 782 | EOF |
| 783 | if { 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 |
| 785 | else |
| 786 | ac_cv_prog_gcc=no |
| 787 | fi |
| 788 | fi |
| 789 | |
| 790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| 791 | |
| 792 | if test $ac_cv_prog_gcc = yes; then |
| 793 | GCC=yes |
| 794 | else |
| 795 | GCC= |
| 796 | fi |
| 797 | |
| 798 | ac_test_CFLAGS="${CFLAGS+set}" |
| 799 | ac_save_CFLAGS="$CFLAGS" |
| 800 | CFLAGS= |
| 801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
| 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
| 803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| 804 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 805 | else |
| 806 | echo 'void f(){}' > conftest.c |
| 807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
| 808 | ac_cv_prog_cc_g=yes |
| 809 | else |
| 810 | ac_cv_prog_cc_g=no |
| 811 | fi |
| 812 | rm -f conftest* |
| 813 | |
| 814 | fi |
| 815 | |
| 816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
| 817 | if test "$ac_test_CFLAGS" = set; then |
| 818 | CFLAGS="$ac_save_CFLAGS" |
| 819 | elif 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 |
| 825 | else |
| 826 | if test "$GCC" = yes; then |
| 827 | CFLAGS="-O2" |
| 828 | else |
| 829 | CFLAGS= |
| 830 | fi |
| 831 | fi |
| 832 | |
| 833 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
| 834 | echo "configure:835: checking how to run the C preprocessor" >&5 |
| 835 | # On Suns, sometimes $CPP names a directory. |
| 836 | if test -n "$CPP" && test -d "$CPP"; then |
| 837 | CPP= |
| 838 | fi |
| 839 | if test -z "$CPP"; then |
| 840 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 841 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 842 | else |
| 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> |
| 852 | Syntax Error |
| 853 | EOF |
| 854 | ac_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; } |
| 856 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 857 | if test -z "$ac_err"; then |
| 858 | : |
| 859 | else |
| 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> |
| 869 | Syntax Error |
| 870 | EOF |
| 871 | ac_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; } |
| 873 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 874 | if test -z "$ac_err"; then |
| 875 | : |
| 876 | else |
| 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> |
| 886 | Syntax Error |
| 887 | EOF |
| 888 | ac_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; } |
| 890 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 891 | if test -z "$ac_err"; then |
| 892 | : |
| 893 | else |
| 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 |
| 899 | fi |
| 900 | rm -f conftest* |
| 901 | fi |
| 902 | rm -f conftest* |
| 903 | fi |
| 904 | rm -f conftest* |
| 905 | ac_cv_prog_CPP="$CPP" |
| 906 | fi |
| 907 | CPP="$ac_cv_prog_CPP" |
| 908 | else |
| 909 | ac_cv_prog_CPP="$CPP" |
| 910 | fi |
| 911 | echo "$ac_t""$CPP" 1>&6 |
| 912 | |
| 913 | for ac_hdr in unistd.h limits.h |
| 914 | do |
| 915 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 916 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 917 | echo "configure:918: checking for $ac_hdr" >&5 |
| 918 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 919 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 920 | else |
| 921 | cat > conftest.$ac_ext <<EOF |
| 922 | #line 923 "configure" |
| 923 | #include "confdefs.h" |
| 924 | #include <$ac_hdr> |
| 925 | EOF |
| 926 | ac_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; } |
| 928 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 929 | if test -z "$ac_err"; then |
| 930 | rm -rf conftest* |
| 931 | eval "ac_cv_header_$ac_safe=yes" |
| 932 | else |
| 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" |
| 938 | fi |
| 939 | rm -f conftest* |
| 940 | fi |
| 941 | if 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 |
| 946 | EOF |
| 947 | |
| 948 | else |
| 949 | echo "$ac_t""no" 1>&6 |
| 950 | fi |
| 951 | done |
| 952 | |
| 953 | |
| 954 | #------------------------------------------------------------------------ |
| 955 | # Threads support |
| 956 | #------------------------------------------------------------------------ |
| 957 | |
| 958 | |
| 959 | echo $ac_n "checking for building with threads""... $ac_c" 1>&6 |
| 960 | echo "configure:961: checking for building with threads" >&5 |
| 961 | # Check whether --enable-threads or --disable-threads was given. |
| 962 | if test "${enable_threads+set}" = set; then |
| 963 | enableval="$enable_threads" |
| 964 | tcl_ok=$enableval |
| 965 | else |
| 966 | tcl_ok=no |
| 967 | fi |
| 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 |
| 975 | EOF |
| 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 |
| 981 | EOF |
| 982 | |
| 983 | cat >> confdefs.h <<\EOF |
| 984 | #define _REENTRANT 1 |
| 985 | EOF |
| 986 | |
| 987 | cat >> confdefs.h <<\EOF |
| 988 | #define _THREAD_SAFE 1 |
| 989 | EOF |
| 990 | |
| 991 | echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 |
| 992 | echo "configure:993: checking for pthread_mutex_init in -lpthread" >&5 |
| 993 | ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` |
| 994 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 995 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 996 | else |
| 997 | ac_save_LIBS="$LIBS" |
| 998 | LIBS="-lpthread $LIBS" |
| 999 | cat > 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. */ |
| 1005 | char pthread_mutex_init(); |
| 1006 | |
| 1007 | int main() { |
| 1008 | pthread_mutex_init() |
| 1009 | ; return 0; } |
| 1010 | EOF |
| 1011 | if { (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" |
| 1014 | else |
| 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" |
| 1019 | fi |
| 1020 | rm -f conftest* |
| 1021 | LIBS="$ac_save_LIBS" |
| 1022 | |
| 1023 | fi |
| 1024 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 1025 | echo "$ac_t""yes" 1>&6 |
| 1026 | tcl_ok=yes |
| 1027 | else |
| 1028 | echo "$ac_t""no" 1>&6 |
| 1029 | tcl_ok=no |
| 1030 | fi |
| 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 |
| 1039 | echo "configure:1040: checking for __pthread_mutex_init in -lpthread" >&5 |
| 1040 | ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` |
| 1041 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 1042 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1043 | else |
| 1044 | ac_save_LIBS="$LIBS" |
| 1045 | LIBS="-lpthread $LIBS" |
| 1046 | cat > 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. */ |
| 1052 | char __pthread_mutex_init(); |
| 1053 | |
| 1054 | int main() { |
| 1055 | __pthread_mutex_init() |
| 1056 | ; return 0; } |
| 1057 | EOF |
| 1058 | if { (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" |
| 1061 | else |
| 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" |
| 1066 | fi |
| 1067 | rm -f conftest* |
| 1068 | LIBS="$ac_save_LIBS" |
| 1069 | |
| 1070 | fi |
| 1071 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 1072 | echo "$ac_t""yes" 1>&6 |
| 1073 | tcl_ok=yes |
| 1074 | else |
| 1075 | echo "$ac_t""no" 1>&6 |
| 1076 | tcl_ok=no |
| 1077 | fi |
| 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 |
| 1086 | echo "configure:1087: checking for pthread_mutex_init in -lpthreads" >&5 |
| 1087 | ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` |
| 1088 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 1089 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1090 | else |
| 1091 | ac_save_LIBS="$LIBS" |
| 1092 | LIBS="-lpthreads $LIBS" |
| 1093 | cat > 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. */ |
| 1099 | char pthread_mutex_init(); |
| 1100 | |
| 1101 | int main() { |
| 1102 | pthread_mutex_init() |
| 1103 | ; return 0; } |
| 1104 | EOF |
| 1105 | if { (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" |
| 1108 | else |
| 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" |
| 1113 | fi |
| 1114 | rm -f conftest* |
| 1115 | LIBS="$ac_save_LIBS" |
| 1116 | |
| 1117 | fi |
| 1118 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 1119 | echo "$ac_t""yes" 1>&6 |
| 1120 | tcl_ok=yes |
| 1121 | else |
| 1122 | echo "$ac_t""no" 1>&6 |
| 1123 | tcl_ok=no |
| 1124 | fi |
| 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 |
| 1131 | echo "configure:1132: checking for pthread_mutex_init in -lc" >&5 |
| 1132 | ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` |
| 1133 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 1134 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1135 | else |
| 1136 | ac_save_LIBS="$LIBS" |
| 1137 | LIBS="-lc $LIBS" |
| 1138 | cat > 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. */ |
| 1144 | char pthread_mutex_init(); |
| 1145 | |
| 1146 | int main() { |
| 1147 | pthread_mutex_init() |
| 1148 | ; return 0; } |
| 1149 | EOF |
| 1150 | if { (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" |
| 1153 | else |
| 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" |
| 1158 | fi |
| 1159 | rm -f conftest* |
| 1160 | LIBS="$ac_save_LIBS" |
| 1161 | |
| 1162 | fi |
| 1163 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 1164 | echo "$ac_t""yes" 1>&6 |
| 1165 | tcl_ok=yes |
| 1166 | else |
| 1167 | echo "$ac_t""no" 1>&6 |
| 1168 | tcl_ok=no |
| 1169 | fi |
| 1170 | |
| 1171 | if test "$tcl_ok" = "no"; then |
| 1172 | echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 |
| 1173 | echo "configure:1174: checking for pthread_mutex_init in -lc_r" >&5 |
| 1174 | ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` |
| 1175 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 1176 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1177 | else |
| 1178 | ac_save_LIBS="$LIBS" |
| 1179 | LIBS="-lc_r $LIBS" |
| 1180 | cat > 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. */ |
| 1186 | char pthread_mutex_init(); |
| 1187 | |
| 1188 | int main() { |
| 1189 | pthread_mutex_init() |
| 1190 | ; return 0; } |
| 1191 | EOF |
| 1192 | if { (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" |
| 1195 | else |
| 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" |
| 1200 | fi |
| 1201 | rm -f conftest* |
| 1202 | LIBS="$ac_save_LIBS" |
| 1203 | |
| 1204 | fi |
| 1205 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 1206 | echo "$ac_t""yes" 1>&6 |
| 1207 | tcl_ok=yes |
| 1208 | else |
| 1209 | echo "$ac_t""no" 1>&6 |
| 1210 | tcl_ok=no |
| 1211 | fi |
| 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 |
| 1230 | do |
| 1231 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 1232 | echo "configure:1233: checking for $ac_func" >&5 |
| 1233 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 1234 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1235 | else |
| 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. */ |
| 1245 | char $ac_func(); |
| 1246 | |
| 1247 | int 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) |
| 1253 | choke me |
| 1254 | #else |
| 1255 | $ac_func(); |
| 1256 | #endif |
| 1257 | |
| 1258 | ; return 0; } |
| 1259 | EOF |
| 1260 | if { (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" |
| 1263 | else |
| 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" |
| 1268 | fi |
| 1269 | rm -f conftest* |
| 1270 | fi |
| 1271 | |
| 1272 | if 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 |
| 1277 | EOF |
| 1278 | |
| 1279 | else |
| 1280 | echo "$ac_t""no" 1>&6 |
| 1281 | fi |
| 1282 | done |
| 1283 | |
| 1284 | LIBS=$ac_saved_libs |
| 1285 | for ac_func in readdir_r |
| 1286 | do |
| 1287 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 1288 | echo "configure:1289: checking for $ac_func" >&5 |
| 1289 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 1290 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1291 | else |
| 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. */ |
| 1301 | char $ac_func(); |
| 1302 | |
| 1303 | int 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) |
| 1309 | choke me |
| 1310 | #else |
| 1311 | $ac_func(); |
| 1312 | #endif |
| 1313 | |
| 1314 | ; return 0; } |
| 1315 | EOF |
| 1316 | if { (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" |
| 1319 | else |
| 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" |
| 1324 | fi |
| 1325 | rm -f conftest* |
| 1326 | fi |
| 1327 | |
| 1328 | if 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 |
| 1333 | EOF |
| 1334 | |
| 1335 | else |
| 1336 | echo "$ac_t""no" 1>&6 |
| 1337 | fi |
| 1338 | done |
| 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 | |
| 1352 | if test -z "$no_pipe"; then |
| 1353 | if test -n "$GCC"; then |
| 1354 | echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 |
| 1355 | echo "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 | |
| 1362 | int main() { |
| 1363 | |
| 1364 | ; return 0; } |
| 1365 | EOF |
| 1366 | if { (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 |
| 1369 | else |
| 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 |
| 1375 | fi |
| 1376 | rm -f conftest* |
| 1377 | fi |
| 1378 | fi |
| 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 |
| 1386 | echo "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 |
| 1391 | else |
| 1392 | cat > conftest.$ac_ext <<EOF |
| 1393 | #line 1394 "configure" |
| 1394 | #include "confdefs.h" |
| 1395 | #include <stdlib.h> |
| 1396 | int main() { |
| 1397 | char *p = (char *)strtoll; char *q = (char *)strtoull; |
| 1398 | ; return 0; } |
| 1399 | EOF |
| 1400 | if { (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 |
| 1403 | else |
| 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> |
| 1412 | int main() { |
| 1413 | char *p = (char *)strtoll; char *q = (char *)strtoull; |
| 1414 | ; return 0; } |
| 1415 | EOF |
| 1416 | if { (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 |
| 1419 | else |
| 1420 | echo "configure: failed program was:" >&5 |
| 1421 | cat conftest.$ac_ext >&5 |
| 1422 | rm -rf conftest* |
| 1423 | tcl_cv_flag__isoc99_source=no |
| 1424 | fi |
| 1425 | rm -f conftest* |
| 1426 | fi |
| 1427 | rm -f conftest* |
| 1428 | fi |
| 1429 | |
| 1430 | if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then |
| 1431 | cat >> confdefs.h <<\EOF |
| 1432 | #define _ISOC99_SOURCE 1 |
| 1433 | EOF |
| 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 |
| 1440 | else |
| 1441 | cat > conftest.$ac_ext <<EOF |
| 1442 | #line 1443 "configure" |
| 1443 | #include "confdefs.h" |
| 1444 | #include <sys/stat.h> |
| 1445 | int main() { |
| 1446 | struct stat64 buf; int i = stat64("/", &buf); |
| 1447 | ; return 0; } |
| 1448 | EOF |
| 1449 | if { (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 |
| 1452 | else |
| 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> |
| 1461 | int main() { |
| 1462 | struct stat64 buf; int i = stat64("/", &buf); |
| 1463 | ; return 0; } |
| 1464 | EOF |
| 1465 | if { (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 |
| 1468 | else |
| 1469 | echo "configure: failed program was:" >&5 |
| 1470 | cat conftest.$ac_ext >&5 |
| 1471 | rm -rf conftest* |
| 1472 | tcl_cv_flag__largefile64_source=no |
| 1473 | fi |
| 1474 | rm -f conftest* |
| 1475 | fi |
| 1476 | rm -f conftest* |
| 1477 | fi |
| 1478 | |
| 1479 | if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then |
| 1480 | cat >> confdefs.h <<\EOF |
| 1481 | #define _LARGEFILE64_SOURCE 1 |
| 1482 | EOF |
| 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 |
| 1494 | echo "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 |
| 1497 | else |
| 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 | |
| 1505 | int main() { |
| 1506 | __int64 value = (__int64) 0; |
| 1507 | ; return 0; } |
| 1508 | EOF |
| 1509 | if { (eval echo configure:1510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1510 | rm -rf conftest* |
| 1511 | tcl_type_64bit=__int64 |
| 1512 | else |
| 1513 | echo "configure: failed program was:" >&5 |
| 1514 | cat conftest.$ac_ext >&5 |
| 1515 | rm -rf conftest* |
| 1516 | tcl_type_64bit="long long" |
| 1517 | fi |
| 1518 | rm -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 | : |
| 1524 | else |
| 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 | |
| 1531 | EOF |
| 1532 | if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1533 | then |
| 1534 | tcl_cv_type_64bit=${tcl_type_64bit} |
| 1535 | else |
| 1536 | echo "configure: failed program was:" >&5 |
| 1537 | cat conftest.$ac_ext >&5 |
| 1538 | rm -fr conftest* |
| 1539 | : |
| 1540 | fi |
| 1541 | rm -fr conftest* |
| 1542 | fi |
| 1543 | |
| 1544 | fi |
| 1545 | |
| 1546 | if test "${tcl_cv_type_64bit}" = none ; then |
| 1547 | cat >> confdefs.h <<\EOF |
| 1548 | #define TCL_WIDE_INT_IS_LONG 1 |
| 1549 | EOF |
| 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} |
| 1555 | EOF |
| 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 |
| 1561 | echo "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 |
| 1564 | else |
| 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> |
| 1571 | int main() { |
| 1572 | struct dirent64 p; |
| 1573 | ; return 0; } |
| 1574 | EOF |
| 1575 | if { (eval echo configure:1576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1576 | rm -rf conftest* |
| 1577 | tcl_cv_struct_dirent64=yes |
| 1578 | else |
| 1579 | echo "configure: failed program was:" >&5 |
| 1580 | cat conftest.$ac_ext >&5 |
| 1581 | rm -rf conftest* |
| 1582 | tcl_cv_struct_dirent64=no |
| 1583 | fi |
| 1584 | rm -f conftest* |
| 1585 | fi |
| 1586 | |
| 1587 | if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then |
| 1588 | cat >> confdefs.h <<\EOF |
| 1589 | #define HAVE_STRUCT_DIRENT64 1 |
| 1590 | EOF |
| 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 |
| 1596 | echo "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 |
| 1599 | else |
| 1600 | |
| 1601 | cat > conftest.$ac_ext <<EOF |
| 1602 | #line 1603 "configure" |
| 1603 | #include "confdefs.h" |
| 1604 | #include <sys/stat.h> |
| 1605 | int main() { |
| 1606 | struct stat64 p; |
| 1607 | |
| 1608 | ; return 0; } |
| 1609 | EOF |
| 1610 | if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1611 | rm -rf conftest* |
| 1612 | tcl_cv_struct_stat64=yes |
| 1613 | else |
| 1614 | echo "configure: failed program was:" >&5 |
| 1615 | cat conftest.$ac_ext >&5 |
| 1616 | rm -rf conftest* |
| 1617 | tcl_cv_struct_stat64=no |
| 1618 | fi |
| 1619 | rm -f conftest* |
| 1620 | fi |
| 1621 | |
| 1622 | if test "x${tcl_cv_struct_stat64}" = "xyes" ; then |
| 1623 | cat >> confdefs.h <<\EOF |
| 1624 | #define HAVE_STRUCT_STAT64 1 |
| 1625 | EOF |
| 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 |
| 1631 | echo "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 |
| 1634 | else |
| 1635 | |
| 1636 | cat > conftest.$ac_ext <<EOF |
| 1637 | #line 1638 "configure" |
| 1638 | #include "confdefs.h" |
| 1639 | #include <sys/types.h> |
| 1640 | int main() { |
| 1641 | off64_t offset; |
| 1642 | |
| 1643 | ; return 0; } |
| 1644 | EOF |
| 1645 | if { (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 |
| 1648 | else |
| 1649 | echo "configure: failed program was:" >&5 |
| 1650 | cat conftest.$ac_ext >&5 |
| 1651 | rm -rf conftest* |
| 1652 | tcl_cv_type_off64_t=no |
| 1653 | fi |
| 1654 | rm -f conftest* |
| 1655 | fi |
| 1656 | |
| 1657 | if test "x${tcl_cv_type_off64_t}" = "xyes" ; then |
| 1658 | cat >> confdefs.h <<\EOF |
| 1659 | #define HAVE_TYPE_OFF64_T 1 |
| 1660 | EOF |
| 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 | |
| 1671 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
| 1672 | echo "configure:1673: checking whether byte ordering is bigendian" >&5 |
| 1673 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 1674 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1675 | else |
| 1676 | ac_cv_c_bigendian=unknown |
| 1677 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 1678 | cat > conftest.$ac_ext <<EOF |
| 1679 | #line 1680 "configure" |
| 1680 | #include "confdefs.h" |
| 1681 | #include <sys/types.h> |
| 1682 | #include <sys/param.h> |
| 1683 | int main() { |
| 1684 | |
| 1685 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 1686 | bogus endian macros |
| 1687 | #endif |
| 1688 | ; return 0; } |
| 1689 | EOF |
| 1690 | if { (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. |
| 1693 | cat > conftest.$ac_ext <<EOF |
| 1694 | #line 1695 "configure" |
| 1695 | #include "confdefs.h" |
| 1696 | #include <sys/types.h> |
| 1697 | #include <sys/param.h> |
| 1698 | int main() { |
| 1699 | |
| 1700 | #if BYTE_ORDER != BIG_ENDIAN |
| 1701 | not big endian |
| 1702 | #endif |
| 1703 | ; return 0; } |
| 1704 | EOF |
| 1705 | if { (eval echo configure:1706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1706 | rm -rf conftest* |
| 1707 | ac_cv_c_bigendian=yes |
| 1708 | else |
| 1709 | echo "configure: failed program was:" >&5 |
| 1710 | cat conftest.$ac_ext >&5 |
| 1711 | rm -rf conftest* |
| 1712 | ac_cv_c_bigendian=no |
| 1713 | fi |
| 1714 | rm -f conftest* |
| 1715 | else |
| 1716 | echo "configure: failed program was:" >&5 |
| 1717 | cat conftest.$ac_ext >&5 |
| 1718 | fi |
| 1719 | rm -f conftest* |
| 1720 | if test $ac_cv_c_bigendian = unknown; then |
| 1721 | if test "$cross_compiling" = yes; then |
| 1722 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1723 | else |
| 1724 | cat > conftest.$ac_ext <<EOF |
| 1725 | #line 1726 "configure" |
| 1726 | #include "confdefs.h" |
| 1727 | main () { |
| 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 | } |
| 1737 | EOF |
| 1738 | if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1739 | then |
| 1740 | ac_cv_c_bigendian=no |
| 1741 | else |
| 1742 | echo "configure: failed program was:" >&5 |
| 1743 | cat conftest.$ac_ext >&5 |
| 1744 | rm -fr conftest* |
| 1745 | ac_cv_c_bigendian=yes |
| 1746 | fi |
| 1747 | rm -fr conftest* |
| 1748 | fi |
| 1749 | |
| 1750 | fi |
| 1751 | fi |
| 1752 | |
| 1753 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 1754 | if test $ac_cv_c_bigendian = yes; then |
| 1755 | cat >> confdefs.h <<\EOF |
| 1756 | #define WORDS_BIGENDIAN 1 |
| 1757 | EOF |
| 1758 | |
| 1759 | fi |
| 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. |
| 1768 | for ac_func in getcwd |
| 1769 | do |
| 1770 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 1771 | echo "configure:1772: checking for $ac_func" >&5 |
| 1772 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 1773 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1774 | else |
| 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. */ |
| 1784 | char $ac_func(); |
| 1785 | |
| 1786 | int 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) |
| 1792 | choke me |
| 1793 | #else |
| 1794 | $ac_func(); |
| 1795 | #endif |
| 1796 | |
| 1797 | ; return 0; } |
| 1798 | EOF |
| 1799 | if { (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" |
| 1802 | else |
| 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" |
| 1807 | fi |
| 1808 | rm -f conftest* |
| 1809 | fi |
| 1810 | |
| 1811 | if 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 |
| 1816 | EOF |
| 1817 | |
| 1818 | else |
| 1819 | echo "$ac_t""no" 1>&6 |
| 1820 | cat >> confdefs.h <<\EOF |
| 1821 | #define USEGETWD 1 |
| 1822 | EOF |
| 1823 | |
| 1824 | fi |
| 1825 | done |
| 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 | |
| 1830 | for ac_func in opendir strstr |
| 1831 | do |
| 1832 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 1833 | echo "configure:1834: checking for $ac_func" >&5 |
| 1834 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 1835 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1836 | else |
| 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. */ |
| 1846 | char $ac_func(); |
| 1847 | |
| 1848 | int 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) |
| 1854 | choke me |
| 1855 | #else |
| 1856 | $ac_func(); |
| 1857 | #endif |
| 1858 | |
| 1859 | ; return 0; } |
| 1860 | EOF |
| 1861 | if { (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" |
| 1864 | else |
| 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" |
| 1869 | fi |
| 1870 | rm -f conftest* |
| 1871 | fi |
| 1872 | |
| 1873 | if 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 |
| 1878 | EOF |
| 1879 | |
| 1880 | else |
| 1881 | echo "$ac_t""no" 1>&6 |
| 1882 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
| 1883 | fi |
| 1884 | done |
| 1885 | |
| 1886 | |
| 1887 | |
| 1888 | for ac_func in strtol strtoll strtoull tmpnam waitpid |
| 1889 | do |
| 1890 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 1891 | echo "configure:1892: checking for $ac_func" >&5 |
| 1892 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 1893 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1894 | else |
| 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. */ |
| 1904 | char $ac_func(); |
| 1905 | |
| 1906 | int 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) |
| 1912 | choke me |
| 1913 | #else |
| 1914 | $ac_func(); |
| 1915 | #endif |
| 1916 | |
| 1917 | ; return 0; } |
| 1918 | EOF |
| 1919 | if { (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" |
| 1922 | else |
| 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" |
| 1927 | fi |
| 1928 | rm -f conftest* |
| 1929 | fi |
| 1930 | |
| 1931 | if 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 |
| 1936 | EOF |
| 1937 | |
| 1938 | else |
| 1939 | echo "$ac_t""no" 1>&6 |
| 1940 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
| 1941 | fi |
| 1942 | done |
| 1943 | |
| 1944 | |
| 1945 | echo $ac_n "checking for strerror""... $ac_c" 1>&6 |
| 1946 | echo "configure:1947: checking for strerror" >&5 |
| 1947 | if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then |
| 1948 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1949 | else |
| 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. */ |
| 1959 | char strerror(); |
| 1960 | |
| 1961 | int 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) |
| 1967 | choke me |
| 1968 | #else |
| 1969 | strerror(); |
| 1970 | #endif |
| 1971 | |
| 1972 | ; return 0; } |
| 1973 | EOF |
| 1974 | if { (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" |
| 1977 | else |
| 1978 | echo "configure: failed program was:" >&5 |
| 1979 | cat conftest.$ac_ext >&5 |
| 1980 | rm -rf conftest* |
| 1981 | eval "ac_cv_func_strerror=no" |
| 1982 | fi |
| 1983 | rm -f conftest* |
| 1984 | fi |
| 1985 | |
| 1986 | if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then |
| 1987 | echo "$ac_t""yes" 1>&6 |
| 1988 | : |
| 1989 | else |
| 1990 | echo "$ac_t""no" 1>&6 |
| 1991 | cat >> confdefs.h <<\EOF |
| 1992 | #define NO_STRERROR 1 |
| 1993 | EOF |
| 1994 | |
| 1995 | fi |
| 1996 | |
| 1997 | echo $ac_n "checking for getwd""... $ac_c" 1>&6 |
| 1998 | echo "configure:1999: checking for getwd" >&5 |
| 1999 | if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then |
| 2000 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2001 | else |
| 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. */ |
| 2011 | char getwd(); |
| 2012 | |
| 2013 | int 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) |
| 2019 | choke me |
| 2020 | #else |
| 2021 | getwd(); |
| 2022 | #endif |
| 2023 | |
| 2024 | ; return 0; } |
| 2025 | EOF |
| 2026 | if { (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" |
| 2029 | else |
| 2030 | echo "configure: failed program was:" >&5 |
| 2031 | cat conftest.$ac_ext >&5 |
| 2032 | rm -rf conftest* |
| 2033 | eval "ac_cv_func_getwd=no" |
| 2034 | fi |
| 2035 | rm -f conftest* |
| 2036 | fi |
| 2037 | |
| 2038 | if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then |
| 2039 | echo "$ac_t""yes" 1>&6 |
| 2040 | : |
| 2041 | else |
| 2042 | echo "$ac_t""no" 1>&6 |
| 2043 | cat >> confdefs.h <<\EOF |
| 2044 | #define NO_GETWD 1 |
| 2045 | EOF |
| 2046 | |
| 2047 | fi |
| 2048 | |
| 2049 | echo $ac_n "checking for wait3""... $ac_c" 1>&6 |
| 2050 | echo "configure:2051: checking for wait3" >&5 |
| 2051 | if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then |
| 2052 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2053 | else |
| 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. */ |
| 2063 | char wait3(); |
| 2064 | |
| 2065 | int 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) |
| 2071 | choke me |
| 2072 | #else |
| 2073 | wait3(); |
| 2074 | #endif |
| 2075 | |
| 2076 | ; return 0; } |
| 2077 | EOF |
| 2078 | if { (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" |
| 2081 | else |
| 2082 | echo "configure: failed program was:" >&5 |
| 2083 | cat conftest.$ac_ext >&5 |
| 2084 | rm -rf conftest* |
| 2085 | eval "ac_cv_func_wait3=no" |
| 2086 | fi |
| 2087 | rm -f conftest* |
| 2088 | fi |
| 2089 | |
| 2090 | if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then |
| 2091 | echo "$ac_t""yes" 1>&6 |
| 2092 | : |
| 2093 | else |
| 2094 | echo "$ac_t""no" 1>&6 |
| 2095 | cat >> confdefs.h <<\EOF |
| 2096 | #define NO_WAIT3 1 |
| 2097 | EOF |
| 2098 | |
| 2099 | fi |
| 2100 | |
| 2101 | echo $ac_n "checking for uname""... $ac_c" 1>&6 |
| 2102 | echo "configure:2103: checking for uname" >&5 |
| 2103 | if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then |
| 2104 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2105 | else |
| 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. */ |
| 2115 | char uname(); |
| 2116 | |
| 2117 | int 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) |
| 2123 | choke me |
| 2124 | #else |
| 2125 | uname(); |
| 2126 | #endif |
| 2127 | |
| 2128 | ; return 0; } |
| 2129 | EOF |
| 2130 | if { (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" |
| 2133 | else |
| 2134 | echo "configure: failed program was:" >&5 |
| 2135 | cat conftest.$ac_ext >&5 |
| 2136 | rm -rf conftest* |
| 2137 | eval "ac_cv_func_uname=no" |
| 2138 | fi |
| 2139 | rm -f conftest* |
| 2140 | fi |
| 2141 | |
| 2142 | if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then |
| 2143 | echo "$ac_t""yes" 1>&6 |
| 2144 | : |
| 2145 | else |
| 2146 | echo "$ac_t""no" 1>&6 |
| 2147 | cat >> confdefs.h <<\EOF |
| 2148 | #define NO_UNAME 1 |
| 2149 | EOF |
| 2150 | |
| 2151 | fi |
| 2152 | |
| 2153 | echo $ac_n "checking for realpath""... $ac_c" 1>&6 |
| 2154 | echo "configure:2155: checking for realpath" >&5 |
| 2155 | if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then |
| 2156 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2157 | else |
| 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. */ |
| 2167 | char realpath(); |
| 2168 | |
| 2169 | int 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) |
| 2175 | choke me |
| 2176 | #else |
| 2177 | realpath(); |
| 2178 | #endif |
| 2179 | |
| 2180 | ; return 0; } |
| 2181 | EOF |
| 2182 | if { (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" |
| 2185 | else |
| 2186 | echo "configure: failed program was:" >&5 |
| 2187 | cat conftest.$ac_ext >&5 |
| 2188 | rm -rf conftest* |
| 2189 | eval "ac_cv_func_realpath=no" |
| 2190 | fi |
| 2191 | rm -f conftest* |
| 2192 | fi |
| 2193 | |
| 2194 | if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then |
| 2195 | echo "$ac_t""yes" 1>&6 |
| 2196 | : |
| 2197 | else |
| 2198 | echo "$ac_t""no" 1>&6 |
| 2199 | cat >> confdefs.h <<\EOF |
| 2200 | #define NO_REALPATH 1 |
| 2201 | EOF |
| 2202 | |
| 2203 | fi |
| 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 |
| 2217 | echo "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> |
| 2223 | int 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 |
| 2235 | DIR *d; |
| 2236 | struct dirent *entryPtr; |
| 2237 | char *p; |
| 2238 | d = opendir("foobar"); |
| 2239 | entryPtr = readdir(d); |
| 2240 | p = entryPtr->d_name; |
| 2241 | closedir(d); |
| 2242 | |
| 2243 | ; return 0; } |
| 2244 | EOF |
| 2245 | if { (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 |
| 2248 | else |
| 2249 | echo "configure: failed program was:" >&5 |
| 2250 | cat conftest.$ac_ext >&5 |
| 2251 | rm -rf conftest* |
| 2252 | tcl_ok=no |
| 2253 | fi |
| 2254 | rm -f conftest* |
| 2255 | |
| 2256 | if test $tcl_ok = no; then |
| 2257 | cat >> confdefs.h <<\EOF |
| 2258 | #define NO_DIRENT_H 1 |
| 2259 | EOF |
| 2260 | |
| 2261 | fi |
| 2262 | |
| 2263 | echo "$ac_t""$tcl_ok" 1>&6 |
| 2264 | ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` |
| 2265 | echo $ac_n "checking for errno.h""... $ac_c" 1>&6 |
| 2266 | echo "configure:2267: checking for errno.h" >&5 |
| 2267 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2268 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2269 | else |
| 2270 | cat > conftest.$ac_ext <<EOF |
| 2271 | #line 2272 "configure" |
| 2272 | #include "confdefs.h" |
| 2273 | #include <errno.h> |
| 2274 | EOF |
| 2275 | ac_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; } |
| 2277 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2278 | if test -z "$ac_err"; then |
| 2279 | rm -rf conftest* |
| 2280 | eval "ac_cv_header_$ac_safe=yes" |
| 2281 | else |
| 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" |
| 2287 | fi |
| 2288 | rm -f conftest* |
| 2289 | fi |
| 2290 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2291 | echo "$ac_t""yes" 1>&6 |
| 2292 | : |
| 2293 | else |
| 2294 | echo "$ac_t""no" 1>&6 |
| 2295 | cat >> confdefs.h <<\EOF |
| 2296 | #define NO_ERRNO_H 1 |
| 2297 | EOF |
| 2298 | |
| 2299 | fi |
| 2300 | |
| 2301 | ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'` |
| 2302 | echo $ac_n "checking for float.h""... $ac_c" 1>&6 |
| 2303 | echo "configure:2304: checking for float.h" >&5 |
| 2304 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2305 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2306 | else |
| 2307 | cat > conftest.$ac_ext <<EOF |
| 2308 | #line 2309 "configure" |
| 2309 | #include "confdefs.h" |
| 2310 | #include <float.h> |
| 2311 | EOF |
| 2312 | ac_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; } |
| 2314 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2315 | if test -z "$ac_err"; then |
| 2316 | rm -rf conftest* |
| 2317 | eval "ac_cv_header_$ac_safe=yes" |
| 2318 | else |
| 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" |
| 2324 | fi |
| 2325 | rm -f conftest* |
| 2326 | fi |
| 2327 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2328 | echo "$ac_t""yes" 1>&6 |
| 2329 | : |
| 2330 | else |
| 2331 | echo "$ac_t""no" 1>&6 |
| 2332 | cat >> confdefs.h <<\EOF |
| 2333 | #define NO_FLOAT_H 1 |
| 2334 | EOF |
| 2335 | |
| 2336 | fi |
| 2337 | |
| 2338 | ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'` |
| 2339 | echo $ac_n "checking for values.h""... $ac_c" 1>&6 |
| 2340 | echo "configure:2341: checking for values.h" >&5 |
| 2341 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2342 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2343 | else |
| 2344 | cat > conftest.$ac_ext <<EOF |
| 2345 | #line 2346 "configure" |
| 2346 | #include "confdefs.h" |
| 2347 | #include <values.h> |
| 2348 | EOF |
| 2349 | ac_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; } |
| 2351 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2352 | if test -z "$ac_err"; then |
| 2353 | rm -rf conftest* |
| 2354 | eval "ac_cv_header_$ac_safe=yes" |
| 2355 | else |
| 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" |
| 2361 | fi |
| 2362 | rm -f conftest* |
| 2363 | fi |
| 2364 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2365 | echo "$ac_t""yes" 1>&6 |
| 2366 | : |
| 2367 | else |
| 2368 | echo "$ac_t""no" 1>&6 |
| 2369 | cat >> confdefs.h <<\EOF |
| 2370 | #define NO_VALUES_H 1 |
| 2371 | EOF |
| 2372 | |
| 2373 | fi |
| 2374 | |
| 2375 | ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'` |
| 2376 | echo $ac_n "checking for limits.h""... $ac_c" 1>&6 |
| 2377 | echo "configure:2378: checking for limits.h" >&5 |
| 2378 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2379 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2380 | else |
| 2381 | cat > conftest.$ac_ext <<EOF |
| 2382 | #line 2383 "configure" |
| 2383 | #include "confdefs.h" |
| 2384 | #include <limits.h> |
| 2385 | EOF |
| 2386 | ac_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; } |
| 2388 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2389 | if test -z "$ac_err"; then |
| 2390 | rm -rf conftest* |
| 2391 | eval "ac_cv_header_$ac_safe=yes" |
| 2392 | else |
| 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" |
| 2398 | fi |
| 2399 | rm -f conftest* |
| 2400 | fi |
| 2401 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2402 | echo "$ac_t""yes" 1>&6 |
| 2403 | : |
| 2404 | else |
| 2405 | echo "$ac_t""no" 1>&6 |
| 2406 | cat >> confdefs.h <<\EOF |
| 2407 | #define NO_LIMITS_H 1 |
| 2408 | EOF |
| 2409 | |
| 2410 | fi |
| 2411 | |
| 2412 | ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` |
| 2413 | echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 |
| 2414 | echo "configure:2415: checking for stdlib.h" >&5 |
| 2415 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2416 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2417 | else |
| 2418 | cat > conftest.$ac_ext <<EOF |
| 2419 | #line 2420 "configure" |
| 2420 | #include "confdefs.h" |
| 2421 | #include <stdlib.h> |
| 2422 | EOF |
| 2423 | ac_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; } |
| 2425 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2426 | if test -z "$ac_err"; then |
| 2427 | rm -rf conftest* |
| 2428 | eval "ac_cv_header_$ac_safe=yes" |
| 2429 | else |
| 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" |
| 2435 | fi |
| 2436 | rm -f conftest* |
| 2437 | fi |
| 2438 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2439 | echo "$ac_t""yes" 1>&6 |
| 2440 | tcl_ok=1 |
| 2441 | else |
| 2442 | echo "$ac_t""no" 1>&6 |
| 2443 | tcl_ok=0 |
| 2444 | fi |
| 2445 | |
| 2446 | cat > conftest.$ac_ext <<EOF |
| 2447 | #line 2448 "configure" |
| 2448 | #include "confdefs.h" |
| 2449 | #include <stdlib.h> |
| 2450 | EOF |
| 2451 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2452 | egrep "strtol" >/dev/null 2>&1; then |
| 2453 | : |
| 2454 | else |
| 2455 | rm -rf conftest* |
| 2456 | tcl_ok=0 |
| 2457 | fi |
| 2458 | rm -f conftest* |
| 2459 | |
| 2460 | cat > conftest.$ac_ext <<EOF |
| 2461 | #line 2462 "configure" |
| 2462 | #include "confdefs.h" |
| 2463 | #include <stdlib.h> |
| 2464 | EOF |
| 2465 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2466 | egrep "strtoul" >/dev/null 2>&1; then |
| 2467 | : |
| 2468 | else |
| 2469 | rm -rf conftest* |
| 2470 | tcl_ok=0 |
| 2471 | fi |
| 2472 | rm -f conftest* |
| 2473 | |
| 2474 | cat > conftest.$ac_ext <<EOF |
| 2475 | #line 2476 "configure" |
| 2476 | #include "confdefs.h" |
| 2477 | #include <stdlib.h> |
| 2478 | EOF |
| 2479 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2480 | egrep "strtod" >/dev/null 2>&1; then |
| 2481 | : |
| 2482 | else |
| 2483 | rm -rf conftest* |
| 2484 | tcl_ok=0 |
| 2485 | fi |
| 2486 | rm -f conftest* |
| 2487 | |
| 2488 | if test $tcl_ok = 0; then |
| 2489 | cat >> confdefs.h <<\EOF |
| 2490 | #define NO_STDLIB_H 1 |
| 2491 | EOF |
| 2492 | |
| 2493 | fi |
| 2494 | ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` |
| 2495 | echo $ac_n "checking for string.h""... $ac_c" 1>&6 |
| 2496 | echo "configure:2497: checking for string.h" >&5 |
| 2497 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2498 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2499 | else |
| 2500 | cat > conftest.$ac_ext <<EOF |
| 2501 | #line 2502 "configure" |
| 2502 | #include "confdefs.h" |
| 2503 | #include <string.h> |
| 2504 | EOF |
| 2505 | ac_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; } |
| 2507 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2508 | if test -z "$ac_err"; then |
| 2509 | rm -rf conftest* |
| 2510 | eval "ac_cv_header_$ac_safe=yes" |
| 2511 | else |
| 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" |
| 2517 | fi |
| 2518 | rm -f conftest* |
| 2519 | fi |
| 2520 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2521 | echo "$ac_t""yes" 1>&6 |
| 2522 | tcl_ok=1 |
| 2523 | else |
| 2524 | echo "$ac_t""no" 1>&6 |
| 2525 | tcl_ok=0 |
| 2526 | fi |
| 2527 | |
| 2528 | cat > conftest.$ac_ext <<EOF |
| 2529 | #line 2530 "configure" |
| 2530 | #include "confdefs.h" |
| 2531 | #include <string.h> |
| 2532 | EOF |
| 2533 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2534 | egrep "strstr" >/dev/null 2>&1; then |
| 2535 | : |
| 2536 | else |
| 2537 | rm -rf conftest* |
| 2538 | tcl_ok=0 |
| 2539 | fi |
| 2540 | rm -f conftest* |
| 2541 | |
| 2542 | cat > conftest.$ac_ext <<EOF |
| 2543 | #line 2544 "configure" |
| 2544 | #include "confdefs.h" |
| 2545 | #include <string.h> |
| 2546 | EOF |
| 2547 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2548 | egrep "strerror" >/dev/null 2>&1; then |
| 2549 | : |
| 2550 | else |
| 2551 | rm -rf conftest* |
| 2552 | tcl_ok=0 |
| 2553 | fi |
| 2554 | rm -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 |
| 2563 | EOF |
| 2564 | |
| 2565 | fi |
| 2566 | |
| 2567 | ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'` |
| 2568 | echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6 |
| 2569 | echo "configure:2570: checking for sys/wait.h" >&5 |
| 2570 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2571 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2572 | else |
| 2573 | cat > conftest.$ac_ext <<EOF |
| 2574 | #line 2575 "configure" |
| 2575 | #include "confdefs.h" |
| 2576 | #include <sys/wait.h> |
| 2577 | EOF |
| 2578 | ac_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; } |
| 2580 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2581 | if test -z "$ac_err"; then |
| 2582 | rm -rf conftest* |
| 2583 | eval "ac_cv_header_$ac_safe=yes" |
| 2584 | else |
| 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" |
| 2590 | fi |
| 2591 | rm -f conftest* |
| 2592 | fi |
| 2593 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2594 | echo "$ac_t""yes" 1>&6 |
| 2595 | : |
| 2596 | else |
| 2597 | echo "$ac_t""no" 1>&6 |
| 2598 | cat >> confdefs.h <<\EOF |
| 2599 | #define NO_SYS_WAIT_H 1 |
| 2600 | EOF |
| 2601 | |
| 2602 | fi |
| 2603 | |
| 2604 | ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` |
| 2605 | echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 |
| 2606 | echo "configure:2607: checking for dlfcn.h" >&5 |
| 2607 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2608 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2609 | else |
| 2610 | cat > conftest.$ac_ext <<EOF |
| 2611 | #line 2612 "configure" |
| 2612 | #include "confdefs.h" |
| 2613 | #include <dlfcn.h> |
| 2614 | EOF |
| 2615 | ac_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; } |
| 2617 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2618 | if test -z "$ac_err"; then |
| 2619 | rm -rf conftest* |
| 2620 | eval "ac_cv_header_$ac_safe=yes" |
| 2621 | else |
| 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" |
| 2627 | fi |
| 2628 | rm -f conftest* |
| 2629 | fi |
| 2630 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2631 | echo "$ac_t""yes" 1>&6 |
| 2632 | : |
| 2633 | else |
| 2634 | echo "$ac_t""no" 1>&6 |
| 2635 | cat >> confdefs.h <<\EOF |
| 2636 | #define NO_DLFCN_H 1 |
| 2637 | EOF |
| 2638 | |
| 2639 | fi |
| 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 |
| 2645 | do |
| 2646 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2647 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 2648 | echo "configure:2649: checking for $ac_hdr" >&5 |
| 2649 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2650 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2651 | else |
| 2652 | cat > conftest.$ac_ext <<EOF |
| 2653 | #line 2654 "configure" |
| 2654 | #include "confdefs.h" |
| 2655 | #include <$ac_hdr> |
| 2656 | EOF |
| 2657 | ac_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; } |
| 2659 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2660 | if test -z "$ac_err"; then |
| 2661 | rm -rf conftest* |
| 2662 | eval "ac_cv_header_$ac_safe=yes" |
| 2663 | else |
| 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" |
| 2669 | fi |
| 2670 | rm -f conftest* |
| 2671 | fi |
| 2672 | if 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 |
| 2677 | EOF |
| 2678 | |
| 2679 | else |
| 2680 | echo "$ac_t""no" 1>&6 |
| 2681 | fi |
| 2682 | done |
| 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 |
| 2695 | do |
| 2696 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2697 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 2698 | echo "configure:2699: checking for $ac_hdr" >&5 |
| 2699 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2700 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2701 | else |
| 2702 | cat > conftest.$ac_ext <<EOF |
| 2703 | #line 2704 "configure" |
| 2704 | #include "confdefs.h" |
| 2705 | #include <$ac_hdr> |
| 2706 | EOF |
| 2707 | ac_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; } |
| 2709 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2710 | if test -z "$ac_err"; then |
| 2711 | rm -rf conftest* |
| 2712 | eval "ac_cv_header_$ac_safe=yes" |
| 2713 | else |
| 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" |
| 2719 | fi |
| 2720 | rm -f conftest* |
| 2721 | fi |
| 2722 | if 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 |
| 2727 | EOF |
| 2728 | |
| 2729 | else |
| 2730 | echo "$ac_t""no" 1>&6 |
| 2731 | fi |
| 2732 | done |
| 2733 | |
| 2734 | echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 |
| 2735 | echo "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 |
| 2738 | else |
| 2739 | |
| 2740 | if test "$cross_compiling" = yes; then |
| 2741 | tcl_cv_api_serial=no |
| 2742 | else |
| 2743 | cat > conftest.$ac_ext <<EOF |
| 2744 | #line 2745 "configure" |
| 2745 | #include "confdefs.h" |
| 2746 | |
| 2747 | #include <termios.h> |
| 2748 | |
| 2749 | int 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 | } |
| 2758 | EOF |
| 2759 | if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2760 | then |
| 2761 | tcl_cv_api_serial=termios |
| 2762 | else |
| 2763 | echo "configure: failed program was:" >&5 |
| 2764 | cat conftest.$ac_ext >&5 |
| 2765 | rm -fr conftest* |
| 2766 | tcl_cv_api_serial=no |
| 2767 | fi |
| 2768 | rm -fr conftest* |
| 2769 | fi |
| 2770 | |
| 2771 | if test $tcl_cv_api_serial = no ; then |
| 2772 | if test "$cross_compiling" = yes; then |
| 2773 | tcl_cv_api_serial=no |
| 2774 | else |
| 2775 | cat > conftest.$ac_ext <<EOF |
| 2776 | #line 2777 "configure" |
| 2777 | #include "confdefs.h" |
| 2778 | |
| 2779 | #include <termio.h> |
| 2780 | |
| 2781 | int 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 | } |
| 2789 | EOF |
| 2790 | if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2791 | then |
| 2792 | tcl_cv_api_serial=termio |
| 2793 | else |
| 2794 | echo "configure: failed program was:" >&5 |
| 2795 | cat conftest.$ac_ext >&5 |
| 2796 | rm -fr conftest* |
| 2797 | tcl_cv_api_serial=no |
| 2798 | fi |
| 2799 | rm -fr conftest* |
| 2800 | fi |
| 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 |
| 2806 | else |
| 2807 | cat > conftest.$ac_ext <<EOF |
| 2808 | #line 2809 "configure" |
| 2809 | #include "confdefs.h" |
| 2810 | |
| 2811 | #include <sgtty.h> |
| 2812 | |
| 2813 | int 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 | } |
| 2822 | EOF |
| 2823 | if { (eval echo configure:2824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2824 | then |
| 2825 | tcl_cv_api_serial=sgtty |
| 2826 | else |
| 2827 | echo "configure: failed program was:" >&5 |
| 2828 | cat conftest.$ac_ext >&5 |
| 2829 | rm -fr conftest* |
| 2830 | tcl_cv_api_serial=no |
| 2831 | fi |
| 2832 | rm -fr conftest* |
| 2833 | fi |
| 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 |
| 2839 | else |
| 2840 | cat > conftest.$ac_ext <<EOF |
| 2841 | #line 2842 "configure" |
| 2842 | #include "confdefs.h" |
| 2843 | |
| 2844 | #include <termios.h> |
| 2845 | #include <errno.h> |
| 2846 | |
| 2847 | int 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 | } |
| 2857 | EOF |
| 2858 | if { (eval echo configure:2859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2859 | then |
| 2860 | tcl_cv_api_serial=termios |
| 2861 | else |
| 2862 | echo "configure: failed program was:" >&5 |
| 2863 | cat conftest.$ac_ext >&5 |
| 2864 | rm -fr conftest* |
| 2865 | tcl_cv_api_serial=no |
| 2866 | fi |
| 2867 | rm -fr conftest* |
| 2868 | fi |
| 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 |
| 2874 | else |
| 2875 | cat > conftest.$ac_ext <<EOF |
| 2876 | #line 2877 "configure" |
| 2877 | #include "confdefs.h" |
| 2878 | |
| 2879 | #include <termio.h> |
| 2880 | #include <errno.h> |
| 2881 | |
| 2882 | int 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 | } |
| 2891 | EOF |
| 2892 | if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2893 | then |
| 2894 | tcl_cv_api_serial=termio |
| 2895 | else |
| 2896 | echo "configure: failed program was:" >&5 |
| 2897 | cat conftest.$ac_ext >&5 |
| 2898 | rm -fr conftest* |
| 2899 | tcl_cv_api_serial=no |
| 2900 | fi |
| 2901 | rm -fr conftest* |
| 2902 | fi |
| 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 |
| 2908 | else |
| 2909 | cat > conftest.$ac_ext <<EOF |
| 2910 | #line 2911 "configure" |
| 2911 | #include "confdefs.h" |
| 2912 | |
| 2913 | #include <sgtty.h> |
| 2914 | #include <errno.h> |
| 2915 | |
| 2916 | int 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 | } |
| 2926 | EOF |
| 2927 | if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 2928 | then |
| 2929 | tcl_cv_api_serial=sgtty |
| 2930 | else |
| 2931 | echo "configure: failed program was:" >&5 |
| 2932 | cat conftest.$ac_ext >&5 |
| 2933 | rm -fr conftest* |
| 2934 | tcl_cv_api_serial=none |
| 2935 | fi |
| 2936 | rm -fr conftest* |
| 2937 | fi |
| 2938 | |
| 2939 | fi |
| 2940 | fi |
| 2941 | |
| 2942 | case $tcl_cv_api_serial in |
| 2943 | termios) cat >> confdefs.h <<\EOF |
| 2944 | #define USE_TERMIOS 1 |
| 2945 | EOF |
| 2946 | ;; |
| 2947 | termio) cat >> confdefs.h <<\EOF |
| 2948 | #define USE_TERMIO 1 |
| 2949 | EOF |
| 2950 | ;; |
| 2951 | sgtty) cat >> confdefs.h <<\EOF |
| 2952 | #define USE_SGTTY 1 |
| 2953 | EOF |
| 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 | |
| 2969 | echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 |
| 2970 | echo "configure:2971: checking for fd_set in sys/types" >&5 |
| 2971 | if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then |
| 2972 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2973 | else |
| 2974 | cat > conftest.$ac_ext <<EOF |
| 2975 | #line 2976 "configure" |
| 2976 | #include "confdefs.h" |
| 2977 | #include <sys/types.h> |
| 2978 | int main() { |
| 2979 | fd_set readMask, writeMask; |
| 2980 | ; return 0; } |
| 2981 | EOF |
| 2982 | if { (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 |
| 2985 | else |
| 2986 | echo "configure: failed program was:" >&5 |
| 2987 | cat conftest.$ac_ext >&5 |
| 2988 | rm -rf conftest* |
| 2989 | tcl_cv_type_fd_set=no |
| 2990 | fi |
| 2991 | rm -f conftest* |
| 2992 | fi |
| 2993 | |
| 2994 | echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 |
| 2995 | tk_ok=$tcl_cv_type_fd_set |
| 2996 | if test $tcl_cv_type_fd_set = no; then |
| 2997 | echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 |
| 2998 | echo "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 |
| 3001 | else |
| 3002 | cat > conftest.$ac_ext <<EOF |
| 3003 | #line 3004 "configure" |
| 3004 | #include "confdefs.h" |
| 3005 | #include <sys/select.h> |
| 3006 | EOF |
| 3007 | if (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 |
| 3011 | else |
| 3012 | rm -rf conftest* |
| 3013 | tcl_cv_grep_fd_mask=missing |
| 3014 | fi |
| 3015 | rm -f conftest* |
| 3016 | |
| 3017 | fi |
| 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 |
| 3023 | EOF |
| 3024 | |
| 3025 | tk_ok=yes |
| 3026 | fi |
| 3027 | fi |
| 3028 | if test $tk_ok = no; then |
| 3029 | cat >> confdefs.h <<\EOF |
| 3030 | #define NO_FD_SET 1 |
| 3031 | EOF |
| 3032 | |
| 3033 | fi |
| 3034 | |
| 3035 | #------------------------------------------------------------------------------ |
| 3036 | # Find out all about time handling differences. |
| 3037 | #------------------------------------------------------------------------------ |
| 3038 | |
| 3039 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
| 3040 | echo "configure:3041: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 3041 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 3042 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3043 | else |
| 3044 | cat > conftest.$ac_ext <<EOF |
| 3045 | #line 3046 "configure" |
| 3046 | #include "confdefs.h" |
| 3047 | #include <sys/types.h> |
| 3048 | #include <time.h> |
| 3049 | int main() { |
| 3050 | struct tm *tp; tp->tm_sec; |
| 3051 | ; return 0; } |
| 3052 | EOF |
| 3053 | if { (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 |
| 3056 | else |
| 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 |
| 3061 | fi |
| 3062 | rm -f conftest* |
| 3063 | fi |
| 3064 | |
| 3065 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 3066 | if test $ac_cv_struct_tm = sys/time.h; then |
| 3067 | cat >> confdefs.h <<\EOF |
| 3068 | #define TM_IN_SYS_TIME 1 |
| 3069 | EOF |
| 3070 | |
| 3071 | fi |
| 3072 | |
| 3073 | |
| 3074 | for ac_hdr in sys/time.h |
| 3075 | do |
| 3076 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 3077 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 3078 | echo "configure:3079: checking for $ac_hdr" >&5 |
| 3079 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3080 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3081 | else |
| 3082 | cat > conftest.$ac_ext <<EOF |
| 3083 | #line 3084 "configure" |
| 3084 | #include "confdefs.h" |
| 3085 | #include <$ac_hdr> |
| 3086 | EOF |
| 3087 | ac_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; } |
| 3089 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3090 | if test -z "$ac_err"; then |
| 3091 | rm -rf conftest* |
| 3092 | eval "ac_cv_header_$ac_safe=yes" |
| 3093 | else |
| 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" |
| 3099 | fi |
| 3100 | rm -f conftest* |
| 3101 | fi |
| 3102 | if 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 |
| 3107 | EOF |
| 3108 | |
| 3109 | else |
| 3110 | echo "$ac_t""no" 1>&6 |
| 3111 | fi |
| 3112 | done |
| 3113 | |
| 3114 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
| 3115 | echo "configure:3116: checking whether time.h and sys/time.h may both be included" >&5 |
| 3116 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 3117 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3118 | else |
| 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> |
| 3125 | int main() { |
| 3126 | struct tm *tp; |
| 3127 | ; return 0; } |
| 3128 | EOF |
| 3129 | if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 3130 | rm -rf conftest* |
| 3131 | ac_cv_header_time=yes |
| 3132 | else |
| 3133 | echo "configure: failed program was:" >&5 |
| 3134 | cat conftest.$ac_ext >&5 |
| 3135 | rm -rf conftest* |
| 3136 | ac_cv_header_time=no |
| 3137 | fi |
| 3138 | rm -f conftest* |
| 3139 | fi |
| 3140 | |
| 3141 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 3142 | if test $ac_cv_header_time = yes; then |
| 3143 | cat >> confdefs.h <<\EOF |
| 3144 | #define TIME_WITH_SYS_TIME 1 |
| 3145 | EOF |
| 3146 | |
| 3147 | fi |
| 3148 | |
| 3149 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
| 3150 | echo "configure:3151: checking for tm_zone in struct tm" >&5 |
| 3151 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 3152 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3153 | else |
| 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> |
| 3159 | int main() { |
| 3160 | struct tm tm; tm.tm_zone; |
| 3161 | ; return 0; } |
| 3162 | EOF |
| 3163 | if { (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 |
| 3166 | else |
| 3167 | echo "configure: failed program was:" >&5 |
| 3168 | cat conftest.$ac_ext >&5 |
| 3169 | rm -rf conftest* |
| 3170 | ac_cv_struct_tm_zone=no |
| 3171 | fi |
| 3172 | rm -f conftest* |
| 3173 | fi |
| 3174 | |
| 3175 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 3176 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 3177 | cat >> confdefs.h <<\EOF |
| 3178 | #define HAVE_TM_ZONE 1 |
| 3179 | EOF |
| 3180 | |
| 3181 | else |
| 3182 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
| 3183 | echo "configure:3184: checking for tzname" >&5 |
| 3184 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 3185 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3186 | else |
| 3187 | cat > conftest.$ac_ext <<EOF |
| 3188 | #line 3189 "configure" |
| 3189 | #include "confdefs.h" |
| 3190 | #include <time.h> |
| 3191 | #ifndef tzname /* For SGI. */ |
| 3192 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
| 3193 | #endif |
| 3194 | int main() { |
| 3195 | atoi(*tzname); |
| 3196 | ; return 0; } |
| 3197 | EOF |
| 3198 | if { (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 |
| 3201 | else |
| 3202 | echo "configure: failed program was:" >&5 |
| 3203 | cat conftest.$ac_ext >&5 |
| 3204 | rm -rf conftest* |
| 3205 | ac_cv_var_tzname=no |
| 3206 | fi |
| 3207 | rm -f conftest* |
| 3208 | fi |
| 3209 | |
| 3210 | echo "$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 |
| 3214 | EOF |
| 3215 | |
| 3216 | fi |
| 3217 | fi |
| 3218 | |
| 3219 | |
| 3220 | for ac_func in gmtime_r localtime_r |
| 3221 | do |
| 3222 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 3223 | echo "configure:3224: checking for $ac_func" >&5 |
| 3224 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 3225 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3226 | else |
| 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. */ |
| 3236 | char $ac_func(); |
| 3237 | |
| 3238 | int 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) |
| 3244 | choke me |
| 3245 | #else |
| 3246 | $ac_func(); |
| 3247 | #endif |
| 3248 | |
| 3249 | ; return 0; } |
| 3250 | EOF |
| 3251 | if { (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" |
| 3254 | else |
| 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" |
| 3259 | fi |
| 3260 | rm -f conftest* |
| 3261 | fi |
| 3262 | |
| 3263 | if 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 |
| 3268 | EOF |
| 3269 | |
| 3270 | else |
| 3271 | echo "$ac_t""no" 1>&6 |
| 3272 | fi |
| 3273 | done |
| 3274 | |
| 3275 | |
| 3276 | echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 |
| 3277 | echo "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 |
| 3280 | else |
| 3281 | cat > conftest.$ac_ext <<EOF |
| 3282 | #line 3283 "configure" |
| 3283 | #include "confdefs.h" |
| 3284 | #include <time.h> |
| 3285 | int main() { |
| 3286 | struct tm tm; tm.tm_tzadj; |
| 3287 | ; return 0; } |
| 3288 | EOF |
| 3289 | if { (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 |
| 3292 | else |
| 3293 | echo "configure: failed program was:" >&5 |
| 3294 | cat conftest.$ac_ext >&5 |
| 3295 | rm -rf conftest* |
| 3296 | tcl_cv_member_tm_tzadj=no |
| 3297 | fi |
| 3298 | rm -f conftest* |
| 3299 | fi |
| 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 |
| 3305 | EOF |
| 3306 | |
| 3307 | fi |
| 3308 | |
| 3309 | echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 |
| 3310 | echo "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 |
| 3313 | else |
| 3314 | cat > conftest.$ac_ext <<EOF |
| 3315 | #line 3316 "configure" |
| 3316 | #include "confdefs.h" |
| 3317 | #include <time.h> |
| 3318 | int main() { |
| 3319 | struct tm tm; tm.tm_gmtoff; |
| 3320 | ; return 0; } |
| 3321 | EOF |
| 3322 | if { (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 |
| 3325 | else |
| 3326 | echo "configure: failed program was:" >&5 |
| 3327 | cat conftest.$ac_ext >&5 |
| 3328 | rm -rf conftest* |
| 3329 | tcl_cv_member_tm_gmtoff=no |
| 3330 | fi |
| 3331 | rm -f conftest* |
| 3332 | fi |
| 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 |
| 3338 | EOF |
| 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 |
| 3347 | echo "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 |
| 3350 | else |
| 3351 | cat > conftest.$ac_ext <<EOF |
| 3352 | #line 3353 "configure" |
| 3353 | #include "confdefs.h" |
| 3354 | #include <time.h> |
| 3355 | int main() { |
| 3356 | extern long timezone; |
| 3357 | timezone += 1; |
| 3358 | exit (0); |
| 3359 | ; return 0; } |
| 3360 | EOF |
| 3361 | if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 3362 | rm -rf conftest* |
| 3363 | tcl_cv_timezone_long=yes |
| 3364 | else |
| 3365 | echo "configure: failed program was:" >&5 |
| 3366 | cat conftest.$ac_ext >&5 |
| 3367 | rm -rf conftest* |
| 3368 | tcl_cv_timezone_long=no |
| 3369 | fi |
| 3370 | rm -f conftest* |
| 3371 | fi |
| 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 |
| 3377 | EOF |
| 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 |
| 3384 | echo "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 |
| 3387 | else |
| 3388 | cat > conftest.$ac_ext <<EOF |
| 3389 | #line 3390 "configure" |
| 3390 | #include "confdefs.h" |
| 3391 | #include <time.h> |
| 3392 | int main() { |
| 3393 | extern time_t timezone; |
| 3394 | timezone += 1; |
| 3395 | exit (0); |
| 3396 | ; return 0; } |
| 3397 | EOF |
| 3398 | if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 3399 | rm -rf conftest* |
| 3400 | tcl_cv_timezone_time=yes |
| 3401 | else |
| 3402 | echo "configure: failed program was:" >&5 |
| 3403 | cat conftest.$ac_ext >&5 |
| 3404 | rm -rf conftest* |
| 3405 | tcl_cv_timezone_time=no |
| 3406 | fi |
| 3407 | rm -f conftest* |
| 3408 | fi |
| 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 |
| 3414 | EOF |
| 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 | #-------------------------------------------------------------------- |
| 3424 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
| 3425 | echo "configure:3426: checking for st_blksize in struct stat" >&5 |
| 3426 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 3427 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3428 | else |
| 3429 | cat > conftest.$ac_ext <<EOF |
| 3430 | #line 3431 "configure" |
| 3431 | #include "confdefs.h" |
| 3432 | #include <sys/types.h> |
| 3433 | #include <sys/stat.h> |
| 3434 | int main() { |
| 3435 | struct stat s; s.st_blksize; |
| 3436 | ; return 0; } |
| 3437 | EOF |
| 3438 | if { (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 |
| 3441 | else |
| 3442 | echo "configure: failed program was:" >&5 |
| 3443 | cat conftest.$ac_ext >&5 |
| 3444 | rm -rf conftest* |
| 3445 | ac_cv_struct_st_blksize=no |
| 3446 | fi |
| 3447 | rm -f conftest* |
| 3448 | fi |
| 3449 | |
| 3450 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 3451 | if test $ac_cv_struct_st_blksize = yes; then |
| 3452 | cat >> confdefs.h <<\EOF |
| 3453 | #define HAVE_ST_BLKSIZE 1 |
| 3454 | EOF |
| 3455 | |
| 3456 | fi |
| 3457 | |
| 3458 | echo $ac_n "checking for fstatfs""... $ac_c" 1>&6 |
| 3459 | echo "configure:3460: checking for fstatfs" >&5 |
| 3460 | if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then |
| 3461 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3462 | else |
| 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. */ |
| 3472 | char fstatfs(); |
| 3473 | |
| 3474 | int 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) |
| 3480 | choke me |
| 3481 | #else |
| 3482 | fstatfs(); |
| 3483 | #endif |
| 3484 | |
| 3485 | ; return 0; } |
| 3486 | EOF |
| 3487 | if { (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" |
| 3490 | else |
| 3491 | echo "configure: failed program was:" >&5 |
| 3492 | cat conftest.$ac_ext >&5 |
| 3493 | rm -rf conftest* |
| 3494 | eval "ac_cv_func_fstatfs=no" |
| 3495 | fi |
| 3496 | rm -f conftest* |
| 3497 | fi |
| 3498 | |
| 3499 | if eval "test \"`echo '$ac_cv_func_'fstatfs`\" = yes"; then |
| 3500 | echo "$ac_t""yes" 1>&6 |
| 3501 | : |
| 3502 | else |
| 3503 | echo "$ac_t""no" 1>&6 |
| 3504 | cat >> confdefs.h <<\EOF |
| 3505 | #define NO_FSTATFS 1 |
| 3506 | EOF |
| 3507 | |
| 3508 | fi |
| 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 | #-------------------------------------------------------------------- |
| 3515 | echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 |
| 3516 | echo "configure:3517: checking for 8-bit clean memcmp" >&5 |
| 3517 | if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then |
| 3518 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3519 | else |
| 3520 | if test "$cross_compiling" = yes; then |
| 3521 | ac_cv_func_memcmp_clean=no |
| 3522 | else |
| 3523 | cat > conftest.$ac_ext <<EOF |
| 3524 | #line 3525 "configure" |
| 3525 | #include "confdefs.h" |
| 3526 | |
| 3527 | main() |
| 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 | |
| 3533 | EOF |
| 3534 | if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 3535 | then |
| 3536 | ac_cv_func_memcmp_clean=yes |
| 3537 | else |
| 3538 | echo "configure: failed program was:" >&5 |
| 3539 | cat conftest.$ac_ext >&5 |
| 3540 | rm -fr conftest* |
| 3541 | ac_cv_func_memcmp_clean=no |
| 3542 | fi |
| 3543 | rm -fr conftest* |
| 3544 | fi |
| 3545 | |
| 3546 | fi |
| 3547 | |
| 3548 | echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 |
| 3549 | test $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 | #-------------------------------------------------------------------- |
| 3557 | echo $ac_n "checking for memmove""... $ac_c" 1>&6 |
| 3558 | echo "configure:3559: checking for memmove" >&5 |
| 3559 | if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then |
| 3560 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3561 | else |
| 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. */ |
| 3571 | char memmove(); |
| 3572 | |
| 3573 | int 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) |
| 3579 | choke me |
| 3580 | #else |
| 3581 | memmove(); |
| 3582 | #endif |
| 3583 | |
| 3584 | ; return 0; } |
| 3585 | EOF |
| 3586 | if { (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" |
| 3589 | else |
| 3590 | echo "configure: failed program was:" >&5 |
| 3591 | cat conftest.$ac_ext >&5 |
| 3592 | rm -rf conftest* |
| 3593 | eval "ac_cv_func_memmove=no" |
| 3594 | fi |
| 3595 | rm -f conftest* |
| 3596 | fi |
| 3597 | |
| 3598 | if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then |
| 3599 | echo "$ac_t""yes" 1>&6 |
| 3600 | : |
| 3601 | else |
| 3602 | echo "$ac_t""no" 1>&6 |
| 3603 | cat >> confdefs.h <<\EOF |
| 3604 | #define NO_MEMMOVE 1 |
| 3605 | EOF |
| 3606 | cat >> confdefs.h <<\EOF |
| 3607 | #define NO_STRING_H 1 |
| 3608 | EOF |
| 3609 | |
| 3610 | fi |
| 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 | |
| 3618 | echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 |
| 3619 | echo "configure:3620: checking proper strstr implementation" >&5 |
| 3620 | if test "$cross_compiling" = yes; then |
| 3621 | tcl_ok=no |
| 3622 | else |
| 3623 | cat > conftest.$ac_ext <<EOF |
| 3624 | #line 3625 "configure" |
| 3625 | #include "confdefs.h" |
| 3626 | |
| 3627 | extern int strstr(); |
| 3628 | int main() |
| 3629 | { |
| 3630 | exit(strstr("\0test", "test") ? 1 : 0); |
| 3631 | } |
| 3632 | |
| 3633 | EOF |
| 3634 | if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 3635 | then |
| 3636 | tcl_ok=yes |
| 3637 | else |
| 3638 | echo "configure: failed program was:" >&5 |
| 3639 | cat conftest.$ac_ext >&5 |
| 3640 | rm -fr conftest* |
| 3641 | tcl_ok=no |
| 3642 | fi |
| 3643 | rm -fr conftest* |
| 3644 | fi |
| 3645 | |
| 3646 | if test $tcl_ok = yes; then |
| 3647 | echo "$ac_t""yes" 1>&6 |
| 3648 | else |
| 3649 | echo "$ac_t""broken, using substitute" 1>&6 |
| 3650 | LIBOBJS="$LIBOBJS strstr.o" |
| 3651 | fi |
| 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 | |
| 3659 | echo $ac_n "checking for strtoul""... $ac_c" 1>&6 |
| 3660 | echo "configure:3661: checking for strtoul" >&5 |
| 3661 | if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then |
| 3662 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3663 | else |
| 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. */ |
| 3673 | char strtoul(); |
| 3674 | |
| 3675 | int 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) |
| 3681 | choke me |
| 3682 | #else |
| 3683 | strtoul(); |
| 3684 | #endif |
| 3685 | |
| 3686 | ; return 0; } |
| 3687 | EOF |
| 3688 | if { (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" |
| 3691 | else |
| 3692 | echo "configure: failed program was:" >&5 |
| 3693 | cat conftest.$ac_ext >&5 |
| 3694 | rm -rf conftest* |
| 3695 | eval "ac_cv_func_strtoul=no" |
| 3696 | fi |
| 3697 | rm -f conftest* |
| 3698 | fi |
| 3699 | |
| 3700 | if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then |
| 3701 | echo "$ac_t""yes" 1>&6 |
| 3702 | tcl_ok=1 |
| 3703 | else |
| 3704 | echo "$ac_t""no" 1>&6 |
| 3705 | tcl_ok=0 |
| 3706 | fi |
| 3707 | |
| 3708 | if test "$cross_compiling" = yes; then |
| 3709 | tcl_ok=0 |
| 3710 | else |
| 3711 | cat > conftest.$ac_ext <<EOF |
| 3712 | #line 3713 "configure" |
| 3713 | #include "confdefs.h" |
| 3714 | |
| 3715 | extern int strtoul(); |
| 3716 | int 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 | } |
| 3727 | EOF |
| 3728 | if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 3729 | then |
| 3730 | : |
| 3731 | else |
| 3732 | echo "configure: failed program was:" >&5 |
| 3733 | cat conftest.$ac_ext >&5 |
| 3734 | rm -fr conftest* |
| 3735 | tcl_ok=0 |
| 3736 | fi |
| 3737 | rm -fr conftest* |
| 3738 | fi |
| 3739 | |
| 3740 | if test "$tcl_ok" = 0; then |
| 3741 | test -n "$verbose" && echo " Adding strtoul.o." |
| 3742 | LIBOBJS="$LIBOBJS strtoul.o" |
| 3743 | fi |
| 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 | |
| 3750 | echo $ac_n "checking for strtod""... $ac_c" 1>&6 |
| 3751 | echo "configure:3752: checking for strtod" >&5 |
| 3752 | if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then |
| 3753 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3754 | else |
| 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. */ |
| 3764 | char strtod(); |
| 3765 | |
| 3766 | int 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) |
| 3772 | choke me |
| 3773 | #else |
| 3774 | strtod(); |
| 3775 | #endif |
| 3776 | |
| 3777 | ; return 0; } |
| 3778 | EOF |
| 3779 | if { (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" |
| 3782 | else |
| 3783 | echo "configure: failed program was:" >&5 |
| 3784 | cat conftest.$ac_ext >&5 |
| 3785 | rm -rf conftest* |
| 3786 | eval "ac_cv_func_strtod=no" |
| 3787 | fi |
| 3788 | rm -f conftest* |
| 3789 | fi |
| 3790 | |
| 3791 | if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then |
| 3792 | echo "$ac_t""yes" 1>&6 |
| 3793 | tcl_ok=1 |
| 3794 | else |
| 3795 | echo "$ac_t""no" 1>&6 |
| 3796 | tcl_ok=0 |
| 3797 | fi |
| 3798 | |
| 3799 | if test "$cross_compiling" = yes; then |
| 3800 | tcl_ok=0 |
| 3801 | else |
| 3802 | cat > conftest.$ac_ext <<EOF |
| 3803 | #line 3804 "configure" |
| 3804 | #include "confdefs.h" |
| 3805 | |
| 3806 | extern double strtod(); |
| 3807 | int 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 | } |
| 3818 | EOF |
| 3819 | if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 3820 | then |
| 3821 | : |
| 3822 | else |
| 3823 | echo "configure: failed program was:" >&5 |
| 3824 | cat conftest.$ac_ext >&5 |
| 3825 | rm -fr conftest* |
| 3826 | tcl_ok=0 |
| 3827 | fi |
| 3828 | rm -fr conftest* |
| 3829 | fi |
| 3830 | |
| 3831 | if test "$tcl_ok" = 0; then |
| 3832 | test -n "$verbose" && echo " Adding strtod.o." |
| 3833 | LIBOBJS="$LIBOBJS strtod.o" |
| 3834 | fi |
| 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 |
| 3845 | echo "configure:3846: checking for strtod" >&5 |
| 3846 | if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then |
| 3847 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3848 | else |
| 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. */ |
| 3858 | char strtod(); |
| 3859 | |
| 3860 | int 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) |
| 3866 | choke me |
| 3867 | #else |
| 3868 | strtod(); |
| 3869 | #endif |
| 3870 | |
| 3871 | ; return 0; } |
| 3872 | EOF |
| 3873 | if { (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" |
| 3876 | else |
| 3877 | echo "configure: failed program was:" >&5 |
| 3878 | cat conftest.$ac_ext >&5 |
| 3879 | rm -rf conftest* |
| 3880 | eval "ac_cv_func_strtod=no" |
| 3881 | fi |
| 3882 | rm -f conftest* |
| 3883 | fi |
| 3884 | |
| 3885 | if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then |
| 3886 | echo "$ac_t""yes" 1>&6 |
| 3887 | tcl_strtod=1 |
| 3888 | else |
| 3889 | echo "$ac_t""no" 1>&6 |
| 3890 | tcl_strtod=0 |
| 3891 | fi |
| 3892 | |
| 3893 | if test "$tcl_strtod" = 1; then |
| 3894 | echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 |
| 3895 | echo "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 |
| 3898 | else |
| 3899 | |
| 3900 | if test "$cross_compiling" = yes; then |
| 3901 | tcl_cv_strtod_buggy=0 |
| 3902 | else |
| 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 | } |
| 3926 | EOF |
| 3927 | if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 3928 | then |
| 3929 | tcl_cv_strtod_buggy=1 |
| 3930 | else |
| 3931 | echo "configure: failed program was:" >&5 |
| 3932 | cat conftest.$ac_ext >&5 |
| 3933 | rm -fr conftest* |
| 3934 | tcl_cv_strtod_buggy=0 |
| 3935 | fi |
| 3936 | rm -fr conftest* |
| 3937 | fi |
| 3938 | |
| 3939 | fi |
| 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 |
| 3948 | EOF |
| 3949 | |
| 3950 | fi |
| 3951 | fi |
| 3952 | |
| 3953 | |
| 3954 | #-------------------------------------------------------------------- |
| 3955 | # Check for various typedefs and provide substitutes if |
| 3956 | # they don't exist. |
| 3957 | #-------------------------------------------------------------------- |
| 3958 | |
| 3959 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
| 3960 | echo "configure:3961: checking for ANSI C header files" >&5 |
| 3961 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| 3962 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3963 | else |
| 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> |
| 3971 | EOF |
| 3972 | ac_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; } |
| 3974 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3975 | if test -z "$ac_err"; then |
| 3976 | rm -rf conftest* |
| 3977 | ac_cv_header_stdc=yes |
| 3978 | else |
| 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 |
| 3984 | fi |
| 3985 | rm -f conftest* |
| 3986 | |
| 3987 | if test $ac_cv_header_stdc = yes; then |
| 3988 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 3989 | cat > conftest.$ac_ext <<EOF |
| 3990 | #line 3991 "configure" |
| 3991 | #include "confdefs.h" |
| 3992 | #include <string.h> |
| 3993 | EOF |
| 3994 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3995 | egrep "memchr" >/dev/null 2>&1; then |
| 3996 | : |
| 3997 | else |
| 3998 | rm -rf conftest* |
| 3999 | ac_cv_header_stdc=no |
| 4000 | fi |
| 4001 | rm -f conftest* |
| 4002 | |
| 4003 | fi |
| 4004 | |
| 4005 | if test $ac_cv_header_stdc = yes; then |
| 4006 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 4007 | cat > conftest.$ac_ext <<EOF |
| 4008 | #line 4009 "configure" |
| 4009 | #include "confdefs.h" |
| 4010 | #include <stdlib.h> |
| 4011 | EOF |
| 4012 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4013 | egrep "free" >/dev/null 2>&1; then |
| 4014 | : |
| 4015 | else |
| 4016 | rm -rf conftest* |
| 4017 | ac_cv_header_stdc=no |
| 4018 | fi |
| 4019 | rm -f conftest* |
| 4020 | |
| 4021 | fi |
| 4022 | |
| 4023 | if test $ac_cv_header_stdc = yes; then |
| 4024 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 4025 | if test "$cross_compiling" = yes; then |
| 4026 | : |
| 4027 | else |
| 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))) |
| 4035 | int main () { int i; for (i = 0; i < 256; i++) |
| 4036 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 4037 | exit (0); } |
| 4038 | |
| 4039 | EOF |
| 4040 | if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 4041 | then |
| 4042 | : |
| 4043 | else |
| 4044 | echo "configure: failed program was:" >&5 |
| 4045 | cat conftest.$ac_ext >&5 |
| 4046 | rm -fr conftest* |
| 4047 | ac_cv_header_stdc=no |
| 4048 | fi |
| 4049 | rm -fr conftest* |
| 4050 | fi |
| 4051 | |
| 4052 | fi |
| 4053 | fi |
| 4054 | |
| 4055 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| 4056 | if test $ac_cv_header_stdc = yes; then |
| 4057 | cat >> confdefs.h <<\EOF |
| 4058 | #define STDC_HEADERS 1 |
| 4059 | EOF |
| 4060 | |
| 4061 | fi |
| 4062 | |
| 4063 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
| 4064 | echo "configure:4065: checking for mode_t" >&5 |
| 4065 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| 4066 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4067 | else |
| 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 |
| 4076 | EOF |
| 4077 | if (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 |
| 4081 | else |
| 4082 | rm -rf conftest* |
| 4083 | ac_cv_type_mode_t=no |
| 4084 | fi |
| 4085 | rm -f conftest* |
| 4086 | |
| 4087 | fi |
| 4088 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 4089 | if test $ac_cv_type_mode_t = no; then |
| 4090 | cat >> confdefs.h <<\EOF |
| 4091 | #define mode_t int |
| 4092 | EOF |
| 4093 | |
| 4094 | fi |
| 4095 | |
| 4096 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
| 4097 | echo "configure:4098: checking for pid_t" >&5 |
| 4098 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| 4099 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4100 | else |
| 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 |
| 4109 | EOF |
| 4110 | if (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 |
| 4114 | else |
| 4115 | rm -rf conftest* |
| 4116 | ac_cv_type_pid_t=no |
| 4117 | fi |
| 4118 | rm -f conftest* |
| 4119 | |
| 4120 | fi |
| 4121 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 4122 | if test $ac_cv_type_pid_t = no; then |
| 4123 | cat >> confdefs.h <<\EOF |
| 4124 | #define pid_t int |
| 4125 | EOF |
| 4126 | |
| 4127 | fi |
| 4128 | |
| 4129 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
| 4130 | echo "configure:4131: checking for size_t" >&5 |
| 4131 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| 4132 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4133 | else |
| 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 |
| 4142 | EOF |
| 4143 | if (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 |
| 4147 | else |
| 4148 | rm -rf conftest* |
| 4149 | ac_cv_type_size_t=no |
| 4150 | fi |
| 4151 | rm -f conftest* |
| 4152 | |
| 4153 | fi |
| 4154 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 4155 | if test $ac_cv_type_size_t = no; then |
| 4156 | cat >> confdefs.h <<\EOF |
| 4157 | #define size_t unsigned |
| 4158 | EOF |
| 4159 | |
| 4160 | fi |
| 4161 | |
| 4162 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
| 4163 | echo "configure:4164: checking for uid_t in sys/types.h" >&5 |
| 4164 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
| 4165 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4166 | else |
| 4167 | cat > conftest.$ac_ext <<EOF |
| 4168 | #line 4169 "configure" |
| 4169 | #include "confdefs.h" |
| 4170 | #include <sys/types.h> |
| 4171 | EOF |
| 4172 | if (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 |
| 4176 | else |
| 4177 | rm -rf conftest* |
| 4178 | ac_cv_type_uid_t=no |
| 4179 | fi |
| 4180 | rm -f conftest* |
| 4181 | |
| 4182 | fi |
| 4183 | |
| 4184 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
| 4185 | if test $ac_cv_type_uid_t = no; then |
| 4186 | cat >> confdefs.h <<\EOF |
| 4187 | #define uid_t int |
| 4188 | EOF |
| 4189 | |
| 4190 | cat >> confdefs.h <<\EOF |
| 4191 | #define gid_t int |
| 4192 | EOF |
| 4193 | |
| 4194 | fi |
| 4195 | |
| 4196 | |
| 4197 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
| 4198 | echo "configure:4199: checking for socklen_t" >&5 |
| 4199 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 4200 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4201 | else |
| 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 | |
| 4213 | EOF |
| 4214 | if (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 |
| 4218 | else |
| 4219 | rm -rf conftest* |
| 4220 | ac_cv_type_socklen_t=no |
| 4221 | fi |
| 4222 | rm -f conftest* |
| 4223 | |
| 4224 | fi |
| 4225 | |
| 4226 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 4227 | if test $ac_cv_type_socklen_t = no; then |
| 4228 | cat >> confdefs.h <<\EOF |
| 4229 | #define socklen_t unsigned |
| 4230 | EOF |
| 4231 | |
| 4232 | fi |
| 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 | |
| 4241 | echo $ac_n "checking for opendir""... $ac_c" 1>&6 |
| 4242 | echo "configure:4243: checking for opendir" >&5 |
| 4243 | if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then |
| 4244 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4245 | else |
| 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. */ |
| 4255 | char opendir(); |
| 4256 | |
| 4257 | int 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) |
| 4263 | choke me |
| 4264 | #else |
| 4265 | opendir(); |
| 4266 | #endif |
| 4267 | |
| 4268 | ; return 0; } |
| 4269 | EOF |
| 4270 | if { (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" |
| 4273 | else |
| 4274 | echo "configure: failed program was:" >&5 |
| 4275 | cat conftest.$ac_ext >&5 |
| 4276 | rm -rf conftest* |
| 4277 | eval "ac_cv_func_opendir=no" |
| 4278 | fi |
| 4279 | rm -f conftest* |
| 4280 | fi |
| 4281 | |
| 4282 | if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then |
| 4283 | echo "$ac_t""yes" 1>&6 |
| 4284 | : |
| 4285 | else |
| 4286 | echo "$ac_t""no" 1>&6 |
| 4287 | cat >> confdefs.h <<\EOF |
| 4288 | #define USE_DIRENT2_H 1 |
| 4289 | EOF |
| 4290 | |
| 4291 | fi |
| 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 | |
| 4302 | echo $ac_n "checking union wait""... $ac_c" 1>&6 |
| 4303 | echo "configure:4304: checking union wait" >&5 |
| 4304 | if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then |
| 4305 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4306 | else |
| 4307 | cat > conftest.$ac_ext <<EOF |
| 4308 | #line 4309 "configure" |
| 4309 | #include "confdefs.h" |
| 4310 | #include <sys/types.h> |
| 4311 | #include <sys/wait.h> |
| 4312 | int main() { |
| 4313 | |
| 4314 | union wait x; |
| 4315 | WIFEXITED(x); /* Generates compiler error if WIFEXITED |
| 4316 | * uses an int. */ |
| 4317 | |
| 4318 | ; return 0; } |
| 4319 | EOF |
| 4320 | if { (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 |
| 4323 | else |
| 4324 | echo "configure: failed program was:" >&5 |
| 4325 | cat conftest.$ac_ext >&5 |
| 4326 | rm -rf conftest* |
| 4327 | tcl_cv_union_wait=no |
| 4328 | fi |
| 4329 | rm -f conftest* |
| 4330 | fi |
| 4331 | |
| 4332 | echo "$ac_t""$tcl_cv_union_wait" 1>&6 |
| 4333 | if test $tcl_cv_union_wait = no; then |
| 4334 | cat >> confdefs.h <<\EOF |
| 4335 | #define NO_UNION_WAIT 1 |
| 4336 | EOF |
| 4337 | |
| 4338 | fi |
| 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 | |
| 4346 | echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 |
| 4347 | echo "configure:4348: checking for strncasecmp" >&5 |
| 4348 | if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then |
| 4349 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4350 | else |
| 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. */ |
| 4360 | char strncasecmp(); |
| 4361 | |
| 4362 | int 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) |
| 4368 | choke me |
| 4369 | #else |
| 4370 | strncasecmp(); |
| 4371 | #endif |
| 4372 | |
| 4373 | ; return 0; } |
| 4374 | EOF |
| 4375 | if { (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" |
| 4378 | else |
| 4379 | echo "configure: failed program was:" >&5 |
| 4380 | cat conftest.$ac_ext >&5 |
| 4381 | rm -rf conftest* |
| 4382 | eval "ac_cv_func_strncasecmp=no" |
| 4383 | fi |
| 4384 | rm -f conftest* |
| 4385 | fi |
| 4386 | |
| 4387 | if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then |
| 4388 | echo "$ac_t""yes" 1>&6 |
| 4389 | tcl_ok=1 |
| 4390 | else |
| 4391 | echo "$ac_t""no" 1>&6 |
| 4392 | tcl_ok=0 |
| 4393 | fi |
| 4394 | |
| 4395 | if test "$tcl_ok" = 0; then |
| 4396 | echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6 |
| 4397 | echo "configure:4398: checking for strncasecmp in -lsocket" >&5 |
| 4398 | ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'` |
| 4399 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4400 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4401 | else |
| 4402 | ac_save_LIBS="$LIBS" |
| 4403 | LIBS="-lsocket $LIBS" |
| 4404 | cat > 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. */ |
| 4410 | char strncasecmp(); |
| 4411 | |
| 4412 | int main() { |
| 4413 | strncasecmp() |
| 4414 | ; return 0; } |
| 4415 | EOF |
| 4416 | if { (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" |
| 4419 | else |
| 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" |
| 4424 | fi |
| 4425 | rm -f conftest* |
| 4426 | LIBS="$ac_save_LIBS" |
| 4427 | |
| 4428 | fi |
| 4429 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4430 | echo "$ac_t""yes" 1>&6 |
| 4431 | tcl_ok=1 |
| 4432 | else |
| 4433 | echo "$ac_t""no" 1>&6 |
| 4434 | tcl_ok=0 |
| 4435 | fi |
| 4436 | |
| 4437 | fi |
| 4438 | if test "$tcl_ok" = 0; then |
| 4439 | echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6 |
| 4440 | echo "configure:4441: checking for strncasecmp in -linet" >&5 |
| 4441 | ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'` |
| 4442 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4443 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4444 | else |
| 4445 | ac_save_LIBS="$LIBS" |
| 4446 | LIBS="-linet $LIBS" |
| 4447 | cat > 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. */ |
| 4453 | char strncasecmp(); |
| 4454 | |
| 4455 | int main() { |
| 4456 | strncasecmp() |
| 4457 | ; return 0; } |
| 4458 | EOF |
| 4459 | if { (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" |
| 4462 | else |
| 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" |
| 4467 | fi |
| 4468 | rm -f conftest* |
| 4469 | LIBS="$ac_save_LIBS" |
| 4470 | |
| 4471 | fi |
| 4472 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4473 | echo "$ac_t""yes" 1>&6 |
| 4474 | tcl_ok=1 |
| 4475 | else |
| 4476 | echo "$ac_t""no" 1>&6 |
| 4477 | tcl_ok=0 |
| 4478 | fi |
| 4479 | |
| 4480 | fi |
| 4481 | if test "$tcl_ok" = 0; then |
| 4482 | LIBOBJS="$LIBOBJS strncasecmp.o" |
| 4483 | fi |
| 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 | |
| 4496 | echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 |
| 4497 | echo "configure:4498: checking for BSDgettimeofday" >&5 |
| 4498 | if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then |
| 4499 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4500 | else |
| 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. */ |
| 4510 | char BSDgettimeofday(); |
| 4511 | |
| 4512 | int 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) |
| 4518 | choke me |
| 4519 | #else |
| 4520 | BSDgettimeofday(); |
| 4521 | #endif |
| 4522 | |
| 4523 | ; return 0; } |
| 4524 | EOF |
| 4525 | if { (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" |
| 4528 | else |
| 4529 | echo "configure: failed program was:" >&5 |
| 4530 | cat conftest.$ac_ext >&5 |
| 4531 | rm -rf conftest* |
| 4532 | eval "ac_cv_func_BSDgettimeofday=no" |
| 4533 | fi |
| 4534 | rm -f conftest* |
| 4535 | fi |
| 4536 | |
| 4537 | if 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 |
| 4541 | EOF |
| 4542 | |
| 4543 | else |
| 4544 | echo "$ac_t""no" 1>&6 |
| 4545 | |
| 4546 | echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 |
| 4547 | echo "configure:4548: checking for gettimeofday" >&5 |
| 4548 | if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then |
| 4549 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4550 | else |
| 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. */ |
| 4560 | char gettimeofday(); |
| 4561 | |
| 4562 | int 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) |
| 4568 | choke me |
| 4569 | #else |
| 4570 | gettimeofday(); |
| 4571 | #endif |
| 4572 | |
| 4573 | ; return 0; } |
| 4574 | EOF |
| 4575 | if { (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" |
| 4578 | else |
| 4579 | echo "configure: failed program was:" >&5 |
| 4580 | cat conftest.$ac_ext >&5 |
| 4581 | rm -rf conftest* |
| 4582 | eval "ac_cv_func_gettimeofday=no" |
| 4583 | fi |
| 4584 | rm -f conftest* |
| 4585 | fi |
| 4586 | |
| 4587 | if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then |
| 4588 | echo "$ac_t""yes" 1>&6 |
| 4589 | : |
| 4590 | else |
| 4591 | echo "$ac_t""no" 1>&6 |
| 4592 | cat >> confdefs.h <<\EOF |
| 4593 | #define NO_GETTOD 1 |
| 4594 | EOF |
| 4595 | |
| 4596 | fi |
| 4597 | |
| 4598 | |
| 4599 | fi |
| 4600 | |
| 4601 | echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 |
| 4602 | echo "configure:4603: checking for gettimeofday declaration" >&5 |
| 4603 | if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then |
| 4604 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4605 | else |
| 4606 | cat > conftest.$ac_ext <<EOF |
| 4607 | #line 4608 "configure" |
| 4608 | #include "confdefs.h" |
| 4609 | #include <sys/time.h> |
| 4610 | EOF |
| 4611 | if (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 |
| 4615 | else |
| 4616 | rm -rf conftest* |
| 4617 | tcl_cv_grep_gettimeofday=missing |
| 4618 | fi |
| 4619 | rm -f conftest* |
| 4620 | |
| 4621 | fi |
| 4622 | |
| 4623 | echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6 |
| 4624 | if test $tcl_cv_grep_gettimeofday = missing ; then |
| 4625 | cat >> confdefs.h <<\EOF |
| 4626 | #define GETTOD_NOT_DECLARED 1 |
| 4627 | EOF |
| 4628 | |
| 4629 | fi |
| 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 | |
| 4637 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
| 4638 | echo "configure:4639: checking whether char is unsigned" >&5 |
| 4639 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 4640 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4641 | else |
| 4642 | if test "$GCC" = yes; then |
| 4643 | # GCC predefines this symbol on systems where it applies. |
| 4644 | cat > conftest.$ac_ext <<EOF |
| 4645 | #line 4646 "configure" |
| 4646 | #include "confdefs.h" |
| 4647 | #ifdef __CHAR_UNSIGNED__ |
| 4648 | yes |
| 4649 | #endif |
| 4650 | |
| 4651 | EOF |
| 4652 | if (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 |
| 4656 | else |
| 4657 | rm -rf conftest* |
| 4658 | ac_cv_c_char_unsigned=no |
| 4659 | fi |
| 4660 | rm -f conftest* |
| 4661 | |
| 4662 | else |
| 4663 | if test "$cross_compiling" = yes; then |
| 4664 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 4665 | else |
| 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 |
| 4673 | main() { |
| 4674 | volatile char c = 255; exit(c < 0); |
| 4675 | } |
| 4676 | EOF |
| 4677 | if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 4678 | then |
| 4679 | ac_cv_c_char_unsigned=yes |
| 4680 | else |
| 4681 | echo "configure: failed program was:" >&5 |
| 4682 | cat conftest.$ac_ext >&5 |
| 4683 | rm -fr conftest* |
| 4684 | ac_cv_c_char_unsigned=no |
| 4685 | fi |
| 4686 | rm -fr conftest* |
| 4687 | fi |
| 4688 | |
| 4689 | fi |
| 4690 | fi |
| 4691 | |
| 4692 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
| 4693 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 4694 | cat >> confdefs.h <<\EOF |
| 4695 | #define __CHAR_UNSIGNED__ 1 |
| 4696 | EOF |
| 4697 | |
| 4698 | fi |
| 4699 | |
| 4700 | echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 |
| 4701 | echo "configure:4702: checking signed char declarations" >&5 |
| 4702 | if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then |
| 4703 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4704 | else |
| 4705 | cat > conftest.$ac_ext <<EOF |
| 4706 | #line 4707 "configure" |
| 4707 | #include "confdefs.h" |
| 4708 | |
| 4709 | int main() { |
| 4710 | |
| 4711 | signed char *p; |
| 4712 | p = 0; |
| 4713 | |
| 4714 | ; return 0; } |
| 4715 | EOF |
| 4716 | if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 4717 | rm -rf conftest* |
| 4718 | tcl_cv_char_signed=yes |
| 4719 | else |
| 4720 | echo "configure: failed program was:" >&5 |
| 4721 | cat conftest.$ac_ext >&5 |
| 4722 | rm -rf conftest* |
| 4723 | tcl_cv_char_signed=no |
| 4724 | fi |
| 4725 | rm -f conftest* |
| 4726 | fi |
| 4727 | |
| 4728 | echo "$ac_t""$tcl_cv_char_signed" 1>&6 |
| 4729 | if test $tcl_cv_char_signed = yes; then |
| 4730 | cat >> confdefs.h <<\EOF |
| 4731 | #define HAVE_SIGNED_CHAR 1 |
| 4732 | EOF |
| 4733 | |
| 4734 | fi |
| 4735 | |
| 4736 | #-------------------------------------------------------------------- |
| 4737 | # Does putenv() copy or not? We need to know to avoid memory leaks. |
| 4738 | #-------------------------------------------------------------------- |
| 4739 | |
| 4740 | echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6 |
| 4741 | echo "configure:4742: checking for a putenv() that copies the buffer" >&5 |
| 4742 | if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then |
| 4743 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4744 | else |
| 4745 | if test "$cross_compiling" = yes; then |
| 4746 | tcl_cv_putenv_copy=no |
| 4747 | else |
| 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 | |
| 4770 | EOF |
| 4771 | if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 4772 | then |
| 4773 | tcl_cv_putenv_copy=no |
| 4774 | else |
| 4775 | echo "configure: failed program was:" >&5 |
| 4776 | cat conftest.$ac_ext >&5 |
| 4777 | rm -fr conftest* |
| 4778 | tcl_cv_putenv_copy=yes |
| 4779 | fi |
| 4780 | rm -fr conftest* |
| 4781 | fi |
| 4782 | |
| 4783 | |
| 4784 | fi |
| 4785 | |
| 4786 | echo "$ac_t""$tcl_cv_putenv_copy" 1>&6 |
| 4787 | if test $tcl_cv_putenv_copy = yes; then |
| 4788 | cat >> confdefs.h <<\EOF |
| 4789 | #define HAVE_PUTENV_THAT_COPIES 1 |
| 4790 | EOF |
| 4791 | |
| 4792 | fi |
| 4793 | |
| 4794 | #-------------------------------------------------------------------- |
| 4795 | # Check for support of nl_langinfo function |
| 4796 | #-------------------------------------------------------------------- |
| 4797 | |
| 4798 | |
| 4799 | # Check whether --enable-langinfo or --disable-langinfo was given. |
| 4800 | if test "${enable_langinfo+set}" = set; then |
| 4801 | enableval="$enable_langinfo" |
| 4802 | langinfo_ok=$enableval |
| 4803 | else |
| 4804 | langinfo_ok=yes |
| 4805 | fi |
| 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_%'` |
| 4812 | echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6 |
| 4813 | echo "configure:4814: checking for langinfo.h" >&5 |
| 4814 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 4815 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4816 | else |
| 4817 | cat > conftest.$ac_ext <<EOF |
| 4818 | #line 4819 "configure" |
| 4819 | #include "confdefs.h" |
| 4820 | #include <langinfo.h> |
| 4821 | EOF |
| 4822 | ac_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; } |
| 4824 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 4825 | if test -z "$ac_err"; then |
| 4826 | rm -rf conftest* |
| 4827 | eval "ac_cv_header_$ac_safe=yes" |
| 4828 | else |
| 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" |
| 4834 | fi |
| 4835 | rm -f conftest* |
| 4836 | fi |
| 4837 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 4838 | echo "$ac_t""yes" 1>&6 |
| 4839 | langinfo_ok=yes |
| 4840 | else |
| 4841 | echo "$ac_t""no" 1>&6 |
| 4842 | langinfo_ok=no |
| 4843 | fi |
| 4844 | |
| 4845 | fi |
| 4846 | fi |
| 4847 | echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6 |
| 4848 | echo "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> |
| 4854 | int main() { |
| 4855 | nl_langinfo(CODESET); |
| 4856 | ; return 0; } |
| 4857 | EOF |
| 4858 | if { (eval echo configure:4859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 4859 | rm -rf conftest* |
| 4860 | langinfo_ok=yes |
| 4861 | else |
| 4862 | echo "configure: failed program was:" >&5 |
| 4863 | cat conftest.$ac_ext >&5 |
| 4864 | rm -rf conftest* |
| 4865 | langinfo_ok=no |
| 4866 | fi |
| 4867 | rm -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 |
| 4874 | EOF |
| 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 |
| 4894 | echo "configure:4895: checking for sin" >&5 |
| 4895 | if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then |
| 4896 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4897 | else |
| 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. */ |
| 4907 | char sin(); |
| 4908 | |
| 4909 | int 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) |
| 4915 | choke me |
| 4916 | #else |
| 4917 | sin(); |
| 4918 | #endif |
| 4919 | |
| 4920 | ; return 0; } |
| 4921 | EOF |
| 4922 | if { (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" |
| 4925 | else |
| 4926 | echo "configure: failed program was:" >&5 |
| 4927 | cat conftest.$ac_ext >&5 |
| 4928 | rm -rf conftest* |
| 4929 | eval "ac_cv_func_sin=no" |
| 4930 | fi |
| 4931 | rm -f conftest* |
| 4932 | fi |
| 4933 | |
| 4934 | if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then |
| 4935 | echo "$ac_t""yes" 1>&6 |
| 4936 | MATH_LIBS="" |
| 4937 | else |
| 4938 | echo "$ac_t""no" 1>&6 |
| 4939 | MATH_LIBS="-lm" |
| 4940 | fi |
| 4941 | |
| 4942 | echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 |
| 4943 | echo "configure:4944: checking for main in -lieee" >&5 |
| 4944 | ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` |
| 4945 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4946 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4947 | else |
| 4948 | ac_save_LIBS="$LIBS" |
| 4949 | LIBS="-lieee $LIBS" |
| 4950 | cat > conftest.$ac_ext <<EOF |
| 4951 | #line 4952 "configure" |
| 4952 | #include "confdefs.h" |
| 4953 | |
| 4954 | int main() { |
| 4955 | main() |
| 4956 | ; return 0; } |
| 4957 | EOF |
| 4958 | if { (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" |
| 4961 | else |
| 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" |
| 4966 | fi |
| 4967 | rm -f conftest* |
| 4968 | LIBS="$ac_save_LIBS" |
| 4969 | |
| 4970 | fi |
| 4971 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4972 | echo "$ac_t""yes" 1>&6 |
| 4973 | MATH_LIBS="-lieee $MATH_LIBS" |
| 4974 | else |
| 4975 | echo "$ac_t""no" 1>&6 |
| 4976 | fi |
| 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 |
| 4985 | echo "configure:4986: checking for main in -linet" >&5 |
| 4986 | ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'` |
| 4987 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4988 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4989 | else |
| 4990 | ac_save_LIBS="$LIBS" |
| 4991 | LIBS="-linet $LIBS" |
| 4992 | cat > conftest.$ac_ext <<EOF |
| 4993 | #line 4994 "configure" |
| 4994 | #include "confdefs.h" |
| 4995 | |
| 4996 | int main() { |
| 4997 | main() |
| 4998 | ; return 0; } |
| 4999 | EOF |
| 5000 | if { (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" |
| 5003 | else |
| 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" |
| 5008 | fi |
| 5009 | rm -f conftest* |
| 5010 | LIBS="$ac_save_LIBS" |
| 5011 | |
| 5012 | fi |
| 5013 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5014 | echo "$ac_t""yes" 1>&6 |
| 5015 | LIBS="$LIBS -linet" |
| 5016 | else |
| 5017 | echo "$ac_t""no" 1>&6 |
| 5018 | fi |
| 5019 | |
| 5020 | ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'` |
| 5021 | echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6 |
| 5022 | echo "configure:5023: checking for net/errno.h" >&5 |
| 5023 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 5024 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5025 | else |
| 5026 | cat > conftest.$ac_ext <<EOF |
| 5027 | #line 5028 "configure" |
| 5028 | #include "confdefs.h" |
| 5029 | #include <net/errno.h> |
| 5030 | EOF |
| 5031 | ac_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; } |
| 5033 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 5034 | if test -z "$ac_err"; then |
| 5035 | rm -rf conftest* |
| 5036 | eval "ac_cv_header_$ac_safe=yes" |
| 5037 | else |
| 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" |
| 5043 | fi |
| 5044 | rm -f conftest* |
| 5045 | fi |
| 5046 | if 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 |
| 5050 | EOF |
| 5051 | |
| 5052 | else |
| 5053 | echo "$ac_t""no" 1>&6 |
| 5054 | fi |
| 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 |
| 5077 | echo "configure:5078: checking for connect" >&5 |
| 5078 | if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then |
| 5079 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5080 | else |
| 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. */ |
| 5090 | char connect(); |
| 5091 | |
| 5092 | int 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) |
| 5098 | choke me |
| 5099 | #else |
| 5100 | connect(); |
| 5101 | #endif |
| 5102 | |
| 5103 | ; return 0; } |
| 5104 | EOF |
| 5105 | if { (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" |
| 5108 | else |
| 5109 | echo "configure: failed program was:" >&5 |
| 5110 | cat conftest.$ac_ext >&5 |
| 5111 | rm -rf conftest* |
| 5112 | eval "ac_cv_func_connect=no" |
| 5113 | fi |
| 5114 | rm -f conftest* |
| 5115 | fi |
| 5116 | |
| 5117 | if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then |
| 5118 | echo "$ac_t""yes" 1>&6 |
| 5119 | tcl_checkSocket=0 |
| 5120 | else |
| 5121 | echo "$ac_t""no" 1>&6 |
| 5122 | tcl_checkSocket=1 |
| 5123 | fi |
| 5124 | |
| 5125 | if test "$tcl_checkSocket" = 1; then |
| 5126 | echo $ac_n "checking for setsockopt""... $ac_c" 1>&6 |
| 5127 | echo "configure:5128: checking for setsockopt" >&5 |
| 5128 | if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then |
| 5129 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5130 | else |
| 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. */ |
| 5140 | char setsockopt(); |
| 5141 | |
| 5142 | int 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) |
| 5148 | choke me |
| 5149 | #else |
| 5150 | setsockopt(); |
| 5151 | #endif |
| 5152 | |
| 5153 | ; return 0; } |
| 5154 | EOF |
| 5155 | if { (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" |
| 5158 | else |
| 5159 | echo "configure: failed program was:" >&5 |
| 5160 | cat conftest.$ac_ext >&5 |
| 5161 | rm -rf conftest* |
| 5162 | eval "ac_cv_func_setsockopt=no" |
| 5163 | fi |
| 5164 | rm -f conftest* |
| 5165 | fi |
| 5166 | |
| 5167 | if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then |
| 5168 | echo "$ac_t""yes" 1>&6 |
| 5169 | : |
| 5170 | else |
| 5171 | echo "$ac_t""no" 1>&6 |
| 5172 | echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6 |
| 5173 | echo "configure:5174: checking for setsockopt in -lsocket" >&5 |
| 5174 | ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'` |
| 5175 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5176 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5177 | else |
| 5178 | ac_save_LIBS="$LIBS" |
| 5179 | LIBS="-lsocket $LIBS" |
| 5180 | cat > 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. */ |
| 5186 | char setsockopt(); |
| 5187 | |
| 5188 | int main() { |
| 5189 | setsockopt() |
| 5190 | ; return 0; } |
| 5191 | EOF |
| 5192 | if { (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" |
| 5195 | else |
| 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" |
| 5200 | fi |
| 5201 | rm -f conftest* |
| 5202 | LIBS="$ac_save_LIBS" |
| 5203 | |
| 5204 | fi |
| 5205 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5206 | echo "$ac_t""yes" 1>&6 |
| 5207 | LIBS="$LIBS -lsocket" |
| 5208 | else |
| 5209 | echo "$ac_t""no" 1>&6 |
| 5210 | tcl_checkBoth=1 |
| 5211 | fi |
| 5212 | |
| 5213 | fi |
| 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 |
| 5220 | echo "configure:5221: checking for accept" >&5 |
| 5221 | if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then |
| 5222 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5223 | else |
| 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. */ |
| 5233 | char accept(); |
| 5234 | |
| 5235 | int 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) |
| 5241 | choke me |
| 5242 | #else |
| 5243 | accept(); |
| 5244 | #endif |
| 5245 | |
| 5246 | ; return 0; } |
| 5247 | EOF |
| 5248 | if { (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" |
| 5251 | else |
| 5252 | echo "configure: failed program was:" >&5 |
| 5253 | cat conftest.$ac_ext >&5 |
| 5254 | rm -rf conftest* |
| 5255 | eval "ac_cv_func_accept=no" |
| 5256 | fi |
| 5257 | rm -f conftest* |
| 5258 | fi |
| 5259 | |
| 5260 | if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then |
| 5261 | echo "$ac_t""yes" 1>&6 |
| 5262 | tcl_checkNsl=0 |
| 5263 | else |
| 5264 | echo "$ac_t""no" 1>&6 |
| 5265 | LIBS=$tk_oldLibs |
| 5266 | fi |
| 5267 | |
| 5268 | fi |
| 5269 | echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 |
| 5270 | echo "configure:5271: checking for gethostbyname" >&5 |
| 5271 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then |
| 5272 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5273 | else |
| 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. */ |
| 5283 | char gethostbyname(); |
| 5284 | |
| 5285 | int 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) |
| 5291 | choke me |
| 5292 | #else |
| 5293 | gethostbyname(); |
| 5294 | #endif |
| 5295 | |
| 5296 | ; return 0; } |
| 5297 | EOF |
| 5298 | if { (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" |
| 5301 | else |
| 5302 | echo "configure: failed program was:" >&5 |
| 5303 | cat conftest.$ac_ext >&5 |
| 5304 | rm -rf conftest* |
| 5305 | eval "ac_cv_func_gethostbyname=no" |
| 5306 | fi |
| 5307 | rm -f conftest* |
| 5308 | fi |
| 5309 | |
| 5310 | if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then |
| 5311 | echo "$ac_t""yes" 1>&6 |
| 5312 | : |
| 5313 | else |
| 5314 | echo "$ac_t""no" 1>&6 |
| 5315 | echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 |
| 5316 | echo "configure:5317: checking for gethostbyname in -lnsl" >&5 |
| 5317 | ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` |
| 5318 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5319 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5320 | else |
| 5321 | ac_save_LIBS="$LIBS" |
| 5322 | LIBS="-lnsl $LIBS" |
| 5323 | cat > 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. */ |
| 5329 | char gethostbyname(); |
| 5330 | |
| 5331 | int main() { |
| 5332 | gethostbyname() |
| 5333 | ; return 0; } |
| 5334 | EOF |
| 5335 | if { (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" |
| 5338 | else |
| 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" |
| 5343 | fi |
| 5344 | rm -f conftest* |
| 5345 | LIBS="$ac_save_LIBS" |
| 5346 | |
| 5347 | fi |
| 5348 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5349 | echo "$ac_t""yes" 1>&6 |
| 5350 | LIBS="$LIBS -lnsl" |
| 5351 | else |
| 5352 | echo "$ac_t""no" 1>&6 |
| 5353 | fi |
| 5354 | |
| 5355 | fi |
| 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 | |
| 5368 | LIBS="$LIBS$THREADS_LIBS" |
| 5369 | |
| 5370 | |
| 5371 | echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 |
| 5372 | echo "configure:5373: checking how to build libraries" >&5 |
| 5373 | # Check whether --enable-shared or --disable-shared was given. |
| 5374 | if test "${enable_shared+set}" = set; then |
| 5375 | enableval="$enable_shared" |
| 5376 | tcl_ok=$enableval |
| 5377 | else |
| 5378 | tcl_ok=yes |
| 5379 | fi |
| 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 |
| 5397 | EOF |
| 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. |
| 5409 | set dummy ranlib; ac_word=$2 |
| 5410 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 5411 | echo "configure:5412: checking for $ac_word" >&5 |
| 5412 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| 5413 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5414 | else |
| 5415 | if test -n "$RANLIB"; then |
| 5416 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 5417 | else |
| 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=":" |
| 5429 | fi |
| 5430 | fi |
| 5431 | RANLIB="$ac_cv_prog_RANLIB" |
| 5432 | if test -n "$RANLIB"; then |
| 5433 | echo "$ac_t""$RANLIB" 1>&6 |
| 5434 | else |
| 5435 | echo "$ac_t""no" 1>&6 |
| 5436 | fi |
| 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 |
| 5443 | echo "configure:5444: checking if 64bit support is requested" >&5 |
| 5444 | # Check whether --enable-64bit or --disable-64bit was given. |
| 5445 | if test "${enable_64bit+set}" = set; then |
| 5446 | enableval="$enable_64bit" |
| 5447 | : |
| 5448 | else |
| 5449 | enableval="no" |
| 5450 | fi |
| 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 |
| 5463 | echo "configure:5464: checking if 64bit Sparc VIS support is requested" >&5 |
| 5464 | # Check whether --enable-64bit-vis or --disable-64bit-vis was given. |
| 5465 | if test "${enable_64bit_vis+set}" = set; then |
| 5466 | enableval="$enable_64bit_vis" |
| 5467 | : |
| 5468 | else |
| 5469 | enableval="no" |
| 5470 | fi |
| 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 |
| 5487 | echo "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 |
| 5513 | echo "configure:5514: checking for dlopen in -ldl" >&5 |
| 5514 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
| 5515 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5516 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5517 | else |
| 5518 | ac_save_LIBS="$LIBS" |
| 5519 | LIBS="-ldl $LIBS" |
| 5520 | cat > 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. */ |
| 5526 | char dlopen(); |
| 5527 | |
| 5528 | int main() { |
| 5529 | dlopen() |
| 5530 | ; return 0; } |
| 5531 | EOF |
| 5532 | if { (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" |
| 5535 | else |
| 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" |
| 5540 | fi |
| 5541 | rm -f conftest* |
| 5542 | LIBS="$ac_save_LIBS" |
| 5543 | |
| 5544 | fi |
| 5545 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5546 | echo "$ac_t""yes" 1>&6 |
| 5547 | have_dl=yes |
| 5548 | else |
| 5549 | echo "$ac_t""no" 1>&6 |
| 5550 | have_dl=no |
| 5551 | fi |
| 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. |
| 5578 | set dummy ar; ac_word=$2 |
| 5579 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 5580 | echo "configure:5581: checking for $ac_word" >&5 |
| 5581 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| 5582 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5583 | else |
| 5584 | if test -n "$AR"; then |
| 5585 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 5586 | else |
| 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" |
| 5597 | fi |
| 5598 | fi |
| 5599 | AR="$ac_cv_prog_AR" |
| 5600 | if test -n "$AR"; then |
| 5601 | echo "$ac_t""$AR" 1>&6 |
| 5602 | else |
| 5603 | echo "$ac_t""no" 1>&6 |
| 5604 | fi |
| 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 |
| 5723 | echo "configure:5724: checking for gettimeofday in -lbsd" >&5 |
| 5724 | ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` |
| 5725 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5726 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5727 | else |
| 5728 | ac_save_LIBS="$LIBS" |
| 5729 | LIBS="-lbsd $LIBS" |
| 5730 | cat > 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. */ |
| 5736 | char gettimeofday(); |
| 5737 | |
| 5738 | int main() { |
| 5739 | gettimeofday() |
| 5740 | ; return 0; } |
| 5741 | EOF |
| 5742 | if { (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" |
| 5745 | else |
| 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" |
| 5750 | fi |
| 5751 | rm -f conftest* |
| 5752 | LIBS="$ac_save_LIBS" |
| 5753 | |
| 5754 | fi |
| 5755 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5756 | echo "$ac_t""yes" 1>&6 |
| 5757 | libbsd=yes |
| 5758 | else |
| 5759 | echo "$ac_t""no" 1>&6 |
| 5760 | libbsd=no |
| 5761 | fi |
| 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 |
| 5767 | EOF |
| 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 |
| 5808 | EOF |
| 5809 | # Use the XOPEN network library |
| 5810 | cat >> confdefs.h <<\EOF |
| 5811 | #define _XOPEN_SOURCE_EXTENDED 1 |
| 5812 | EOF |
| 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 |
| 5818 | echo "configure:5819: checking for shl_load in -ldld" >&5 |
| 5819 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 5820 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5821 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5822 | else |
| 5823 | ac_save_LIBS="$LIBS" |
| 5824 | LIBS="-ldld $LIBS" |
| 5825 | cat > 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. */ |
| 5831 | char shl_load(); |
| 5832 | |
| 5833 | int main() { |
| 5834 | shl_load() |
| 5835 | ; return 0; } |
| 5836 | EOF |
| 5837 | if { (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" |
| 5840 | else |
| 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" |
| 5845 | fi |
| 5846 | rm -f conftest* |
| 5847 | LIBS="$ac_save_LIBS" |
| 5848 | |
| 5849 | fi |
| 5850 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5851 | echo "$ac_t""yes" 1>&6 |
| 5852 | tcl_ok=yes |
| 5853 | else |
| 5854 | echo "$ac_t""no" 1>&6 |
| 5855 | tcl_ok=no |
| 5856 | fi |
| 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 |
| 5905 | echo "configure:5906: checking for shl_load in -ldld" >&5 |
| 5906 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 5907 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5908 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5909 | else |
| 5910 | ac_save_LIBS="$LIBS" |
| 5911 | LIBS="-ldld $LIBS" |
| 5912 | cat > 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. */ |
| 5918 | char shl_load(); |
| 5919 | |
| 5920 | int main() { |
| 5921 | shl_load() |
| 5922 | ; return 0; } |
| 5923 | EOF |
| 5924 | if { (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" |
| 5927 | else |
| 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" |
| 5932 | fi |
| 5933 | rm -f conftest* |
| 5934 | LIBS="$ac_save_LIBS" |
| 5935 | |
| 5936 | fi |
| 5937 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5938 | echo "$ac_t""yes" 1>&6 |
| 5939 | tcl_ok=yes |
| 5940 | else |
| 5941 | echo "$ac_t""no" 1>&6 |
| 5942 | tcl_ok=no |
| 5943 | fi |
| 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_%'` |
| 6050 | echo $ac_n "checking for dld.h""... $ac_c" 1>&6 |
| 6051 | echo "configure:6052: checking for dld.h" >&5 |
| 6052 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 6053 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6054 | else |
| 6055 | cat > conftest.$ac_ext <<EOF |
| 6056 | #line 6057 "configure" |
| 6057 | #include "confdefs.h" |
| 6058 | #include <dld.h> |
| 6059 | EOF |
| 6060 | ac_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; } |
| 6062 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6063 | if test -z "$ac_err"; then |
| 6064 | rm -rf conftest* |
| 6065 | eval "ac_cv_header_$ac_safe=yes" |
| 6066 | else |
| 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" |
| 6072 | fi |
| 6073 | rm -f conftest* |
| 6074 | fi |
| 6075 | if 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="" |
| 6084 | else |
| 6085 | echo "$ac_t""no" 1>&6 |
| 6086 | fi |
| 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 |
| 6107 | EOF |
| 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_%'` |
| 6125 | echo $ac_n "checking for dld.h""... $ac_c" 1>&6 |
| 6126 | echo "configure:6127: checking for dld.h" >&5 |
| 6127 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 6128 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6129 | else |
| 6130 | cat > conftest.$ac_ext <<EOF |
| 6131 | #line 6132 "configure" |
| 6132 | #include "confdefs.h" |
| 6133 | #include <dld.h> |
| 6134 | EOF |
| 6135 | ac_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; } |
| 6137 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6138 | if test -z "$ac_err"; then |
| 6139 | rm -rf conftest* |
| 6140 | eval "ac_cv_header_$ac_safe=yes" |
| 6141 | else |
| 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" |
| 6147 | fi |
| 6148 | rm -f conftest* |
| 6149 | fi |
| 6150 | if 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="" |
| 6159 | else |
| 6160 | echo "$ac_t""no" 1>&6 |
| 6161 | fi |
| 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_%'` |
| 6193 | echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 |
| 6194 | echo "configure:6195: checking for dlfcn.h" >&5 |
| 6195 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 6196 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6197 | else |
| 6198 | cat > conftest.$ac_ext <<EOF |
| 6199 | #line 6200 "configure" |
| 6200 | #include "confdefs.h" |
| 6201 | #include <dlfcn.h> |
| 6202 | EOF |
| 6203 | ac_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; } |
| 6205 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6206 | if test -z "$ac_err"; then |
| 6207 | rm -rf conftest* |
| 6208 | eval "ac_cv_header_$ac_safe=yes" |
| 6209 | else |
| 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" |
| 6215 | fi |
| 6216 | rm -f conftest* |
| 6217 | fi |
| 6218 | if 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 |
| 6232 | echo "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 | |
| 6241 | EOF |
| 6242 | if (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' |
| 6247 | else |
| 6248 | rm -rf conftest* |
| 6249 | echo "$ac_t""no" 1>&6 |
| 6250 | SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' |
| 6251 | |
| 6252 | fi |
| 6253 | rm -f conftest* |
| 6254 | |
| 6255 | |
| 6256 | else |
| 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 | |
| 6270 | fi |
| 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 |
| 6339 | EOF |
| 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 |
| 6487 | EOF |
| 6488 | |
| 6489 | cat >> confdefs.h <<\EOF |
| 6490 | #define _POSIX_PTHREAD_SEMANTICS 1 |
| 6491 | EOF |
| 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 |
| 6521 | EOF |
| 6522 | |
| 6523 | cat >> confdefs.h <<\EOF |
| 6524 | #define _POSIX_PTHREAD_SEMANTICS 1 |
| 6525 | EOF |
| 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 |
| 6594 | echo "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 | |
| 6600 | int main() { |
| 6601 | int i; |
| 6602 | ; return 0; } |
| 6603 | EOF |
| 6604 | if { (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 |
| 6607 | else |
| 6608 | echo "configure: failed program was:" >&5 |
| 6609 | cat conftest.$ac_ext >&5 |
| 6610 | rm -rf conftest* |
| 6611 | found=no |
| 6612 | fi |
| 6613 | rm -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 |
| 6651 | echo "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> |
| 6656 | int 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; } |
| 6670 | EOF |
| 6671 | if { (eval echo configure:6672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 6672 | rm -rf conftest* |
| 6673 | tcl_ok=usable |
| 6674 | else |
| 6675 | echo "configure: failed program was:" >&5 |
| 6676 | cat conftest.$ac_ext >&5 |
| 6677 | rm -rf conftest* |
| 6678 | tcl_ok=unusable |
| 6679 | fi |
| 6680 | rm -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 |
| 6685 | EOF |
| 6686 | |
| 6687 | else |
| 6688 | echo $ac_n "checking a.out.h""... $ac_c" 1>&6 |
| 6689 | echo "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> |
| 6694 | int 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; } |
| 6708 | EOF |
| 6709 | if { (eval echo configure:6710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 6710 | rm -rf conftest* |
| 6711 | tcl_ok=usable |
| 6712 | else |
| 6713 | echo "configure: failed program was:" >&5 |
| 6714 | cat conftest.$ac_ext >&5 |
| 6715 | rm -rf conftest* |
| 6716 | tcl_ok=unusable |
| 6717 | fi |
| 6718 | rm -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 |
| 6723 | EOF |
| 6724 | |
| 6725 | else |
| 6726 | echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 |
| 6727 | echo "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> |
| 6732 | int 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; } |
| 6746 | EOF |
| 6747 | if { (eval echo configure:6748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 6748 | rm -rf conftest* |
| 6749 | tcl_ok=usable |
| 6750 | else |
| 6751 | echo "configure: failed program was:" >&5 |
| 6752 | cat conftest.$ac_ext >&5 |
| 6753 | rm -rf conftest* |
| 6754 | tcl_ok=unusable |
| 6755 | fi |
| 6756 | rm -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 |
| 6761 | EOF |
| 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. |
| 6773 | if test "${enable_load+set}" = set; then |
| 6774 | enableval="$enable_load" |
| 6775 | tcl_ok=$enableval |
| 6776 | else |
| 6777 | tcl_ok=yes |
| 6778 | fi |
| 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 |
| 6899 | echo "configure:6900: checking for build with symbols" >&5 |
| 6900 | # Check whether --enable-symbols or --disable-symbols was given. |
| 6901 | if test "${enable_symbols+set}" = set; then |
| 6902 | enableval="$enable_symbols" |
| 6903 | tcl_ok=$enableval |
| 6904 | else |
| 6905 | tcl_ok=no |
| 6906 | fi |
| 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 |
| 6928 | EOF |
| 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 |
| 6935 | EOF |
| 6936 | |
| 6937 | cat >> confdefs.h <<\EOF |
| 6938 | #define TCL_COMPILE_STATS 1 |
| 6939 | EOF |
| 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 | |
| 6952 | TCL_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 |
| 6963 | do |
| 6964 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 6965 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 6966 | echo "configure:6967: checking for $ac_hdr" >&5 |
| 6967 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 6968 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6969 | else |
| 6970 | cat > conftest.$ac_ext <<EOF |
| 6971 | #line 6972 "configure" |
| 6972 | #include "confdefs.h" |
| 6973 | #include <$ac_hdr> |
| 6974 | EOF |
| 6975 | ac_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; } |
| 6977 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6978 | if test -z "$ac_err"; then |
| 6979 | rm -rf conftest* |
| 6980 | eval "ac_cv_header_$ac_safe=yes" |
| 6981 | else |
| 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" |
| 6987 | fi |
| 6988 | rm -f conftest* |
| 6989 | fi |
| 6990 | if 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 |
| 6995 | EOF |
| 6996 | |
| 6997 | else |
| 6998 | echo "$ac_t""no" 1>&6 |
| 6999 | fi |
| 7000 | done |
| 7001 | |
| 7002 | for ac_hdr in sys/filio.h |
| 7003 | do |
| 7004 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 7005 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 7006 | echo "configure:7007: checking for $ac_hdr" >&5 |
| 7007 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 7008 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7009 | else |
| 7010 | cat > conftest.$ac_ext <<EOF |
| 7011 | #line 7012 "configure" |
| 7012 | #include "confdefs.h" |
| 7013 | #include <$ac_hdr> |
| 7014 | EOF |
| 7015 | ac_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; } |
| 7017 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 7018 | if test -z "$ac_err"; then |
| 7019 | rm -rf conftest* |
| 7020 | eval "ac_cv_header_$ac_safe=yes" |
| 7021 | else |
| 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" |
| 7027 | fi |
| 7028 | rm -f conftest* |
| 7029 | fi |
| 7030 | if 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 |
| 7035 | EOF |
| 7036 | |
| 7037 | else |
| 7038 | echo "$ac_t""no" 1>&6 |
| 7039 | fi |
| 7040 | done |
| 7041 | |
| 7042 | echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 |
| 7043 | echo "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 |
| 7071 | EOF |
| 7072 | |
| 7073 | echo "$ac_t""FIONBIO" 1>&6 |
| 7074 | ;; |
| 7075 | SunOS-4*) |
| 7076 | cat >> confdefs.h <<\EOF |
| 7077 | #define USE_FIONBIO 1 |
| 7078 | EOF |
| 7079 | |
| 7080 | echo "$ac_t""FIONBIO" 1>&6 |
| 7081 | ;; |
| 7082 | ULTRIX-4.*) |
| 7083 | cat >> confdefs.h <<\EOF |
| 7084 | #define USE_FIONBIO 1 |
| 7085 | EOF |
| 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 | |
| 7100 | TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} |
| 7101 | TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} |
| 7102 | eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}" |
| 7103 | |
| 7104 | |
| 7105 | echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 |
| 7106 | echo "configure:7107: checking how to package libraries" >&5 |
| 7107 | # Check whether --enable-framework or --disable-framework was given. |
| 7108 | if test "${enable_framework+set}" = set; then |
| 7109 | enableval="$enable_framework" |
| 7110 | tcl_ok=$enableval |
| 7111 | else |
| 7112 | tcl_ok=no |
| 7113 | fi |
| 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 |
| 7140 | DBGX='${TCL_DBGX}' |
| 7141 | eval "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 | |
| 7148 | if 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" |
| 7152 | elif 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}" |
| 7160 | else |
| 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 |
| 7174 | fi |
| 7175 | VERSION='${VERSION}' |
| 7176 | eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}" |
| 7177 | eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" |
| 7178 | eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}" |
| 7179 | VERSION=${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 | |
| 7188 | if test "$FRAMEWORK_BUILD" = "1" ; then |
| 7189 | TCL_PACKAGE_PATH="${libdir}/Resources/Scripts" |
| 7190 | elif test "$prefix" != "$exec_prefix"; then |
| 7191 | TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" |
| 7192 | else |
| 7193 | TCL_PACKAGE_PATH="${prefix}/lib" |
| 7194 | fi |
| 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} |
| 7202 | eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" |
| 7203 | # Replace DBGX with TCL_DBGX |
| 7204 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" |
| 7205 | |
| 7206 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
| 7207 | TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" |
| 7208 | else |
| 7209 | TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" |
| 7210 | fi |
| 7211 | |
| 7212 | TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" |
| 7213 | TCL_STUB_LIB_SPEC="-L${libdir} ${TCL_STUB_LIB_FLAG}" |
| 7214 | TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}" |
| 7215 | TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}" |
| 7216 | |
| 7217 | # Install time header dir can be set via --includedir |
| 7218 | eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" |
| 7219 | |
| 7220 | #------------------------------------------------------------------------ |
| 7221 | # tclConfig.sh refers to this by a different name |
| 7222 | #------------------------------------------------------------------------ |
| 7223 | |
| 7224 | TCL_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 | |
| 7265 | trap '' 1 2 15 |
| 7266 | cat > 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 | # |
| 7281 | EOF |
| 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 |
| 7301 | if cmp -s $cache_file confcache; then |
| 7302 | : |
| 7303 | else |
| 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 |
| 7310 | fi |
| 7311 | rm -f confcache |
| 7312 | |
| 7313 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7314 | |
| 7315 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7316 | # Let make expand exec_prefix. |
| 7317 | test "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. |
| 7322 | if test "x$srcdir" = x.; then |
| 7323 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7324 | fi |
| 7325 | |
| 7326 | trap '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. |
| 7331 | cat > conftest.defs <<\EOF |
| 7332 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g |
| 7333 | s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g |
| 7334 | s%\[%\\&%g |
| 7335 | s%\]%\\&%g |
| 7336 | s%\$%$$%g |
| 7337 | EOF |
| 7338 | DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` |
| 7339 | rm -f conftest.defs |
| 7340 | |
| 7341 | |
| 7342 | # Without the "./", some shells look in PATH for config.status. |
| 7343 | : ${CONFIG_STATUS=./config.status} |
| 7344 | |
| 7345 | echo creating $CONFIG_STATUS |
| 7346 | rm -f $CONFIG_STATUS |
| 7347 | cat > $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 | |
| 7359 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7360 | for ac_option |
| 7361 | do |
| 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 |
| 7373 | done |
| 7374 | |
| 7375 | ac_given_srcdir=$srcdir |
| 7376 | |
| 7377 | trap 'rm -fr `echo "Makefile dltest/Makefile tclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
| 7378 | EOF |
| 7379 | cat >> $CONFIG_STATUS <<EOF |
| 7380 | |
| 7381 | # Protect against being on the right side of a sed subst in config.status. |
| 7382 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7383 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7384 | $ac_vpsub |
| 7385 | $extrasub |
| 7386 | s%@SHELL@%$SHELL%g |
| 7387 | s%@CFLAGS@%$CFLAGS%g |
| 7388 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7389 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7390 | s%@FFLAGS@%$FFLAGS%g |
| 7391 | s%@DEFS@%$DEFS%g |
| 7392 | s%@LDFLAGS@%$LDFLAGS%g |
| 7393 | s%@LIBS@%$LIBS%g |
| 7394 | s%@exec_prefix@%$exec_prefix%g |
| 7395 | s%@prefix@%$prefix%g |
| 7396 | s%@program_transform_name@%$program_transform_name%g |
| 7397 | s%@bindir@%$bindir%g |
| 7398 | s%@sbindir@%$sbindir%g |
| 7399 | s%@libexecdir@%$libexecdir%g |
| 7400 | s%@datadir@%$datadir%g |
| 7401 | s%@sysconfdir@%$sysconfdir%g |
| 7402 | s%@sharedstatedir@%$sharedstatedir%g |
| 7403 | s%@localstatedir@%$localstatedir%g |
| 7404 | s%@libdir@%$libdir%g |
| 7405 | s%@includedir@%$includedir%g |
| 7406 | s%@oldincludedir@%$oldincludedir%g |
| 7407 | s%@infodir@%$infodir%g |
| 7408 | s%@mandir@%$mandir%g |
| 7409 | s%@MKLINKS_FLAGS@%$MKLINKS_FLAGS%g |
| 7410 | s%@CC@%$CC%g |
| 7411 | s%@CPP@%$CPP%g |
| 7412 | s%@TCL_THREADS@%$TCL_THREADS%g |
| 7413 | s%@LIBOBJS@%$LIBOBJS%g |
| 7414 | s%@TCL_LIBS@%$TCL_LIBS%g |
| 7415 | s%@MATH_LIBS@%$MATH_LIBS%g |
| 7416 | s%@RANLIB@%$RANLIB%g |
| 7417 | s%@AR@%$AR%g |
| 7418 | s%@DL_LIBS@%$DL_LIBS%g |
| 7419 | s%@DL_OBJS@%$DL_OBJS%g |
| 7420 | s%@PLAT_OBJS@%$PLAT_OBJS%g |
| 7421 | s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g |
| 7422 | s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g |
| 7423 | s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g |
| 7424 | s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g |
| 7425 | s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g |
| 7426 | s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g |
| 7427 | s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g |
| 7428 | s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g |
| 7429 | s%@STLIB_LD@%$STLIB_LD%g |
| 7430 | s%@SHLIB_LD@%$SHLIB_LD%g |
| 7431 | s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g |
| 7432 | s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g |
| 7433 | s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g |
| 7434 | s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g |
| 7435 | s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g |
| 7436 | s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g |
| 7437 | s%@MAKE_LIB@%$MAKE_LIB%g |
| 7438 | s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g |
| 7439 | s%@INSTALL_LIB@%$INSTALL_LIB%g |
| 7440 | s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g |
| 7441 | s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g |
| 7442 | s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g |
| 7443 | s%@TCL_VERSION@%$TCL_VERSION%g |
| 7444 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g |
| 7445 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g |
| 7446 | s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g |
| 7447 | s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g |
| 7448 | s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g |
| 7449 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g |
| 7450 | s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g |
| 7451 | s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g |
| 7452 | s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g |
| 7453 | s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g |
| 7454 | s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g |
| 7455 | s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g |
| 7456 | s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g |
| 7457 | s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g |
| 7458 | s%@TCL_DBGX@%$TCL_DBGX%g |
| 7459 | s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g |
| 7460 | s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g |
| 7461 | s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g |
| 7462 | s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g |
| 7463 | s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g |
| 7464 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g |
| 7465 | s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g |
| 7466 | s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g |
| 7467 | s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g |
| 7468 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g |
| 7469 | s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g |
| 7470 | s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g |
| 7471 | s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g |
| 7472 | s%@BUILD_DLTEST@%$BUILD_DLTEST%g |
| 7473 | s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g |
| 7474 | |
| 7475 | CEOF |
| 7476 | EOF |
| 7477 | |
| 7478 | cat >> $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. |
| 7482 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7483 | ac_file=1 # Number of current file. |
| 7484 | ac_beg=1 # First line for current file. |
| 7485 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7486 | ac_more_lines=: |
| 7487 | ac_sed_cmds="" |
| 7488 | while $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 |
| 7507 | done |
| 7508 | if test -z "$ac_sed_cmds"; then |
| 7509 | ac_sed_cmds=cat |
| 7510 | fi |
| 7511 | EOF |
| 7512 | |
| 7513 | cat >> $CONFIG_STATUS <<EOF |
| 7514 | |
| 7515 | CONFIG_FILES=\${CONFIG_FILES-"Makefile dltest/Makefile tclConfig.sh"} |
| 7516 | EOF |
| 7517 | cat >> $CONFIG_STATUS <<\EOF |
| 7518 | for 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 |
| 7562 | s%@configure_input@%$configure_input%g |
| 7563 | s%@srcdir@%$srcdir%g |
| 7564 | s%@top_srcdir@%$top_srcdir%g |
| 7565 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 7566 | fi; done |
| 7567 | rm -f conftest.s* |
| 7568 | |
| 7569 | EOF |
| 7570 | cat >> $CONFIG_STATUS <<EOF |
| 7571 | |
| 7572 | EOF |
| 7573 | cat >> $CONFIG_STATUS <<\EOF |
| 7574 | |
| 7575 | exit 0 |
| 7576 | EOF |
| 7577 | chmod +x $CONFIG_STATUS |
| 7578 | rm -fr confdefs* $ac_clean_files |
| 7579 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
| 7580 |