sl@0: #! /bin/sh sl@0: sl@0: # Guess values for system-dependent variables and create Makefiles. sl@0: # Generated automatically using autoconf version 2.13 sl@0: # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. sl@0: # sl@0: # This configure script is free software; the Free Software Foundation sl@0: # gives unlimited permission to copy, distribute and modify it. sl@0: sl@0: # Defaults: sl@0: ac_help= sl@0: ac_default_prefix=/usr/local sl@0: # Any additions from configure.in: sl@0: ac_help="$ac_help sl@0: --enable-man-symlinks use symlinks for the manpages" sl@0: ac_help="$ac_help sl@0: --enable-man-compression=PROG sl@0: compress the manpages with PROG" sl@0: ac_help="$ac_help sl@0: --enable-man-suffix=STRING sl@0: use STRING as a suffix to manpage file names sl@0: (default: tcl)" sl@0: ac_help="$ac_help sl@0: --enable-threads build with threads" sl@0: ac_help="$ac_help sl@0: --enable-shared build and link with shared libraries [--enable-shared]" sl@0: ac_help="$ac_help sl@0: --enable-64bit enable 64bit support (where applicable)" sl@0: ac_help="$ac_help sl@0: --enable-64bit-vis enable 64bit Sparc VIS support" sl@0: ac_help="$ac_help sl@0: --enable-corefoundation use CoreFoundation API [--enable-corefoundation]" sl@0: ac_help="$ac_help sl@0: --disable-load disallow dynamic loading and "load" command" sl@0: ac_help="$ac_help sl@0: --enable-symbols build with debugging symbols [--disable-symbols]" sl@0: ac_help="$ac_help sl@0: --enable-langinfo use nl_langinfo if possible to determine sl@0: encoding at startup, otherwise use old heuristic" sl@0: ac_help="$ac_help sl@0: --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]" sl@0: sl@0: # Initialize some variables set by options. sl@0: # The variables have the same names as the options, with sl@0: # dashes changed to underlines. sl@0: build=NONE sl@0: cache_file=./config.cache sl@0: exec_prefix=NONE sl@0: host=NONE sl@0: no_create= sl@0: nonopt=NONE sl@0: no_recursion= sl@0: prefix=NONE sl@0: program_prefix=NONE sl@0: program_suffix=NONE sl@0: program_transform_name=s,x,x, sl@0: silent= sl@0: site= sl@0: srcdir= sl@0: target=NONE sl@0: verbose= sl@0: x_includes=NONE sl@0: x_libraries=NONE sl@0: bindir='${exec_prefix}/bin' sl@0: sbindir='${exec_prefix}/sbin' sl@0: libexecdir='${exec_prefix}/libexec' sl@0: datadir='${prefix}/share' sl@0: sysconfdir='${prefix}/etc' sl@0: sharedstatedir='${prefix}/com' sl@0: localstatedir='${prefix}/var' sl@0: libdir='${exec_prefix}/lib' sl@0: includedir='${prefix}/include' sl@0: oldincludedir='/usr/include' sl@0: infodir='${prefix}/info' sl@0: mandir='${prefix}/man' sl@0: sl@0: # Initialize some other variables. sl@0: subdirs= sl@0: MFLAGS= MAKEFLAGS= sl@0: SHELL=${CONFIG_SHELL-/bin/sh} sl@0: # Maximum number of lines to put in a shell here document. sl@0: ac_max_here_lines=12 sl@0: sl@0: ac_prev= sl@0: for ac_option sl@0: do sl@0: sl@0: # If the previous option needs an argument, assign it. sl@0: if test -n "$ac_prev"; then sl@0: eval "$ac_prev=\$ac_option" sl@0: ac_prev= sl@0: continue sl@0: fi sl@0: sl@0: case "$ac_option" in sl@0: -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; sl@0: *) ac_optarg= ;; sl@0: esac sl@0: sl@0: # Accept the important Cygnus configure options, so we can diagnose typos. sl@0: sl@0: case "$ac_option" in sl@0: sl@0: -bindir | --bindir | --bindi | --bind | --bin | --bi) sl@0: ac_prev=bindir ;; sl@0: -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) sl@0: bindir="$ac_optarg" ;; sl@0: sl@0: -build | --build | --buil | --bui | --bu) sl@0: ac_prev=build ;; sl@0: -build=* | --build=* | --buil=* | --bui=* | --bu=*) sl@0: build="$ac_optarg" ;; sl@0: sl@0: -cache-file | --cache-file | --cache-fil | --cache-fi \ sl@0: | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) sl@0: ac_prev=cache_file ;; sl@0: -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ sl@0: | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) sl@0: cache_file="$ac_optarg" ;; sl@0: sl@0: -datadir | --datadir | --datadi | --datad | --data | --dat | --da) sl@0: ac_prev=datadir ;; sl@0: -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ sl@0: | --da=*) sl@0: datadir="$ac_optarg" ;; sl@0: sl@0: -disable-* | --disable-*) sl@0: ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` sl@0: # Reject names that are not valid shell variable names. sl@0: if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then sl@0: { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } sl@0: fi sl@0: ac_feature=`echo $ac_feature| sed 's/-/_/g'` sl@0: eval "enable_${ac_feature}=no" ;; sl@0: sl@0: -enable-* | --enable-*) sl@0: ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` sl@0: # Reject names that are not valid shell variable names. sl@0: if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then sl@0: { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } sl@0: fi sl@0: ac_feature=`echo $ac_feature| sed 's/-/_/g'` sl@0: case "$ac_option" in sl@0: *=*) ;; sl@0: *) ac_optarg=yes ;; sl@0: esac sl@0: eval "enable_${ac_feature}='$ac_optarg'" ;; sl@0: sl@0: -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ sl@0: | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ sl@0: | --exec | --exe | --ex) sl@0: ac_prev=exec_prefix ;; sl@0: -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ sl@0: | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ sl@0: | --exec=* | --exe=* | --ex=*) sl@0: exec_prefix="$ac_optarg" ;; sl@0: sl@0: -gas | --gas | --ga | --g) sl@0: # Obsolete; use --with-gas. sl@0: with_gas=yes ;; sl@0: sl@0: -help | --help | --hel | --he) sl@0: # Omit some internal or obsolete options to make the list less imposing. sl@0: # This message is too long to be a string in the A/UX 3.1 sh. sl@0: cat << EOF sl@0: Usage: configure [options] [host] sl@0: Options: [defaults in brackets after descriptions] sl@0: Configuration: sl@0: --cache-file=FILE cache test results in FILE sl@0: --help print this message sl@0: --no-create do not create output files sl@0: --quiet, --silent do not print \`checking...' messages sl@0: --version print the version of autoconf that created configure sl@0: Directory and file names: sl@0: --prefix=PREFIX install architecture-independent files in PREFIX sl@0: [$ac_default_prefix] sl@0: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX sl@0: [same as prefix] sl@0: --bindir=DIR user executables in DIR [EPREFIX/bin] sl@0: --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] sl@0: --libexecdir=DIR program executables in DIR [EPREFIX/libexec] sl@0: --datadir=DIR read-only architecture-independent data in DIR sl@0: [PREFIX/share] sl@0: --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] sl@0: --sharedstatedir=DIR modifiable architecture-independent data in DIR sl@0: [PREFIX/com] sl@0: --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] sl@0: --libdir=DIR object code libraries in DIR [EPREFIX/lib] sl@0: --includedir=DIR C header files in DIR [PREFIX/include] sl@0: --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] sl@0: --infodir=DIR info documentation in DIR [PREFIX/info] sl@0: --mandir=DIR man documentation in DIR [PREFIX/man] sl@0: --srcdir=DIR find the sources in DIR [configure dir or ..] sl@0: --program-prefix=PREFIX prepend PREFIX to installed program names sl@0: --program-suffix=SUFFIX append SUFFIX to installed program names sl@0: --program-transform-name=PROGRAM sl@0: run sed PROGRAM on installed program names sl@0: EOF sl@0: cat << EOF sl@0: Host type: sl@0: --build=BUILD configure for building on BUILD [BUILD=HOST] sl@0: --host=HOST configure for HOST [guessed] sl@0: --target=TARGET configure for TARGET [TARGET=HOST] sl@0: Features and packages: sl@0: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) sl@0: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] sl@0: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] sl@0: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) sl@0: --x-includes=DIR X include files are in DIR sl@0: --x-libraries=DIR X library files are in DIR sl@0: EOF sl@0: if test -n "$ac_help"; then sl@0: echo "--enable and --with options recognized:$ac_help" sl@0: fi sl@0: exit 0 ;; sl@0: sl@0: -host | --host | --hos | --ho) sl@0: ac_prev=host ;; sl@0: -host=* | --host=* | --hos=* | --ho=*) sl@0: host="$ac_optarg" ;; sl@0: sl@0: -includedir | --includedir | --includedi | --included | --include \ sl@0: | --includ | --inclu | --incl | --inc) sl@0: ac_prev=includedir ;; sl@0: -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ sl@0: | --includ=* | --inclu=* | --incl=* | --inc=*) sl@0: includedir="$ac_optarg" ;; sl@0: sl@0: -infodir | --infodir | --infodi | --infod | --info | --inf) sl@0: ac_prev=infodir ;; sl@0: -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) sl@0: infodir="$ac_optarg" ;; sl@0: sl@0: -libdir | --libdir | --libdi | --libd) sl@0: ac_prev=libdir ;; sl@0: -libdir=* | --libdir=* | --libdi=* | --libd=*) sl@0: libdir="$ac_optarg" ;; sl@0: sl@0: -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ sl@0: | --libexe | --libex | --libe) sl@0: ac_prev=libexecdir ;; sl@0: -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ sl@0: | --libexe=* | --libex=* | --libe=*) sl@0: libexecdir="$ac_optarg" ;; sl@0: sl@0: -localstatedir | --localstatedir | --localstatedi | --localstated \ sl@0: | --localstate | --localstat | --localsta | --localst \ sl@0: | --locals | --local | --loca | --loc | --lo) sl@0: ac_prev=localstatedir ;; sl@0: -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ sl@0: | --localstate=* | --localstat=* | --localsta=* | --localst=* \ sl@0: | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) sl@0: localstatedir="$ac_optarg" ;; sl@0: sl@0: -mandir | --mandir | --mandi | --mand | --man | --ma | --m) sl@0: ac_prev=mandir ;; sl@0: -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) sl@0: mandir="$ac_optarg" ;; sl@0: sl@0: -nfp | --nfp | --nf) sl@0: # Obsolete; use --without-fp. sl@0: with_fp=no ;; sl@0: sl@0: -no-create | --no-create | --no-creat | --no-crea | --no-cre \ sl@0: | --no-cr | --no-c) sl@0: no_create=yes ;; sl@0: sl@0: -no-recursion | --no-recursion | --no-recursio | --no-recursi \ sl@0: | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) sl@0: no_recursion=yes ;; sl@0: sl@0: -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ sl@0: | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ sl@0: | --oldin | --oldi | --old | --ol | --o) sl@0: ac_prev=oldincludedir ;; sl@0: -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ sl@0: | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ sl@0: | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) sl@0: oldincludedir="$ac_optarg" ;; sl@0: sl@0: -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) sl@0: ac_prev=prefix ;; sl@0: -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) sl@0: prefix="$ac_optarg" ;; sl@0: sl@0: -program-prefix | --program-prefix | --program-prefi | --program-pref \ sl@0: | --program-pre | --program-pr | --program-p) sl@0: ac_prev=program_prefix ;; sl@0: -program-prefix=* | --program-prefix=* | --program-prefi=* \ sl@0: | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) sl@0: program_prefix="$ac_optarg" ;; sl@0: sl@0: -program-suffix | --program-suffix | --program-suffi | --program-suff \ sl@0: | --program-suf | --program-su | --program-s) sl@0: ac_prev=program_suffix ;; sl@0: -program-suffix=* | --program-suffix=* | --program-suffi=* \ sl@0: | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) sl@0: program_suffix="$ac_optarg" ;; sl@0: sl@0: -program-transform-name | --program-transform-name \ sl@0: | --program-transform-nam | --program-transform-na \ sl@0: | --program-transform-n | --program-transform- \ sl@0: | --program-transform | --program-transfor \ sl@0: | --program-transfo | --program-transf \ sl@0: | --program-trans | --program-tran \ sl@0: | --progr-tra | --program-tr | --program-t) sl@0: ac_prev=program_transform_name ;; sl@0: -program-transform-name=* | --program-transform-name=* \ sl@0: | --program-transform-nam=* | --program-transform-na=* \ sl@0: | --program-transform-n=* | --program-transform-=* \ sl@0: | --program-transform=* | --program-transfor=* \ sl@0: | --program-transfo=* | --program-transf=* \ sl@0: | --program-trans=* | --program-tran=* \ sl@0: | --progr-tra=* | --program-tr=* | --program-t=*) sl@0: program_transform_name="$ac_optarg" ;; sl@0: sl@0: -q | -quiet | --quiet | --quie | --qui | --qu | --q \ sl@0: | -silent | --silent | --silen | --sile | --sil) sl@0: silent=yes ;; sl@0: sl@0: -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) sl@0: ac_prev=sbindir ;; sl@0: -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ sl@0: | --sbi=* | --sb=*) sl@0: sbindir="$ac_optarg" ;; sl@0: sl@0: -sharedstatedir | --sharedstatedir | --sharedstatedi \ sl@0: | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ sl@0: | --sharedst | --shareds | --shared | --share | --shar \ sl@0: | --sha | --sh) sl@0: ac_prev=sharedstatedir ;; sl@0: -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ sl@0: | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ sl@0: | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ sl@0: | --sha=* | --sh=*) sl@0: sharedstatedir="$ac_optarg" ;; sl@0: sl@0: -site | --site | --sit) sl@0: ac_prev=site ;; sl@0: -site=* | --site=* | --sit=*) sl@0: site="$ac_optarg" ;; sl@0: sl@0: -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) sl@0: ac_prev=srcdir ;; sl@0: -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) sl@0: srcdir="$ac_optarg" ;; sl@0: sl@0: -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ sl@0: | --syscon | --sysco | --sysc | --sys | --sy) sl@0: ac_prev=sysconfdir ;; sl@0: -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ sl@0: | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sl@0: sysconfdir="$ac_optarg" ;; sl@0: sl@0: -target | --target | --targe | --targ | --tar | --ta | --t) sl@0: ac_prev=target ;; sl@0: -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) sl@0: target="$ac_optarg" ;; sl@0: sl@0: -v | -verbose | --verbose | --verbos | --verbo | --verb) sl@0: verbose=yes ;; sl@0: sl@0: -version | --version | --versio | --versi | --vers) sl@0: echo "configure generated by autoconf version 2.13" sl@0: exit 0 ;; sl@0: sl@0: -with-* | --with-*) sl@0: ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` sl@0: # Reject names that are not valid shell variable names. sl@0: if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then sl@0: { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } sl@0: fi sl@0: ac_package=`echo $ac_package| sed 's/-/_/g'` sl@0: case "$ac_option" in sl@0: *=*) ;; sl@0: *) ac_optarg=yes ;; sl@0: esac sl@0: eval "with_${ac_package}='$ac_optarg'" ;; sl@0: sl@0: -without-* | --without-*) sl@0: ac_package=`echo $ac_option|sed -e 's/-*without-//'` sl@0: # Reject names that are not valid shell variable names. sl@0: if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then sl@0: { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } sl@0: fi sl@0: ac_package=`echo $ac_package| sed 's/-/_/g'` sl@0: eval "with_${ac_package}=no" ;; sl@0: sl@0: --x) sl@0: # Obsolete; use --with-x. sl@0: with_x=yes ;; sl@0: sl@0: -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ sl@0: | --x-incl | --x-inc | --x-in | --x-i) sl@0: ac_prev=x_includes ;; sl@0: -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ sl@0: | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) sl@0: x_includes="$ac_optarg" ;; sl@0: sl@0: -x-libraries | --x-libraries | --x-librarie | --x-librari \ sl@0: | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) sl@0: ac_prev=x_libraries ;; sl@0: -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ sl@0: | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) sl@0: x_libraries="$ac_optarg" ;; sl@0: sl@0: -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } sl@0: ;; sl@0: sl@0: *) sl@0: if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then sl@0: echo "configure: warning: $ac_option: invalid host type" 1>&2 sl@0: fi sl@0: if test "x$nonopt" != xNONE; then sl@0: { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } sl@0: fi sl@0: nonopt="$ac_option" sl@0: ;; sl@0: sl@0: esac sl@0: done sl@0: sl@0: if test -n "$ac_prev"; then sl@0: { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } sl@0: fi sl@0: sl@0: trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 sl@0: sl@0: # File descriptor usage: sl@0: # 0 standard input sl@0: # 1 file creation sl@0: # 2 errors and warnings sl@0: # 3 some systems may open it to /dev/tty sl@0: # 4 used on the Kubota Titan sl@0: # 6 checking for... messages and results sl@0: # 5 compiler messages saved in config.log sl@0: if test "$silent" = yes; then sl@0: exec 6>/dev/null sl@0: else sl@0: exec 6>&1 sl@0: fi sl@0: exec 5>./config.log sl@0: sl@0: echo "\ sl@0: This file contains any messages produced by compilers while sl@0: running configure, to aid debugging if configure makes a mistake. sl@0: " 1>&5 sl@0: sl@0: # Strip out --no-create and --no-recursion so they do not pile up. sl@0: # Also quote any args containing shell metacharacters. sl@0: ac_configure_args= sl@0: for ac_arg sl@0: do sl@0: case "$ac_arg" in sl@0: -no-create | --no-create | --no-creat | --no-crea | --no-cre \ sl@0: | --no-cr | --no-c) ;; sl@0: -no-recursion | --no-recursion | --no-recursio | --no-recursi \ sl@0: | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; sl@0: *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) sl@0: ac_configure_args="$ac_configure_args '$ac_arg'" ;; sl@0: *) ac_configure_args="$ac_configure_args $ac_arg" ;; sl@0: esac sl@0: done sl@0: sl@0: # NLS nuisances. sl@0: # Only set these to C if already set. These must not be set unconditionally sl@0: # because not all systems understand e.g. LANG=C (notably SCO). sl@0: # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! sl@0: # Non-C LC_CTYPE values break the ctype check. sl@0: if test "${LANG+set}" = set; then LANG=C; export LANG; fi sl@0: if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi sl@0: if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi sl@0: if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi sl@0: sl@0: # confdefs.h avoids OS command line length limits that DEFS can exceed. sl@0: rm -rf conftest* confdefs.h sl@0: # AIX cpp loses on an empty file, so make sure it contains at least a newline. sl@0: echo > confdefs.h sl@0: sl@0: # A filename unique to this package, relative to the directory that sl@0: # configure is in, which we can look for to find out if srcdir is correct. sl@0: ac_unique_file=../generic/tcl.h sl@0: sl@0: # Find the source files, if location was not specified. sl@0: if test -z "$srcdir"; then sl@0: ac_srcdir_defaulted=yes sl@0: # Try the directory containing this script, then its parent. sl@0: ac_prog=$0 sl@0: ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` sl@0: test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. sl@0: srcdir=$ac_confdir sl@0: if test ! -r $srcdir/$ac_unique_file; then sl@0: srcdir=.. sl@0: fi sl@0: else sl@0: ac_srcdir_defaulted=no sl@0: fi sl@0: if test ! -r $srcdir/$ac_unique_file; then sl@0: if test "$ac_srcdir_defaulted" = yes; then sl@0: { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } sl@0: else sl@0: { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } sl@0: fi sl@0: fi sl@0: srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` sl@0: sl@0: # Prefer explicitly selected file to automatically selected ones. sl@0: if test -z "$CONFIG_SITE"; then sl@0: if test "x$prefix" != xNONE; then sl@0: CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" sl@0: else sl@0: CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" sl@0: fi sl@0: fi sl@0: for ac_site_file in $CONFIG_SITE; do sl@0: if test -r "$ac_site_file"; then sl@0: echo "loading site script $ac_site_file" sl@0: . "$ac_site_file" sl@0: fi sl@0: done sl@0: sl@0: if test -r "$cache_file"; then sl@0: echo "loading cache $cache_file" sl@0: . $cache_file sl@0: else sl@0: echo "creating cache $cache_file" sl@0: > $cache_file sl@0: fi sl@0: sl@0: ac_ext=c sl@0: # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. sl@0: ac_cpp='$CPP $CPPFLAGS' sl@0: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' sl@0: ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' sl@0: cross_compiling=$ac_cv_prog_cc_cross sl@0: sl@0: ac_exeext= sl@0: ac_objext=o sl@0: if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then sl@0: # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. sl@0: if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then sl@0: ac_n= ac_c=' sl@0: ' ac_t=' ' sl@0: else sl@0: ac_n=-n ac_c= ac_t= sl@0: fi sl@0: else sl@0: ac_n= ac_c='\c' ac_t= sl@0: fi sl@0: sl@0: sl@0: sl@0: sl@0: TCL_VERSION=8.4 sl@0: TCL_MAJOR_VERSION=8 sl@0: TCL_MINOR_VERSION=4 sl@0: TCL_PATCH_LEVEL=".15" sl@0: VERSION=${TCL_VERSION} sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # Handle the --prefix=... option sl@0: #------------------------------------------------------------------------ sl@0: sl@0: if test "${prefix}" = "NONE"; then sl@0: prefix=/usr/local sl@0: fi sl@0: if test "${exec_prefix}" = "NONE"; then sl@0: exec_prefix=$prefix sl@0: fi sl@0: # Make sure srcdir is fully qualified! sl@0: srcdir=`cd $srcdir ; pwd` sl@0: TCL_SRC_DIR=`cd $srcdir/..; pwd` sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # Compress and/or soft link the manpages? sl@0: #------------------------------------------------------------------------ sl@0: sl@0: sl@0: echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6 sl@0: echo "configure:581: checking whether to use symlinks for manpages" >&5 sl@0: # Check whether --enable-man-symlinks or --disable-man-symlinks was given. sl@0: if test "${enable_man_symlinks+set}" = set; then sl@0: enableval="$enable_man_symlinks" sl@0: test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" sl@0: else sl@0: enableval="no" sl@0: fi sl@0: sl@0: echo "$ac_t""$enableval" 1>&6 sl@0: sl@0: echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6 sl@0: echo "configure:593: checking whether to compress the manpages" >&5 sl@0: # Check whether --enable-man-compression or --disable-man-compression was given. sl@0: if test "${enable_man_compression+set}" = set; then sl@0: enableval="$enable_man_compression" sl@0: case $enableval in sl@0: yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };; sl@0: no) ;; sl@0: *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; sl@0: esac sl@0: else sl@0: enableval="no" sl@0: fi sl@0: sl@0: echo "$ac_t""$enableval" 1>&6 sl@0: if test "$enableval" != "no"; then sl@0: echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6 sl@0: echo "configure:609: checking for compressed file suffix" >&5 sl@0: touch TeST sl@0: $enableval TeST sl@0: Z=`ls TeST* | sed 's/^....//'` sl@0: rm -f TeST* sl@0: MAN_FLAGS="$MAN_FLAGS --extension $Z" sl@0: echo "$ac_t""$Z" 1>&6 sl@0: fi sl@0: sl@0: echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6 sl@0: echo "configure:619: checking whether to add a package name suffix for the manpages" >&5 sl@0: # Check whether --enable-man-suffix or --disable-man-suffix was given. sl@0: if test "${enable_man_suffix+set}" = set; then sl@0: enableval="$enable_man_suffix" sl@0: case $enableval in sl@0: yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; sl@0: no) ;; sl@0: *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; sl@0: esac sl@0: else sl@0: enableval="no" sl@0: fi sl@0: sl@0: echo "$ac_t""$enableval" 1>&6 sl@0: sl@0: sl@0: sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # Standard compiler checks sl@0: #------------------------------------------------------------------------ sl@0: sl@0: # If the user did not set CFLAGS, set it now to keep sl@0: # the AC_PROG_CC macro from adding "-g -O2". sl@0: if test "${CFLAGS+set}" != "set" ; then sl@0: CFLAGS="" sl@0: fi sl@0: sl@0: # Extract the first word of "gcc", so it can be a program name with args. sl@0: set dummy gcc; ac_word=$2 sl@0: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 sl@0: echo "configure:650: checking for $ac_word" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test -n "$CC"; then sl@0: ac_cv_prog_CC="$CC" # Let the user override the test. sl@0: else sl@0: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" sl@0: ac_dummy="$PATH" sl@0: for ac_dir in $ac_dummy; do sl@0: test -z "$ac_dir" && ac_dir=. sl@0: if test -f $ac_dir/$ac_word; then sl@0: ac_cv_prog_CC="gcc" sl@0: break sl@0: fi sl@0: done sl@0: IFS="$ac_save_ifs" sl@0: fi sl@0: fi sl@0: CC="$ac_cv_prog_CC" sl@0: if test -n "$CC"; then sl@0: echo "$ac_t""$CC" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: if test -z "$CC"; then sl@0: # Extract the first word of "cc", so it can be a program name with args. sl@0: set dummy cc; ac_word=$2 sl@0: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 sl@0: echo "configure:680: checking for $ac_word" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test -n "$CC"; then sl@0: ac_cv_prog_CC="$CC" # Let the user override the test. sl@0: else sl@0: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" sl@0: ac_prog_rejected=no sl@0: ac_dummy="$PATH" sl@0: for ac_dir in $ac_dummy; do sl@0: test -z "$ac_dir" && ac_dir=. sl@0: if test -f $ac_dir/$ac_word; then sl@0: if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then sl@0: ac_prog_rejected=yes sl@0: continue sl@0: fi sl@0: ac_cv_prog_CC="cc" sl@0: break sl@0: fi sl@0: done sl@0: IFS="$ac_save_ifs" sl@0: if test $ac_prog_rejected = yes; then sl@0: # We found a bogon in the path, so make sure we never use it. sl@0: set dummy $ac_cv_prog_CC sl@0: shift sl@0: if test $# -gt 0; then sl@0: # We chose a different compiler from the bogus one. sl@0: # However, it has the same basename, so the bogon will be chosen sl@0: # first if we set CC to just the basename; use the full file name. sl@0: shift sl@0: set dummy "$ac_dir/$ac_word" "$@" sl@0: shift sl@0: ac_cv_prog_CC="$@" sl@0: fi sl@0: fi sl@0: fi sl@0: fi sl@0: CC="$ac_cv_prog_CC" sl@0: if test -n "$CC"; then sl@0: echo "$ac_t""$CC" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: if test -z "$CC"; then sl@0: case "`uname -s`" in sl@0: *win32* | *WIN32*) sl@0: # Extract the first word of "cl", so it can be a program name with args. sl@0: set dummy cl; ac_word=$2 sl@0: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 sl@0: echo "configure:731: checking for $ac_word" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test -n "$CC"; then sl@0: ac_cv_prog_CC="$CC" # Let the user override the test. sl@0: else sl@0: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" sl@0: ac_dummy="$PATH" sl@0: for ac_dir in $ac_dummy; do sl@0: test -z "$ac_dir" && ac_dir=. sl@0: if test -f $ac_dir/$ac_word; then sl@0: ac_cv_prog_CC="cl" sl@0: break sl@0: fi sl@0: done sl@0: IFS="$ac_save_ifs" sl@0: fi sl@0: fi sl@0: CC="$ac_cv_prog_CC" sl@0: if test -n "$CC"; then sl@0: echo "$ac_t""$CC" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: ;; sl@0: esac sl@0: fi sl@0: test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } sl@0: fi sl@0: sl@0: echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 sl@0: echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 sl@0: sl@0: ac_ext=c sl@0: # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. sl@0: ac_cpp='$CPP $CPPFLAGS' sl@0: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' sl@0: ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' sl@0: cross_compiling=$ac_cv_prog_cc_cross sl@0: sl@0: cat > conftest.$ac_ext << EOF sl@0: sl@0: #line 774 "configure" sl@0: #include "confdefs.h" sl@0: sl@0: main(){return(0);} sl@0: EOF sl@0: if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: ac_cv_prog_cc_works=yes sl@0: # If we can't run a trivial program, we are probably using a cross compiler. sl@0: if (./conftest; exit) 2>/dev/null; then sl@0: ac_cv_prog_cc_cross=no sl@0: else sl@0: ac_cv_prog_cc_cross=yes sl@0: fi sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: ac_cv_prog_cc_works=no sl@0: fi sl@0: rm -fr conftest* sl@0: ac_ext=c sl@0: # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. sl@0: ac_cpp='$CPP $CPPFLAGS' sl@0: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' sl@0: ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' sl@0: cross_compiling=$ac_cv_prog_cc_cross sl@0: sl@0: echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 sl@0: if test $ac_cv_prog_cc_works = no; then sl@0: { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } sl@0: fi sl@0: echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 sl@0: echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 sl@0: echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 sl@0: cross_compiling=$ac_cv_prog_cc_cross sl@0: sl@0: echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 sl@0: echo "configure:810: checking whether we are using GNU C" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then sl@0: ac_cv_prog_gcc=yes sl@0: else sl@0: ac_cv_prog_gcc=no sl@0: fi sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_prog_gcc" 1>&6 sl@0: sl@0: if test $ac_cv_prog_gcc = yes; then sl@0: GCC=yes sl@0: else sl@0: GCC= sl@0: fi sl@0: sl@0: ac_test_CFLAGS="${CFLAGS+set}" sl@0: ac_save_CFLAGS="$CFLAGS" sl@0: CFLAGS= sl@0: echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 sl@0: echo "configure:838: checking whether ${CC-cc} accepts -g" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: echo 'void f(){}' > conftest.c sl@0: if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then sl@0: ac_cv_prog_cc_g=yes sl@0: else sl@0: ac_cv_prog_cc_g=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 sl@0: if test "$ac_test_CFLAGS" = set; then sl@0: CFLAGS="$ac_save_CFLAGS" sl@0: elif test $ac_cv_prog_cc_g = yes; then sl@0: if test "$GCC" = yes; then sl@0: CFLAGS="-g -O2" sl@0: else sl@0: CFLAGS="-g" sl@0: fi sl@0: else sl@0: if test "$GCC" = yes; then sl@0: CFLAGS="-O2" sl@0: else sl@0: CFLAGS= sl@0: fi sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Supply substitutes for missing POSIX header files. Special notes: sl@0: # - stdlib.h doesn't define strtol, strtoul, or sl@0: # strtod insome versions of SunOS sl@0: # - some versions of string.h don't declare procedures such sl@0: # as strstr sl@0: # Do this early, otherwise an autoconf bug throws errors on configure sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 sl@0: echo "configure:880: checking how to run the C preprocessor" >&5 sl@0: # On Suns, sometimes $CPP names a directory. sl@0: if test -n "$CPP" && test -d "$CPP"; then sl@0: CPP= sl@0: fi sl@0: if test -z "$CPP"; then sl@0: if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: # This must be in double quotes, not single quotes, because CPP may get sl@0: # substituted into the Makefile and "${CC-cc}" will confuse make. sl@0: CPP="${CC-cc} -E" sl@0: # On the NeXT, cc -E runs the code through the compiler's parser, sl@0: # not just through cpp. sl@0: cat > conftest.$ac_ext < sl@0: Syntax Error sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: : sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: CPP="${CC-cc} -E -traditional-cpp" sl@0: cat > conftest.$ac_ext < sl@0: Syntax Error sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: : sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: CPP="${CC-cc} -nologo -E" sl@0: cat > conftest.$ac_ext < sl@0: Syntax Error sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: : sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: CPP=/lib/cpp sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: rm -f conftest* sl@0: ac_cv_prog_CPP="$CPP" sl@0: fi sl@0: CPP="$ac_cv_prog_CPP" sl@0: else sl@0: ac_cv_prog_CPP="$CPP" sl@0: fi sl@0: echo "$ac_t""$CPP" 1>&6 sl@0: sl@0: sl@0: echo $ac_n "checking dirent.h""... $ac_c" 1>&6 sl@0: echo "configure:961: checking dirent.h" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_dirent_h'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: sl@0: #ifndef _POSIX_SOURCE sl@0: # ifdef __Lynx__ sl@0: /* sl@0: * Generate compilation error to make the test fail: Lynx headers sl@0: * are only valid if really in the POSIX environment. sl@0: */ sl@0: sl@0: missing_procedure(); sl@0: # endif sl@0: #endif sl@0: DIR *d; sl@0: struct dirent *entryPtr; sl@0: char *p; sl@0: d = opendir("foobar"); sl@0: entryPtr = readdir(d); sl@0: p = entryPtr->d_name; sl@0: closedir(d); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_dirent_h=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_dirent_h=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_dirent_h" 1>&6 sl@0: sl@0: if test $tcl_cv_dirent_h = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_DIRENT_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for errno.h""... $ac_c" 1>&6 sl@0: echo "configure:1016: checking for errno.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_ERRNO_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for float.h""... $ac_c" 1>&6 sl@0: echo "configure:1053: checking for float.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_FLOAT_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for values.h""... $ac_c" 1>&6 sl@0: echo "configure:1090: checking for values.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_VALUES_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for limits.h""... $ac_c" 1>&6 sl@0: echo "configure:1127: checking for limits.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_LIMITS_H 1 sl@0: EOF sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_LIMITS_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 sl@0: echo "configure:1167: checking for stdlib.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "strtol" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: tcl_ok=0 sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "strtoul" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: tcl_ok=0 sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "strtod" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: tcl_ok=0 sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: if test $tcl_ok = 0; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_STDLIB_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for string.h""... $ac_c" 1>&6 sl@0: echo "configure:1249: checking for string.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "strstr" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: tcl_ok=0 sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "strerror" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: tcl_ok=0 sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: sl@0: # See also memmove check below for a place where NO_STRING_H can be sl@0: # set and why. sl@0: sl@0: if test $tcl_ok = 0; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_STRING_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6 sl@0: echo "configure:1322: checking for sys/wait.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_SYS_WAIT_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 sl@0: echo "configure:1359: checking for dlfcn.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_DLFCN_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: # OS/390 lacks sys/param.h (and doesn't need it, by chance). sl@0: for ac_hdr in unistd.h sys/param.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:1400: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # If we're using GCC, see if the compiler understands -pipe. If so, use it. sl@0: # It makes compiling go faster. (This is only a performance feature.) sl@0: #------------------------------------------------------------------------ sl@0: sl@0: if test -z "$no_pipe" && test -n "$GCC"; then sl@0: echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 sl@0: echo "configure:1445: checking if the compiler understands -pipe" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_cc_pipe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_cc_pipe=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_cc_pipe=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_cc_pipe" 1>&6 sl@0: if test $tcl_cv_cc_pipe = yes; then sl@0: CFLAGS="$CFLAGS -pipe" sl@0: fi sl@0: fi sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # Threads support sl@0: #------------------------------------------------------------------------ sl@0: sl@0: sl@0: # Check whether --enable-threads or --disable-threads was given. sl@0: if test "${enable_threads+set}" = set; then sl@0: enableval="$enable_threads" sl@0: tcl_ok=$enableval sl@0: else sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: sl@0: if test "${TCL_THREADS}" = 1; then sl@0: tcl_threaded_core=1; sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then sl@0: TCL_THREADS=1 sl@0: # USE_THREAD_ALLOC tells us to try the special thread-based sl@0: # allocator that significantly reduces lock contention sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_THREAD_ALLOC 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define _REENTRANT 1 sl@0: EOF sl@0: sl@0: if test "`uname -s`" = "SunOS" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define _POSIX_PTHREAD_SEMANTICS 1 sl@0: EOF sl@0: sl@0: fi sl@0: cat >> confdefs.h <<\EOF sl@0: #define _THREAD_SAFE 1 sl@0: EOF sl@0: sl@0: echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 sl@0: echo "configure:1519: checking for pthread_mutex_init in -lpthread" >&5 sl@0: ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lpthread $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "no"; then sl@0: # Check a little harder for __pthread_mutex_init in the same sl@0: # library, as some systems hide it there until pthread.h is sl@0: # defined. We could alternatively do an AC_TRY_COMPILE with sl@0: # pthread.h, but that will work with libpthread really doesn't sl@0: # exist, like AIX 4.2. [Bug: 4359] sl@0: echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 sl@0: echo "configure:1566: checking for __pthread_mutex_init in -lpthread" >&5 sl@0: ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lpthread $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "yes"; then sl@0: # The space is needed sl@0: THREADS_LIBS=" -lpthread" sl@0: else sl@0: echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 sl@0: echo "configure:1613: checking for pthread_mutex_init in -lpthreads" >&5 sl@0: ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lpthreads $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "yes"; then sl@0: # The space is needed sl@0: THREADS_LIBS=" -lpthreads" sl@0: else sl@0: echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 sl@0: echo "configure:1658: checking for pthread_mutex_init in -lc" >&5 sl@0: ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lc $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "no"; then sl@0: echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 sl@0: echo "configure:1700: checking for pthread_mutex_init in -lc_r" >&5 sl@0: ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lc_r $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "yes"; then sl@0: # The space is needed sl@0: THREADS_LIBS=" -pthread" sl@0: else sl@0: TCL_THREADS=0 sl@0: 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 sl@0: fi sl@0: fi sl@0: fi sl@0: fi sl@0: sl@0: # Does the pthread-implementation provide sl@0: # 'pthread_attr_setstacksize' ? sl@0: sl@0: ac_saved_libs=$LIBS sl@0: LIBS="$LIBS $THREADS_LIBS" sl@0: for ac_func in pthread_attr_setstacksize sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:1759: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: for ac_func in pthread_atfork sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:1814: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: LIBS=$ac_saved_libs sl@0: else sl@0: TCL_THREADS=0 sl@0: fi sl@0: # Do checking message here to not mess up interleaved configure output sl@0: echo $ac_n "checking for building with threads""... $ac_c" 1>&6 sl@0: echo "configure:1872: checking for building with threads" >&5 sl@0: if test "${TCL_THREADS}" = 1; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_THREADS 1 sl@0: EOF sl@0: sl@0: if test "${tcl_threaded_core}" = 1; then sl@0: echo "$ac_t""yes (threaded core)" 1>&6 sl@0: else sl@0: echo "$ac_t""yes" 1>&6 sl@0: fi sl@0: else sl@0: echo "$ac_t""no (default)" 1>&6 sl@0: fi sl@0: sl@0: sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Look for libraries that we will need when compiling the Tcl shell sl@0: #-------------------------------------------------------------------- sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # On a few very rare systems, all of the libm.a stuff is sl@0: # already in libc.a. Set compiler flags accordingly. sl@0: # Also, Linux requires the "ieee" library for math to work sl@0: # right (and it must appear before "-lm"). sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for sin""... $ac_c" 1>&6 sl@0: echo "configure:1903: checking for sin" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char sin(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_sin) || defined (__stub___sin) sl@0: choke me sl@0: #else sl@0: sin(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_sin=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_sin=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: MATH_LIBS="" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: MATH_LIBS="-lm" sl@0: fi sl@0: sl@0: echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 sl@0: echo "configure:1952: checking for main in -lieee" >&5 sl@0: ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lieee $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: MATH_LIBS="-lieee $MATH_LIBS" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Interactive UNIX requires -linet instead of -lsocket, plus it sl@0: # needs net/errno.h to define the socket-related error codes. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for main in -linet""... $ac_c" 1>&6 sl@0: echo "configure:1994: checking for main in -linet" >&5 sl@0: ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-linet $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: LIBS="$LIBS -linet" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6 sl@0: echo "configure:2031: checking for net/errno.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_NET_ERRNO_H 1 sl@0: EOF sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for the existence of the -lsocket and -lnsl libraries. sl@0: # The order here is important, so that they end up in the right sl@0: # order in the command line generated by make. Here are some sl@0: # special considerations: sl@0: # 1. Use "connect" and "accept" to check for -lsocket, and sl@0: # "gethostbyname" to check for -lnsl. sl@0: # 2. Use each function name only once: can't redo a check because sl@0: # autoconf caches the results of the last check and won't redo it. sl@0: # 3. Use -lnsl and -lsocket only if they supply procedures that sl@0: # aren't already present in the normal libraries. This is because sl@0: # IRIX 5.2 has libraries, but they aren't needed and they're sl@0: # bogus: they goof up name resolution if used. sl@0: # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. sl@0: # To get around this problem, check for both libraries together sl@0: # if -lsocket doesn't work by itself. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: tcl_checkBoth=0 sl@0: echo $ac_n "checking for connect""... $ac_c" 1>&6 sl@0: echo "configure:2086: checking for connect" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char connect(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_connect) || defined (__stub___connect) sl@0: choke me sl@0: #else sl@0: connect(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_connect=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_connect=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_checkSocket=0 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_checkSocket=1 sl@0: fi sl@0: sl@0: if test "$tcl_checkSocket" = 1; then sl@0: echo $ac_n "checking for setsockopt""... $ac_c" 1>&6 sl@0: echo "configure:2136: checking for setsockopt" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char setsockopt(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_setsockopt) || defined (__stub___setsockopt) sl@0: choke me sl@0: #else sl@0: setsockopt(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_setsockopt=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_setsockopt=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6 sl@0: echo "configure:2182: checking for setsockopt in -lsocket" >&5 sl@0: ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lsocket $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: LIBS="$LIBS -lsocket" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_checkBoth=1 sl@0: fi sl@0: sl@0: fi sl@0: sl@0: fi sl@0: if test "$tcl_checkBoth" = 1; then sl@0: tk_oldLibs=$LIBS sl@0: LIBS="$LIBS -lsocket -lnsl" sl@0: echo $ac_n "checking for accept""... $ac_c" 1>&6 sl@0: echo "configure:2229: checking for accept" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char accept(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_accept) || defined (__stub___accept) sl@0: choke me sl@0: #else sl@0: accept(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_accept=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_accept=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_checkNsl=0 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: LIBS=$tk_oldLibs sl@0: fi sl@0: sl@0: fi sl@0: echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 sl@0: echo "configure:2279: checking for gethostbyname" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char gethostbyname(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) sl@0: choke me sl@0: #else sl@0: gethostbyname(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyname=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyname=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 sl@0: echo "configure:2325: checking for gethostbyname in -lnsl" >&5 sl@0: ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lnsl $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: LIBS="$LIBS -lnsl" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: fi sl@0: sl@0: sl@0: # Don't perform the eval of the libraries here because DL_LIBS sl@0: # won't be set until we call SC_CONFIG_CFLAGS sl@0: sl@0: TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' sl@0: sl@0: sl@0: sl@0: sl@0: # Add the threads support libraries sl@0: LIBS="$LIBS$THREADS_LIBS" sl@0: sl@0: sl@0: echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 sl@0: echo "configure:2380: checking how to build libraries" >&5 sl@0: # Check whether --enable-shared or --disable-shared was given. sl@0: if test "${enable_shared+set}" = set; then sl@0: enableval="$enable_shared" sl@0: tcl_ok=$enableval sl@0: else sl@0: tcl_ok=yes sl@0: fi sl@0: sl@0: sl@0: if test "${enable_shared+set}" = set; then sl@0: enableval="$enable_shared" sl@0: tcl_ok=$enableval sl@0: else sl@0: tcl_ok=yes sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "yes" ; then sl@0: echo "$ac_t""shared" 1>&6 sl@0: SHARED_BUILD=1 sl@0: else sl@0: echo "$ac_t""static" 1>&6 sl@0: SHARED_BUILD=0 sl@0: cat >> confdefs.h <<\EOF sl@0: #define STATIC_BUILD 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The statements below define a collection of compile flags. This sl@0: # macro depends on the value of SHARED_BUILD, and should be called sl@0: # after SC_ENABLE_SHARED checks the configure switches. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: # Extract the first word of "ranlib", so it can be a program name with args. sl@0: set dummy ranlib; ac_word=$2 sl@0: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 sl@0: echo "configure:2419: checking for $ac_word" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test -n "$RANLIB"; then sl@0: ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. sl@0: else sl@0: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" sl@0: ac_dummy="$PATH" sl@0: for ac_dir in $ac_dummy; do sl@0: test -z "$ac_dir" && ac_dir=. sl@0: if test -f $ac_dir/$ac_word; then sl@0: ac_cv_prog_RANLIB="ranlib" sl@0: break sl@0: fi sl@0: done sl@0: IFS="$ac_save_ifs" sl@0: test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" sl@0: fi sl@0: fi sl@0: RANLIB="$ac_cv_prog_RANLIB" sl@0: if test -n "$RANLIB"; then sl@0: echo "$ac_t""$RANLIB" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: sl@0: sl@0: # Step 0.a: Enable 64 bit support? sl@0: sl@0: echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 sl@0: echo "configure:2451: checking if 64bit support is requested" >&5 sl@0: # Check whether --enable-64bit or --disable-64bit was given. sl@0: if test "${enable_64bit+set}" = set; then sl@0: enableval="$enable_64bit" sl@0: do64bit=$enableval sl@0: else sl@0: do64bit=no sl@0: fi sl@0: sl@0: echo "$ac_t""$do64bit" 1>&6 sl@0: sl@0: # Step 0.b: Enable Solaris 64 bit VIS support? sl@0: sl@0: echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 sl@0: echo "configure:2465: checking if 64bit Sparc VIS support is requested" >&5 sl@0: # Check whether --enable-64bit-vis or --disable-64bit-vis was given. sl@0: if test "${enable_64bit_vis+set}" = set; then sl@0: enableval="$enable_64bit_vis" sl@0: do64bitVIS=$enableval sl@0: else sl@0: do64bitVIS=no sl@0: fi sl@0: sl@0: echo "$ac_t""$do64bitVIS" 1>&6 sl@0: sl@0: if test "$do64bitVIS" = "yes"; then sl@0: # Force 64bit on with VIS sl@0: do64bit=yes sl@0: fi sl@0: sl@0: # Step 1: set the variable "system" to hold the name and version number sl@0: # for the system. sl@0: sl@0: sl@0: echo $ac_n "checking system version""... $ac_c" 1>&6 sl@0: echo "configure:2486: checking system version" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test -f /usr/lib/NextStep/software_version; then sl@0: tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` sl@0: else sl@0: tcl_cv_sys_version=`uname -s`-`uname -r` sl@0: if test "$?" -ne 0 ; then sl@0: echo "configure: warning: can't find uname command" 1>&2 sl@0: tcl_cv_sys_version=unknown sl@0: else sl@0: # Special check for weird MP-RAS system (uname returns weird sl@0: # results, and the version is kept in special file). sl@0: sl@0: if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then sl@0: tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` sl@0: fi sl@0: if test "`uname -s`" = "AIX" ; then sl@0: tcl_cv_sys_version=AIX-`uname -v`.`uname -r` sl@0: fi sl@0: fi sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_sys_version" 1>&6 sl@0: system=$tcl_cv_sys_version sl@0: sl@0: sl@0: # Step 2: check for existence of -ldl library. This is needed because sl@0: # Linux can use either -ldl or -ldld for dynamic loading. sl@0: sl@0: echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 sl@0: echo "configure:2521: checking for dlopen in -ldl" >&5 sl@0: ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-ldl $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: have_dl=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: have_dl=no sl@0: fi sl@0: sl@0: sl@0: # Require ranlib early so we can override it in special cases below. sl@0: sl@0: sl@0: sl@0: # Step 3: set configuration options based on system name and version. sl@0: sl@0: do64bit_ok=no sl@0: LDFLAGS_ORIG="$LDFLAGS" sl@0: TCL_EXPORT_FILE_SUFFIX="" sl@0: UNSHARED_LIB_SUFFIX="" sl@0: TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' sl@0: ECHO_VERSION='`echo ${VERSION}`' sl@0: TCL_LIB_VERSIONS_OK=ok sl@0: CFLAGS_DEBUG=-g sl@0: CFLAGS_OPTIMIZE=-O sl@0: if test "$GCC" = "yes" ; then sl@0: CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing" sl@0: else sl@0: CFLAGS_WARNING="" sl@0: fi sl@0: TCL_NEEDS_EXP_FILE=0 sl@0: TCL_BUILD_EXP_FILE="" sl@0: TCL_EXP_FILE="" sl@0: # Extract the first word of "ar", so it can be a program name with args. sl@0: set dummy ar; ac_word=$2 sl@0: echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 sl@0: echo "configure:2588: checking for $ac_word" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test -n "$AR"; then sl@0: ac_cv_prog_AR="$AR" # Let the user override the test. sl@0: else sl@0: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" sl@0: ac_dummy="$PATH" sl@0: for ac_dir in $ac_dummy; do sl@0: test -z "$ac_dir" && ac_dir=. sl@0: if test -f $ac_dir/$ac_word; then sl@0: ac_cv_prog_AR="ar" sl@0: break sl@0: fi sl@0: done sl@0: IFS="$ac_save_ifs" sl@0: fi sl@0: fi sl@0: AR="$ac_cv_prog_AR" sl@0: if test -n "$AR"; then sl@0: echo "$ac_t""$AR" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: if test "${AR}" = "" ; then sl@0: { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; } sl@0: fi sl@0: STLIB_LD='${AR} cr' sl@0: LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" sl@0: PLAT_OBJS="" sl@0: PLAT_SRCS="" sl@0: case $system in sl@0: AIX-*) sl@0: if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then sl@0: # AIX requires the _r compiler when gcc isn't being used sl@0: case "${CC}" in sl@0: *_r) sl@0: # ok ... sl@0: ;; sl@0: *) sl@0: CC=${CC}_r sl@0: ;; sl@0: esac sl@0: echo "$ac_t""Using $CC for compiling with threads" 1>&6 sl@0: fi sl@0: LIBS="$LIBS -lc" sl@0: SHLIB_CFLAGS="" sl@0: # Note: need the LIBS below, otherwise Tk won't find Tcl's sl@0: # symbols when dynamically loaded into tclsh. sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: sl@0: DL_OBJS="tclLoadDl.o" sl@0: LD_LIBRARY_PATH_VAR="LIBPATH" sl@0: sl@0: # Check to enable 64-bit flags for compiler/linker on AIX 4+ sl@0: if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2 sl@0: else sl@0: do64bit_ok=yes sl@0: CFLAGS="$CFLAGS -q64" sl@0: LDFLAGS="$LDFLAGS -q64" sl@0: RANLIB="${RANLIB} -X64" sl@0: AR="${AR} -X64" sl@0: SHLIB_LD_FLAGS="-b64" sl@0: fi sl@0: fi sl@0: sl@0: if test "`uname -m`" = "ia64" ; then sl@0: # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC sl@0: SHLIB_LD="/usr/ccs/bin/ld -G -z text" sl@0: # AIX-5 has dl* in libc.so sl@0: DL_LIBS="" sl@0: if test "$GCC" = "yes" ; then sl@0: CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' sl@0: else sl@0: CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' sl@0: fi sl@0: LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' sl@0: else sl@0: if test "$GCC" = "yes" ; then sl@0: SHLIB_LD="gcc -shared" sl@0: else sl@0: SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" sl@0: fi sl@0: SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: TCL_NEEDS_EXP_FILE=1 sl@0: TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' sl@0: fi sl@0: sl@0: # AIX v<=4.1 has some different flags than 4.2+ sl@0: if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then sl@0: LIBOBJS="$LIBOBJS tclLoadAix.o" sl@0: DL_LIBS="-lld" sl@0: fi sl@0: sl@0: # On AIX <=v4 systems, libbsd.a has to be linked in to support sl@0: # non-blocking file IO. This library has to be linked in after sl@0: # the MATH_LIBS or it breaks the pow() function. The way to sl@0: # insure proper sequencing, is to add it to the tail of MATH_LIBS. sl@0: # This library also supplies gettimeofday. sl@0: # sl@0: # AIX does not have a timezone field in struct tm. When the AIX sl@0: # bsd library is used, the timezone global and the gettimeofday sl@0: # methods are to be avoided for timezone deduction instead, we sl@0: # deduce the timezone by comparing the localtime result on a sl@0: # known GMT value. sl@0: sl@0: echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 sl@0: echo "configure:2703: checking for gettimeofday in -lbsd" >&5 sl@0: ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lbsd $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: libbsd=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: libbsd=no sl@0: fi sl@0: sl@0: if test $libbsd = yes; then sl@0: MATH_LIBS="$MATH_LIBS -lbsd" sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_DELTA_FOR_TZ 1 sl@0: EOF sl@0: sl@0: fi sl@0: ;; sl@0: BeOS*) sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD="${CC} -nostart" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: sl@0: #----------------------------------------------------------- sl@0: # Check for inet_ntoa in -lbind, for BeOS (which also needs sl@0: # -lsocket, even if the network functions are in -lnet which sl@0: # is always linked to, for compatibility. sl@0: #----------------------------------------------------------- sl@0: echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6 sl@0: echo "configure:2765: checking for inet_ntoa in -lbind" >&5 sl@0: ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lbind $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: LIBS="$LIBS -lbind -lsocket" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: ;; sl@0: BSD/OS-2.1*|BSD/OS-3*) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="shlicc -r" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: BSD/OS-4.*) sl@0: SHLIB_CFLAGS="-export-dynamic -fPIC" sl@0: SHLIB_LD="cc -shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: LDFLAGS="$LDFLAGS -export-dynamic" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: dgux*) sl@0: SHLIB_CFLAGS="-K PIC" sl@0: SHLIB_LD="cc -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: HP-UX-*.11.*) sl@0: # Use updated header definitions where possible sl@0: cat >> confdefs.h <<\EOF sl@0: #define _XOPEN_SOURCE 1 sl@0: EOF sl@0: # Use the XOPEN network library sl@0: cat >> confdefs.h <<\EOF sl@0: #define _XOPEN_SOURCE_EXTENDED 1 sl@0: EOF sl@0: # Use the XOPEN network library sl@0: LIBS="$LIBS -lxnet" # Use the XOPEN network library sl@0: sl@0: if test "`uname -m`" = "ia64" ; then sl@0: SHLIB_SUFFIX=".so" sl@0: else sl@0: SHLIB_SUFFIX=".sl" sl@0: fi sl@0: echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 sl@0: echo "configure:2854: checking for shl_load in -ldld" >&5 sl@0: ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-ldld $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = yes; then sl@0: SHLIB_CFLAGS="+z" sl@0: SHLIB_LD="ld -b" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: DL_OBJS="tclLoadShl.o" sl@0: DL_LIBS="-ldld" sl@0: LDFLAGS="$LDFLAGS -Wl,-E" sl@0: CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' sl@0: LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' sl@0: LD_LIBRARY_PATH_VAR="SHLIB_PATH" sl@0: fi sl@0: if test "$GCC" = "yes" ; then sl@0: SHLIB_LD="gcc -shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: fi sl@0: sl@0: # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc sl@0: #CFLAGS="$CFLAGS +DAportable" sl@0: sl@0: # Check to enable 64-bit flags for compiler/linker sl@0: if test "$do64bit" = "yes" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: hpux_arch=`${CC} -dumpmachine` sl@0: case $hpux_arch in sl@0: hppa64*) sl@0: # 64-bit gcc in use. Fix flags for GNU ld. sl@0: do64bit_ok=yes sl@0: SHLIB_LD="${CC} -shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: ;; sl@0: *) sl@0: echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2 sl@0: ;; sl@0: esac sl@0: else sl@0: do64bit_ok=yes sl@0: CFLAGS="$CFLAGS +DD64" sl@0: LDFLAGS="$LDFLAGS +DD64" sl@0: fi sl@0: fi sl@0: ;; sl@0: HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) sl@0: SHLIB_SUFFIX=".sl" sl@0: echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 sl@0: echo "configure:2941: checking for shl_load in -ldld" >&5 sl@0: ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-ldld $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: if test "$tcl_ok" = yes; then sl@0: SHLIB_CFLAGS="+z" sl@0: SHLIB_LD="ld -b" sl@0: SHLIB_LD_LIBS="" sl@0: DL_OBJS="tclLoadShl.o" sl@0: DL_LIBS="-ldld" sl@0: LDFLAGS="$LDFLAGS -Wl,-E" sl@0: CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' sl@0: LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' sl@0: LD_LIBRARY_PATH_VAR="SHLIB_PATH" sl@0: fi sl@0: ;; sl@0: IRIX-4.*) sl@0: SHLIB_CFLAGS="-G 0" sl@0: SHLIB_SUFFIX=".a" sl@0: SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: DL_OBJS="tclLoadAout.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="$LDFLAGS -Wl,-D,08000000" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' sl@0: ;; sl@0: IRIX-5.*) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="ld -shared -rdata_shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: ;; sl@0: IRIX-6.*) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="ld -n32 -shared -rdata_shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: if test "$GCC" = "yes" ; then sl@0: CFLAGS="$CFLAGS -mabi=n32" sl@0: LDFLAGS="$LDFLAGS -mabi=n32" sl@0: else sl@0: case $system in sl@0: IRIX-6.3) sl@0: # Use to build 6.2 compatible binaries on 6.3. sl@0: CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" sl@0: ;; sl@0: *) sl@0: CFLAGS="$CFLAGS -n32" sl@0: ;; sl@0: esac sl@0: LDFLAGS="$LDFLAGS -n32" sl@0: fi sl@0: ;; sl@0: IRIX64-6.*) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="ld -n32 -shared -rdata_shared" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: sl@0: # Check to enable 64-bit flags for compiler/linker sl@0: sl@0: if test "$do64bit" = "yes" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: echo "configure: warning: 64bit mode not supported by gcc" 1>&2 sl@0: else sl@0: do64bit_ok=yes sl@0: SHLIB_LD="ld -64 -shared -rdata_shared" sl@0: CFLAGS="$CFLAGS -64" sl@0: LDFLAGS="$LDFLAGS -64" sl@0: fi sl@0: fi sl@0: ;; sl@0: Linux*) sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: sl@0: CFLAGS_OPTIMIZE=-O2 sl@0: # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings sl@0: # when you inline the string and math operations. Turn this off to sl@0: # get rid of the warnings. sl@0: #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" sl@0: sl@0: if test "$have_dl" = yes; then sl@0: SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: LDFLAGS="$LDFLAGS -Wl,--export-dynamic" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: else sl@0: ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for dld.h""... $ac_c" 1>&6 sl@0: echo "configure:3084: checking for dld.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: SHLIB_LD="ld -shared" sl@0: DL_OBJS="tclLoadDld.o" sl@0: DL_LIBS="-ldld" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: fi sl@0: if test "`uname -m`" = "alpha" ; then sl@0: CFLAGS="$CFLAGS -mieee" sl@0: fi sl@0: if test $do64bit = yes; then sl@0: echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6 sl@0: echo "configure:3126: checking if compiler accepts -m64 flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS sl@0: CFLAGS="$CFLAGS -m64" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_cc_m64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_cc_m64=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_cc_m64" 1>&6 sl@0: if test $tcl_cv_cc_m64 = yes; then sl@0: CFLAGS="$CFLAGS -m64" sl@0: do64bit_ok=yes sl@0: fi sl@0: fi sl@0: sl@0: # The combo of gcc + glibc has a bug related sl@0: # to inlining of functions like strtod(). The sl@0: # -fno-builtin flag should address this problem sl@0: # but it does not work. The -fno-inline flag sl@0: # is kind of overkill but it works. sl@0: # Disable inlining only when one of the sl@0: # files in compat/*.c is being linked in. sl@0: if test x"${LIBOBJS}" != x ; then sl@0: CFLAGS="$CFLAGS -fno-inline" sl@0: fi sl@0: sl@0: # XIM peeking works under XFree86. sl@0: cat >> confdefs.h <<\EOF sl@0: #define PEEK_XCLOSEIM 1 sl@0: EOF sl@0: sl@0: sl@0: ;; sl@0: GNU*) sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: sl@0: if test "$have_dl" = yes; then sl@0: SHLIB_LD="${CC} -shared" sl@0: DL_OBJS="" sl@0: DL_LIBS="-ldl" sl@0: LDFLAGS="$LDFLAGS -Wl,--export-dynamic" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: else sl@0: ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for dld.h""... $ac_c" 1>&6 sl@0: echo "configure:3194: checking for dld.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: SHLIB_LD="ld -shared" sl@0: DL_OBJS="" sl@0: DL_LIBS="-ldld" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: fi sl@0: if test "`uname -m`" = "alpha" ; then sl@0: CFLAGS="$CFLAGS -mieee" sl@0: fi sl@0: ;; sl@0: Lynx*) sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: CFLAGS_OPTIMIZE=-02 sl@0: SHLIB_LD="${CC} -shared " sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-mshared -ldl" sl@0: LD_FLAGS="-Wl,--export-dynamic" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: ;; sl@0: MP-RAS-02*) sl@0: SHLIB_CFLAGS="-K PIC" sl@0: SHLIB_LD="cc -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: MP-RAS-*) sl@0: SHLIB_CFLAGS="-K PIC" sl@0: SHLIB_LD="cc -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: LDFLAGS="$LDFLAGS -Wl,-Bexport" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: NetBSD-*|FreeBSD-[1-2].*) sl@0: # Not available on all versions: check for include file. sl@0: ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 sl@0: echo "configure:3272: checking for dlfcn.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: # NetBSD/SPARC needs -fPIC, -fpic will not do. sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD="ld -Bshareable -x" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: echo $ac_n "checking for ELF""... $ac_c" 1>&6 sl@0: echo "configure:3309: checking for ELF" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext <&5 | sl@0: egrep "yes" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: tcl_cv_ld_elf=yes sl@0: else sl@0: rm -rf conftest* sl@0: tcl_cv_ld_elf=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_ld_elf" 1>&6 sl@0: if test $tcl_cv_ld_elf = yes; then sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' sl@0: else sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".a" sl@0: DL_OBJS="tclLoadAout.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: sl@0: fi sl@0: sl@0: sl@0: # FreeBSD doesn't handle version numbers with dots. sl@0: sl@0: UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: TCL_LIB_VERSIONS_OK=nodots sl@0: ;; sl@0: OpenBSD-*) sl@0: case `arch -s` in sl@0: m88k|vax) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".a" sl@0: DL_OBJS="tclLoadAout.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: ;; sl@0: *) sl@0: # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. sl@0: case `machine` in sl@0: sparc|sparc64) sl@0: SHLIB_CFLAGS="-fPIC";; sl@0: *) sl@0: SHLIB_CFLAGS="-fpic";; sl@0: esac sl@0: SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' sl@0: echo $ac_n "checking for ELF""... $ac_c" 1>&6 sl@0: echo "configure:3394: checking for ELF" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext <&5 | sl@0: egrep "yes" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: tcl_cv_ld_elf=yes sl@0: else sl@0: rm -rf conftest* sl@0: tcl_cv_ld_elf=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_ld_elf" 1>&6 sl@0: if test $tcl_cv_ld_elf = yes; then sl@0: LDFLAGS=-Wl,-export-dynamic sl@0: else sl@0: LDFLAGS="" sl@0: fi sl@0: ;; sl@0: esac sl@0: sl@0: # OpenBSD doesn't do version numbers with dots. sl@0: UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: TCL_LIB_VERSIONS_OK=nodots sl@0: ;; sl@0: FreeBSD-*) sl@0: # FreeBSD 3.* and greater have ELF. sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD="ld -Bshareable -x" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="$LDFLAGS -export-dynamic" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: if test "${TCL_THREADS}" = "1" ; then sl@0: # The -pthread needs to go in the CFLAGS, not LIBS sl@0: LIBS=`echo $LIBS | sed s/-pthread//` sl@0: CFLAGS="$CFLAGS -pthread" sl@0: LDFLAGS="$LDFLAGS -pthread" sl@0: fi sl@0: case $system in sl@0: FreeBSD-3.*) sl@0: # FreeBSD-3 doesn't handle version numbers with dots. sl@0: UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' sl@0: TCL_LIB_VERSIONS_OK=nodots sl@0: ;; sl@0: esac sl@0: ;; sl@0: Darwin-*) sl@0: CFLAGS_OPTIMIZE="-Os" sl@0: SHLIB_CFLAGS="-fno-common" sl@0: # To avoid discrepancies between what headers configure sees during sl@0: # preprocessing tests and compiling tests, move any -isysroot and sl@0: # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: sl@0: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ sl@0: awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ sl@0: if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" sl@0: CFLAGS="`echo " ${CFLAGS}" | \ sl@0: awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ sl@0: if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" sl@0: if test $do64bit = yes; then sl@0: case `arch` in sl@0: ppc) sl@0: echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6 sl@0: echo "configure:3475: checking if compiler accepts -arch ppc64 flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS sl@0: CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_cc_arch_ppc64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_cc_arch_ppc64=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6 sl@0: if test $tcl_cv_cc_arch_ppc64 = yes; then sl@0: CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" sl@0: do64bit_ok=yes sl@0: fi;; sl@0: i386) sl@0: echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6 sl@0: echo "configure:3510: checking if compiler accepts -arch x86_64 flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS sl@0: CFLAGS="$CFLAGS -arch x86_64" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_cc_arch_x86_64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_cc_arch_x86_64=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6 sl@0: if test $tcl_cv_cc_arch_x86_64 = yes; then sl@0: CFLAGS="$CFLAGS -arch x86_64" sl@0: do64bit_ok=yes sl@0: fi;; sl@0: *) sl@0: echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;; sl@0: esac sl@0: else sl@0: # Check for combined 32-bit and 64-bit fat build sl@0: echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ sl@0: echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ sl@0: fat_32_64=yes sl@0: fi sl@0: SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' sl@0: echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 sl@0: echo "configure:3554: checking if ld accepts -single_module flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_ldflags=$LDFLAGS sl@0: LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_ld_single_module=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_ld_single_module=no sl@0: fi sl@0: rm -f conftest* sl@0: LDFLAGS=$hold_ldflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 sl@0: if test $tcl_cv_ld_single_module = yes; then sl@0: SHLIB_LD="${SHLIB_LD} -Wl,-single_module" sl@0: fi sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".dylib" sl@0: DL_OBJS="tclLoadDyld.o" sl@0: DL_LIBS="" sl@0: # Don't use -prebind when building for Mac OS X 10.4 or later only: sl@0: test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ sl@0: "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \ sl@0: LDFLAGS="$LDFLAGS -prebind" sl@0: LDFLAGS="$LDFLAGS -headerpad_max_install_names" sl@0: echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 sl@0: echo "configure:3596: checking if ld accepts -search_paths_first flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_ldflags=$LDFLAGS sl@0: LDFLAGS="$LDFLAGS -Wl,-search_paths_first" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_ld_search_paths_first=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_ld_search_paths_first=no sl@0: fi sl@0: rm -f conftest* sl@0: LDFLAGS=$hold_ldflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6 sl@0: if test $tcl_cv_ld_search_paths_first = yes; then sl@0: LDFLAGS="$LDFLAGS -Wl,-search_paths_first" sl@0: fi sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" sl@0: PLAT_OBJS=\$\(MAC\_OSX_OBJS\) sl@0: PLAT_SRCS=\$\(MAC\_OSX_SRCS\) sl@0: echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6 sl@0: echo "configure:3634: checking whether to use CoreFoundation" >&5 sl@0: # Check whether --enable-corefoundation or --disable-corefoundation was given. sl@0: if test "${enable_corefoundation+set}" = set; then sl@0: enableval="$enable_corefoundation" sl@0: tcl_corefoundation=$enableval sl@0: else sl@0: tcl_corefoundation=yes sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_corefoundation" 1>&6 sl@0: if test $tcl_corefoundation = yes; then sl@0: echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6 sl@0: echo "configure:3646: checking for CoreFoundation.framework" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_libs=$LIBS; hold_cflags=$CFLAGS sl@0: if test "$fat_32_64" = yes; then sl@0: # On Tiger there is no 64-bit CF, so remove 64-bit archs sl@0: # from CFLAGS while testing for presence of CF. sl@0: # 64-bit CF is disabled in tclUnixPort.h if necessary. sl@0: CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" sl@0: fi sl@0: LIBS="$LIBS -framework CoreFoundation" sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: CFBundleRef b = CFBundleGetMainBundle(); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_lib_corefoundation=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_lib_corefoundation=no sl@0: fi sl@0: rm -f conftest* sl@0: LIBS=$hold_libs; CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6 sl@0: if test $tcl_cv_lib_corefoundation = yes; then sl@0: LIBS="$LIBS -framework CoreFoundation" sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_COREFOUNDATION 1 sl@0: EOF sl@0: sl@0: else sl@0: tcl_corefoundation=no sl@0: fi sl@0: if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then sl@0: echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6 sl@0: echo "configure:3692: checking for 64-bit CoreFoundation" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS sl@0: CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`" sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: CFBundleRef b = CFBundleGetMainBundle(); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_lib_corefoundation_64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_lib_corefoundation_64=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6 sl@0: if test $tcl_cv_lib_corefoundation_64 = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_COREFOUNDATION_64 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: fi sl@0: cat >> confdefs.h <<\EOF sl@0: #define MAC_OSX_TCL 1 sl@0: EOF sl@0: sl@0: ;; sl@0: NEXTSTEP-*) sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="cc -nostdlib -r" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadNext.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: OS/390-*) sl@0: CFLAGS_OPTIMIZE="" # Optimizer is buggy sl@0: cat >> confdefs.h <<\EOF sl@0: #define _OE_SOCKETS 1 sl@0: EOF sl@0: # needed in sys/socket.h sl@0: ;; sl@0: OSF1-1.0|OSF1-1.1|OSF1-1.2) sl@0: # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 sl@0: SHLIB_CFLAGS="" sl@0: # Hack: make package name same as library name sl@0: SHLIB_LD='ld -R -export :' sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadOSF.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: OSF1-1.*) sl@0: # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 sl@0: SHLIB_CFLAGS="-fPIC" sl@0: if test "$SHARED_BUILD" = "1" ; then sl@0: SHLIB_LD="ld -shared" sl@0: else sl@0: SHLIB_LD="ld -non_shared" sl@0: fi sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: OSF1-V*) sl@0: # Digital OSF/1 sl@0: SHLIB_CFLAGS="" sl@0: if test "$SHARED_BUILD" = "1" ; then sl@0: SHLIB_LD='ld -shared -expect_unresolved "*"' sl@0: else sl@0: SHLIB_LD='ld -non_shared -expect_unresolved "*"' sl@0: fi sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' sl@0: if test "$GCC" = "yes" ; then sl@0: CFLAGS="$CFLAGS -mieee" sl@0: else sl@0: CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" sl@0: fi sl@0: # see pthread_intro(3) for pthread support on osf1, k.furukawa sl@0: if test "${TCL_THREADS}" = "1" ; then sl@0: CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" sl@0: CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" sl@0: LIBS=`echo $LIBS | sed s/-lpthreads//` sl@0: if test "$GCC" = "yes" ; then sl@0: LIBS="$LIBS -lpthread -lmach -lexc" sl@0: else sl@0: CFLAGS="$CFLAGS -pthread" sl@0: LDFLAGS="$LDFLAGS -pthread" sl@0: fi sl@0: fi sl@0: sl@0: ;; sl@0: QNX-6*) sl@0: # QNX RTP sl@0: # This may work for all QNX, but it was only reported for v6. sl@0: SHLIB_CFLAGS="-fPIC" sl@0: SHLIB_LD="ld -Bshareable -x" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: # dlopen is in -lc on QNX sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: RISCos-*) sl@0: SHLIB_CFLAGS="-G 0" sl@0: SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".a" sl@0: DL_OBJS="tclLoadAout.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="$LDFLAGS -Wl,-D,08000000" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: ;; sl@0: SCO_SV-3.2*) sl@0: # Note, dlopen is available only on SCO 3.2.5 and greater. However, sl@0: # this test works, since "uname -s" was non-standard in 3.2.4 and sl@0: # below. sl@0: if test "$GCC" = "yes" ; then sl@0: SHLIB_CFLAGS="-fPIC -melf" sl@0: LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" sl@0: else sl@0: SHLIB_CFLAGS="-Kpic -belf" sl@0: LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" sl@0: fi sl@0: SHLIB_LD="ld -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: SINIX*5.4*) sl@0: SHLIB_CFLAGS="-K PIC" sl@0: SHLIB_LD="cc -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: SunOS-4*) sl@0: SHLIB_CFLAGS="-PIC" sl@0: SHLIB_LD="ld" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: sl@0: # SunOS can't handle version numbers with dots in them in library sl@0: # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it sl@0: # requires an extra version number at the end of .so file names. sl@0: # So, the library has to have a name like libtcl75.so.1.0 sl@0: sl@0: SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' sl@0: UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' sl@0: TCL_LIB_VERSIONS_OK=nodots sl@0: ;; sl@0: SunOS-5.[0-6]) sl@0: # Careful to not let 5.10+ fall into this case sl@0: sl@0: # Note: If _REENTRANT isn't defined, then Solaris sl@0: # won't define thread-safe library routines. sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define _REENTRANT 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define _POSIX_PTHREAD_SEMANTICS 1 sl@0: EOF sl@0: sl@0: sl@0: SHLIB_CFLAGS="-KPIC" sl@0: sl@0: # Note: need the LIBS below, otherwise Tk won't find Tcl's sl@0: # symbols when dynamically loaded into tclsh. sl@0: sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: if test "$GCC" = "yes" ; then sl@0: SHLIB_LD="$CC -shared" sl@0: CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: else sl@0: SHLIB_LD="/usr/ccs/bin/ld -G -z text" sl@0: CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: fi sl@0: ;; sl@0: SunOS-5*) sl@0: # Note: If _REENTRANT isn't defined, then Solaris sl@0: # won't define thread-safe library routines. sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define _REENTRANT 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define _POSIX_PTHREAD_SEMANTICS 1 sl@0: EOF sl@0: sl@0: sl@0: SHLIB_CFLAGS="-KPIC" sl@0: sl@0: # Check to enable 64-bit flags for compiler/linker sl@0: if test "$do64bit" = "yes" ; then sl@0: arch=`isainfo` sl@0: if test "$arch" = "sparcv9 sparc" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then sl@0: echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2 sl@0: else sl@0: do64bit_ok=yes sl@0: CFLAGS="$CFLAGS -m64 -mcpu=v9" sl@0: LDFLAGS="$LDFLAGS -m64 -mcpu=v9" sl@0: SHLIB_CFLAGS="-fPIC" sl@0: fi sl@0: else sl@0: do64bit_ok=yes sl@0: if test "$do64bitVIS" = "yes" ; then sl@0: CFLAGS="$CFLAGS -xarch=v9a" sl@0: LDFLAGS="$LDFLAGS -xarch=v9a" sl@0: else sl@0: CFLAGS="$CFLAGS -xarch=v9" sl@0: LDFLAGS="$LDFLAGS -xarch=v9" sl@0: fi sl@0: # Solaris 64 uses this as well sl@0: #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" sl@0: fi sl@0: elif test "$arch" = "amd64 i386" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2 sl@0: else sl@0: do64bit_ok=yes sl@0: CFLAGS="$CFLAGS -xarch=amd64" sl@0: LDFLAGS="$LDFLAGS -xarch=amd64" sl@0: fi sl@0: else sl@0: echo "configure: warning: 64bit mode not supported for $arch" 1>&2 sl@0: fi sl@0: fi sl@0: sl@0: # Note: need the LIBS below, otherwise Tk won't find Tcl's sl@0: # symbols when dynamically loaded into tclsh. sl@0: sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: if test "$GCC" = "yes" ; then sl@0: SHLIB_LD="$CC -shared" sl@0: CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: if test "$do64bit_ok" = "yes" ; then sl@0: # We need to specify -static-libgcc or we need to sl@0: # add the path to the sparv9 libgcc. sl@0: SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" sl@0: # for finding sparcv9 libgcc, get the regular libgcc sl@0: # path, remove so name and append 'sparcv9' sl@0: #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." sl@0: #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" sl@0: fi sl@0: else sl@0: SHLIB_LD="/usr/ccs/bin/ld -G -z text" sl@0: CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' sl@0: fi sl@0: ;; sl@0: ULTRIX-4.*) sl@0: SHLIB_CFLAGS="-G 0" sl@0: SHLIB_SUFFIX=".a" sl@0: SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" sl@0: SHLIB_LD_LIBS='${LIBS}' sl@0: DL_OBJS="tclLoadAout.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="$LDFLAGS -Wl,-D,08000000" sl@0: CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' sl@0: LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} sl@0: if test "$GCC" != "yes" ; then sl@0: CFLAGS="$CFLAGS -DHAVE_TZSET -std1" sl@0: fi sl@0: ;; sl@0: UNIX_SV* | UnixWare-5*) sl@0: SHLIB_CFLAGS="-KPIC" sl@0: SHLIB_LD="cc -G" sl@0: SHLIB_LD_LIBS="" sl@0: SHLIB_SUFFIX=".so" sl@0: DL_OBJS="tclLoadDl.o" sl@0: DL_LIBS="-ldl" sl@0: # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers sl@0: # that don't grok the -Bexport option. Test that it does. sl@0: echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 sl@0: echo "configure:4020: checking for ld accepts -Bexport flag" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_ldflags=$LDFLAGS sl@0: LDFLAGS="$LDFLAGS -Wl,-Bexport" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_ld_Bexport=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_ld_Bexport=no sl@0: fi sl@0: rm -f conftest* sl@0: LDFLAGS=$hold_ldflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 sl@0: if test $tcl_cv_ld_Bexport = yes; then sl@0: LDFLAGS="$LDFLAGS -Wl,-Bexport" sl@0: fi sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: ;; sl@0: esac sl@0: sl@0: if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then sl@0: echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2 sl@0: fi sl@0: sl@0: sl@0: sl@0: sl@0: # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic sl@0: # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, sl@0: # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need sl@0: # to determine which of several header files defines the a.out file sl@0: # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we sl@0: # support only a file format that is more or less version-7-compatible. sl@0: # In particular, sl@0: # - a.out files must begin with `struct exec'. sl@0: # - the N_TXTOFF on the `struct exec' must compute the seek address sl@0: # of the text segment sl@0: # - The `struct exec' must contain a_magic, a_text, a_data, a_bss sl@0: # and a_entry fields. sl@0: # The following compilation should succeed if and only if either sys/exec.h sl@0: # or a.out.h is usable for the purpose. sl@0: # sl@0: # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the sl@0: # `struct exec' includes a second header that contains information that sl@0: # duplicates the v7 fields that are needed. sl@0: sl@0: if test "x$DL_OBJS" = "xtclLoadAout.o" ; then sl@0: echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 sl@0: echo "configure:4085: checking sys/exec.h" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: sl@0: struct exec foo; sl@0: unsigned long seek; sl@0: int flag; sl@0: #if defined(__mips) || defined(mips) sl@0: seek = N_TXTOFF (foo.ex_f, foo.ex_o); sl@0: #else sl@0: seek = N_TXTOFF (foo); sl@0: #endif sl@0: flag = (foo.a_magic == OMAGIC); sl@0: return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_sysexec_h=usable sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_sysexec_h=unusable sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_sysexec_h" 1>&6 sl@0: if test $tcl_cv_sysexec_h = usable; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_SYS_EXEC_H 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking a.out.h""... $ac_c" 1>&6 sl@0: echo "configure:4129: checking a.out.h" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: sl@0: struct exec foo; sl@0: unsigned long seek; sl@0: int flag; sl@0: #if defined(__mips) || defined(mips) sl@0: seek = N_TXTOFF (foo.ex_f, foo.ex_o); sl@0: #else sl@0: seek = N_TXTOFF (foo); sl@0: #endif sl@0: flag = (foo.a_magic == OMAGIC); sl@0: return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_aout_h=usable sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_aout_h=unusable sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_aout_h" 1>&6 sl@0: if test $tcl_cv_aout_h = usable; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_A_OUT_H 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 sl@0: echo "configure:4173: checking sys/exec_aout.h" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: sl@0: struct exec foo; sl@0: unsigned long seek; sl@0: int flag; sl@0: #if defined(__mips) || defined(mips) sl@0: seek = N_TXTOFF (foo.ex_f, foo.ex_o); sl@0: #else sl@0: seek = N_TXTOFF (foo); sl@0: #endif sl@0: flag = (foo.a_midmag == OMAGIC); sl@0: return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_sysexecaout_h=usable sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_sysexecaout_h=unusable sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6 sl@0: if test $tcl_cv_sysexecaout_h = usable; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_SYS_EXEC_AOUT_H 1 sl@0: EOF sl@0: sl@0: else sl@0: DL_OBJS="" sl@0: fi sl@0: fi sl@0: fi sl@0: fi sl@0: sl@0: # Step 5: disable dynamic loading if requested via a command-line switch. sl@0: sl@0: # Check whether --enable-load or --disable-load was given. sl@0: if test "${enable_load+set}" = set; then sl@0: enableval="$enable_load" sl@0: tcl_ok=$enableval sl@0: else sl@0: tcl_ok=yes sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "no"; then sl@0: DL_OBJS="" sl@0: fi sl@0: sl@0: if test "x$DL_OBJS" != "x" ; then sl@0: BUILD_DLTEST="\$(DLTEST_TARGETS)" sl@0: else sl@0: echo "Can't figure out how to do dynamic loading or shared libraries" sl@0: echo "on this system." sl@0: SHLIB_CFLAGS="" sl@0: SHLIB_LD="" sl@0: SHLIB_SUFFIX="" sl@0: DL_OBJS="tclLoadNone.o" sl@0: DL_LIBS="" sl@0: LDFLAGS="$LDFLAGS_ORIG" sl@0: CC_SEARCH_FLAGS="" sl@0: LD_SEARCH_FLAGS="" sl@0: BUILD_DLTEST="" sl@0: fi sl@0: sl@0: # If we're running gcc, then change the C flags for compiling shared sl@0: # libraries to the right flags for gcc, instead of those for the sl@0: # standard manufacturer compiler. sl@0: sl@0: if test "$DL_OBJS" != "tclLoadNone.o" ; then sl@0: if test "$GCC" = "yes" ; then sl@0: case $system in sl@0: AIX-*) sl@0: ;; sl@0: BSD/OS*) sl@0: ;; sl@0: IRIX*) sl@0: ;; sl@0: NetBSD-*|FreeBSD-*|OpenBSD-*) sl@0: ;; sl@0: Darwin-*) sl@0: ;; sl@0: RISCos-*) sl@0: ;; sl@0: SCO_SV-3.2*) sl@0: ;; sl@0: ULTRIX-4.*) sl@0: ;; sl@0: *) sl@0: SHLIB_CFLAGS="-fPIC" sl@0: ;; sl@0: esac sl@0: fi sl@0: fi sl@0: sl@0: if test "$SHARED_LIB_SUFFIX" = "" ; then sl@0: SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' sl@0: fi sl@0: if test "$UNSHARED_LIB_SUFFIX" = "" ; then sl@0: UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' sl@0: fi sl@0: sl@0: if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then sl@0: LIB_SUFFIX=${SHARED_LIB_SUFFIX} sl@0: MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' sl@0: INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' sl@0: else sl@0: LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} sl@0: sl@0: if test "$RANLIB" = "" ; then sl@0: MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' sl@0: INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' sl@0: else sl@0: MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' sl@0: INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' sl@0: fi sl@0: sl@0: fi sl@0: sl@0: sl@0: # Stub lib does not depend on shared/static configuration sl@0: if test "$RANLIB" = "" ; then sl@0: MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' sl@0: INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)' sl@0: else sl@0: MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' sl@0: INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))' sl@0: fi sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 sl@0: echo "configure:4350: checking for build with symbols" >&5 sl@0: # Check whether --enable-symbols or --disable-symbols was given. sl@0: if test "${enable_symbols+set}" = set; then sl@0: enableval="$enable_symbols" sl@0: tcl_ok=$enableval sl@0: else sl@0: tcl_ok=no sl@0: fi sl@0: sl@0: # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. sl@0: if test "$tcl_ok" = "no"; then sl@0: CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' sl@0: LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' sl@0: DBGX="" sl@0: echo "$ac_t""no" 1>&6 sl@0: else sl@0: CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' sl@0: LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' sl@0: DBGX=g sl@0: if test "$tcl_ok" = "yes"; then sl@0: echo "$ac_t""yes (standard debugging)" 1>&6 sl@0: fi sl@0: fi sl@0: sl@0: sl@0: sl@0: if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_MEM_DEBUG 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_COMPILE_DEBUG 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_COMPILE_STATS 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then sl@0: if test "$tcl_ok" = "all"; then sl@0: echo "$ac_t""enabled symbols mem compile debugging" 1>&6 sl@0: else sl@0: echo "$ac_t""enabled $tcl_ok debugging" 1>&6 sl@0: fi sl@0: fi sl@0: sl@0: sl@0: TCL_DBGX=${DBGX} sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Detect what compiler flags to set for 64-bit support. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: sl@0: echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 sl@0: echo "configure:4411: checking for required early compiler flags" >&5 sl@0: tcl_flags="" sl@0: sl@0: if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: char *p = (char *)strtoll; char *q = (char *)strtoull; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__isoc99_source=no sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: char *p = (char *)strtoll; char *q = (char *)strtoull; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__isoc99_source=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_flag__isoc99_source=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define _ISOC99_SOURCE 1 sl@0: EOF sl@0: sl@0: tcl_flags="$tcl_flags _ISOC99_SOURCE" sl@0: fi sl@0: sl@0: sl@0: if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: struct stat64 buf; int i = stat64("/", &buf); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile64_source=no sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: struct stat64 buf; int i = stat64("/", &buf); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile64_source=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile64_source=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define _LARGEFILE64_SOURCE 1 sl@0: EOF sl@0: sl@0: tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" sl@0: fi sl@0: sl@0: sl@0: if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: char *p = (char *)open64; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile_source64=no sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: char *p = (char *)open64; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile_source64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_flag__largefile_source64=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define _LARGEFILE_SOURCE64 1 sl@0: EOF sl@0: sl@0: tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" sl@0: fi sl@0: sl@0: if test "x${tcl_flags}" = "x" ; then sl@0: echo "$ac_t""none" 1>&6 sl@0: else sl@0: echo "$ac_t""${tcl_flags}" 1>&6 sl@0: fi sl@0: sl@0: sl@0: sl@0: echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 sl@0: echo "configure:4572: checking for 64-bit integer type" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: tcl_cv_type_64bit=none sl@0: # See if the compiler knows natively about __int64 sl@0: cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_type_64bit=__int64 sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_type_64bit="long long" sl@0: fi sl@0: rm -f conftest* sl@0: # See if we should use long anyway Note that we substitute in the sl@0: # type that is our current guess for a 64-bit type inside this check sl@0: # program, so it should be modified only carefully... sl@0: cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_type_64bit=${tcl_type_64bit} sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if test "${tcl_cv_type_64bit}" = none ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_WIDE_INT_IS_LONG 1 sl@0: EOF sl@0: sl@0: echo "$ac_t""using long" 1>&6 sl@0: else sl@0: cat >> confdefs.h <&6 sl@0: sl@0: # Now check for auxiliary declarations sl@0: echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 sl@0: echo "configure:4635: checking for struct dirent64" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: struct dirent64 p; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_struct_dirent64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_struct_dirent64=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6 sl@0: if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_STRUCT_DIRENT64 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 sl@0: echo "configure:4670: checking for struct stat64" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: struct stat64 p; sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_struct_stat64=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_struct_stat64=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_struct_stat64" 1>&6 sl@0: if test "x${tcl_cv_struct_stat64}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_STRUCT_STAT64 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: for ac_func in open64 lseek64 sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:4707: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: echo $ac_n "checking for off64_t""... $ac_c" 1>&6 sl@0: echo "configure:4760: checking for off64_t" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: off64_t offset; sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_type_off64_t=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_type_off64_t=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if test "x${tcl_cv_type_off64_t}" = "xyes" && \ sl@0: test "x${ac_cv_func_lseek64}" = "xyes" && \ sl@0: test "x${ac_cv_func_open64}" = "xyes" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TYPE_OFF64_T 1 sl@0: EOF sl@0: sl@0: echo "$ac_t""yes" 1>&6 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check endianness because we can optimize comparisons of sl@0: # Tcl_UniChar strings to memcmp on big-endian systems. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 sl@0: echo "configure:4806: checking whether byte ordering is bigendian" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_cv_c_bigendian=unknown sl@0: # See if sys/param.h defines the BYTE_ORDER macro. sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: sl@0: #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN sl@0: bogus endian macros sl@0: #endif sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: # It does; now see whether it defined to BIG_ENDIAN or not. sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: sl@0: #if BYTE_ORDER != BIG_ENDIAN sl@0: not big endian sl@0: #endif sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: ac_cv_c_bigendian=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_c_bigendian=no sl@0: fi sl@0: rm -f conftest* sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: fi sl@0: rm -f conftest* sl@0: if test $ac_cv_c_bigendian = unknown; then sl@0: if test "$cross_compiling" = yes; then sl@0: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: ac_cv_c_bigendian=no sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: ac_cv_c_bigendian=yes sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_c_bigendian" 1>&6 sl@0: if test $ac_cv_c_bigendian = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define WORDS_BIGENDIAN 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Supply substitutes for missing POSIX library procedures, or sl@0: # set flags so Tcl uses alternate procedures. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: # Check if Posix compliant getcwd exists, if not we'll use getwd. sl@0: for ac_func in getcwd sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:4905: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define USEGETWD 1 sl@0: EOF sl@0: sl@0: fi sl@0: done sl@0: sl@0: # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really sl@0: # define USEGETWD even if the posix getcwd exists. Add a test ? sl@0: sl@0: for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:4967: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" sl@0: fi sl@0: done sl@0: sl@0: sl@0: echo $ac_n "checking for strerror""... $ac_c" 1>&6 sl@0: echo "configure:5022: checking for strerror" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char strerror(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_strerror) || defined (__stub___strerror) sl@0: choke me sl@0: #else sl@0: strerror(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strerror=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strerror=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_STRERROR 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for getwd""... $ac_c" 1>&6 sl@0: echo "configure:5074: checking for getwd" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char getwd(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_getwd) || defined (__stub___getwd) sl@0: choke me sl@0: #else sl@0: getwd(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getwd=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getwd=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_GETWD 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for wait3""... $ac_c" 1>&6 sl@0: echo "configure:5126: checking for wait3" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char wait3(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_wait3) || defined (__stub___wait3) sl@0: choke me sl@0: #else sl@0: wait3(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_wait3=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_wait3=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_WAIT3 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for uname""... $ac_c" 1>&6 sl@0: echo "configure:5178: checking for uname" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char uname(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_uname) || defined (__stub___uname) sl@0: choke me sl@0: #else sl@0: uname(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_uname=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_uname=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_UNAME 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ sl@0: test "`uname -r | awk -F. '{print $1}'`" -lt 7; then sl@0: # prior to Darwin 7, realpath is not threadsafe, so don't sl@0: # use it when threads are enabled, c.f. bug # 711232 sl@0: ac_cv_func_realpath=no sl@0: fi sl@0: echo $ac_n "checking for realpath""... $ac_c" 1>&6 sl@0: echo "configure:5237: checking for realpath" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char realpath(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_realpath) || defined (__stub___realpath) sl@0: choke me sl@0: #else sl@0: realpath(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_realpath=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_realpath=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_REALPATH 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Look for thread-safe variants of some library functions. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: if test "${TCL_THREADS}" = 1; then sl@0: echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6 sl@0: echo "configure:5295: checking for getpwuid_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char getpwuid_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) sl@0: choke me sl@0: #else sl@0: getpwuid_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getpwuid_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getpwuid_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'getpwuid_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6 sl@0: echo "configure:5339: checking for getpwuid_r with 5 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: uid_t uid; sl@0: struct passwd pw, *pwp; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwuid_r_5=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwuid_r_5=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getpwuid_r_5" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getpwuid_r_5 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWUID_R_5 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6 sl@0: echo "configure:5383: checking for getpwuid_r with 4 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: uid_t uid; sl@0: struct passwd pw; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void)getpwnam_r(uid, &pw, buf, buflen); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwuid_r_4=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwuid_r_4=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getpwuid_r_4" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getpwuid_r_4 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWUID_R_4 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWUID_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6 sl@0: echo "configure:5439: checking for getpwnam_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char getpwnam_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) sl@0: choke me sl@0: #else sl@0: getpwnam_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getpwnam_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getpwnam_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'getpwnam_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6 sl@0: echo "configure:5483: checking for getpwnam_r with 5 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct passwd pw, *pwp; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void) getpwnam_r(name, &pw, buf, buflen, &pwp); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwnam_r_5=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwnam_r_5=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getpwnam_r_5" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getpwnam_r_5 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWNAM_R_5 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6 sl@0: echo "configure:5527: checking for getpwnam_r with 4 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct passwd pw; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void)getpwnam_r(name, &pw, buf, buflen); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwnam_r_4=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getpwnam_r_4=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getpwnam_r_4" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getpwnam_r_4 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWNAM_R_4 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETPWNAM_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6 sl@0: echo "configure:5583: checking for getgrgid_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_getgrgid_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char getgrgid_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) sl@0: choke me sl@0: #else sl@0: getgrgid_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getgrgid_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getgrgid_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'getgrgid_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6 sl@0: echo "configure:5627: checking for getgrgid_r with 5 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: gid_t gid; sl@0: struct group gr, *grp; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void) getgrgid_r(gid, &gr, buf, buflen, &grp); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrgid_r_5=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrgid_r_5=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getgrgid_r_5" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getgrgid_r_5 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRGID_R_5 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6 sl@0: echo "configure:5671: checking for getgrgid_r with 4 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: gid_t gid; sl@0: struct group gr; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void)getgrgid_r(gid, &gr, buf, buflen); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrgid_r_4=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrgid_r_4=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getgrgid_r_4" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getgrgid_r_4 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRGID_R_4 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRGID_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6 sl@0: echo "configure:5727: checking for getgrnam_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_getgrnam_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char getgrnam_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) sl@0: choke me sl@0: #else sl@0: getgrnam_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getgrnam_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_getgrnam_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'getgrnam_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6 sl@0: echo "configure:5771: checking for getgrnam_r with 5 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct group gr, *grp; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void) getgrnam_r(name, &gr, buf, buflen, &grp); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrnam_r_5=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrnam_r_5=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getgrnam_r_5" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getgrnam_r_5 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRNAM_R_5 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6 sl@0: echo "configure:5815: checking for getgrnam_r with 4 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct group gr; sl@0: char buf[512]; sl@0: int buflen = 512; sl@0: sl@0: (void)getgrnam_r(name, &gr, buf, buflen); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrnam_r_4=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_getgrnam_r_4=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_getgrnam_r_4" 1>&6 sl@0: tcl_ok=$tcl_cv_api_getgrnam_r_4 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRNAM_R_4 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETGRNAM_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: if test "`uname -s`" = "Darwin" && \ sl@0: test "`uname -r | awk -F. '{print $1}'`" -gt 5; then sl@0: # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX sl@0: # are actually MT-safe as they always return pointers sl@0: # from the TSD instead of the static storage. sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_MTSAFE_GETHOSTBYNAME 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_MTSAFE_GETHOSTBYADDR 1 sl@0: EOF sl@0: sl@0: elif test "`uname -s`" = "HP-UX" && \ sl@0: test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then sl@0: # Starting with HPUX 11.00 (we believe), gethostbyX sl@0: # are actually MT-safe as they always return pointers sl@0: # from TSD instead of static storage. sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_MTSAFE_GETHOSTBYNAME 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_MTSAFE_GETHOSTBYADDR 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 sl@0: echo "configure:5898: checking for gethostbyname_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char gethostbyname_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) sl@0: choke me sl@0: #else sl@0: gethostbyname_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyname_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyname_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6 sl@0: echo "configure:5942: checking for gethostbyname_r with 6 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct hostent *he, *res; sl@0: char buffer[2048]; sl@0: int buflen = 2048; sl@0: int h_errnop; sl@0: sl@0: (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_6=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_6=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_gethostbyname_r_6" 1>&6 sl@0: tcl_ok=$tcl_cv_api_gethostbyname_r_6 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYNAME_R_6 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6 sl@0: echo "configure:5986: checking for gethostbyname_r with 5 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct hostent *he; sl@0: char buffer[2048]; sl@0: int buflen = 2048; sl@0: int h_errnop; sl@0: sl@0: (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_5=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_5=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_gethostbyname_r_5" 1>&6 sl@0: tcl_ok=$tcl_cv_api_gethostbyname_r_5 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYNAME_R_5 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6 sl@0: echo "configure:6030: checking for gethostbyname_r with 3 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: sl@0: char *name; sl@0: struct hostent *he; sl@0: struct hostent_data data; sl@0: sl@0: (void) gethostbyname_r(name, he, &data); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_3=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyname_r_3=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_gethostbyname_r_3" 1>&6 sl@0: tcl_ok=$tcl_cv_api_gethostbyname_r_3 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYNAME_R_3 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYNAME_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6 sl@0: echo "configure:6085: checking for gethostbyaddr_r" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char gethostbyaddr_r(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) sl@0: choke me sl@0: #else sl@0: gethostbyaddr_r(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyaddr_r=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gethostbyaddr_r=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'gethostbyaddr_r`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: sl@0: echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6 sl@0: echo "configure:6129: checking for gethostbyaddr_r with 7 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: sl@0: char *addr; sl@0: int length; sl@0: int type; sl@0: struct hostent *result; sl@0: char buffer[2048]; sl@0: int buflen = 2048; sl@0: int h_errnop; sl@0: sl@0: (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, sl@0: &h_errnop); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyaddr_r_7=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyaddr_r_7=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_7" 1>&6 sl@0: tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYADDR_R_7 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6 sl@0: echo "configure:6176: checking for gethostbyaddr_r with 8 args" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: sl@0: char *addr; sl@0: int length; sl@0: int type; sl@0: struct hostent *result, *resultp; sl@0: char buffer[2048]; sl@0: int buflen = 2048; sl@0: int h_errnop; sl@0: sl@0: (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, sl@0: &resultp, &h_errnop); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyaddr_r_8=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_gethostbyaddr_r_8=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_8" 1>&6 sl@0: tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYADDR_R_8 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: if test "$tcl_ok" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_GETHOSTBYADDR_R 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: fi sl@0: sl@0: fi sl@0: fi sl@0: sl@0: #--------------------------------------------------------------------------- sl@0: # Determine which interface to use to talk to the serial port. sl@0: # Note that #include lines must begin in leftmost column for sl@0: # some compilers to recognize them as preprocessor directives. sl@0: #--------------------------------------------------------------------------- sl@0: sl@0: sl@0: for ac_hdr in sys/modem.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:6248: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 sl@0: echo "configure:6285: checking termios vs. termio vs. sgtty" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: struct termios t; sl@0: if (tcgetattr(0, &t) == 0) { sl@0: cfsetospeed(&t, 0); sl@0: t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=termios sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: if test $tcl_cv_api_serial = no ; then sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: struct termio t; sl@0: if (ioctl(0, TCGETA, &t) == 0) { sl@0: t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=termio sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: if test $tcl_cv_api_serial = no ; then sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: sl@0: int main() { sl@0: struct sgttyb t; sl@0: if (ioctl(0, TIOCGETP, &t) == 0) { sl@0: t.sg_ospeed = 0; sl@0: t.sg_flags |= ODDP | EVENP | RAW; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=sgtty sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: if test $tcl_cv_api_serial = no ; then sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: struct termios t; sl@0: if (tcgetattr(0, &t) == 0 sl@0: || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { sl@0: cfsetospeed(&t, 0); sl@0: t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=termios sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: if test $tcl_cv_api_serial = no; then sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: struct termio t; sl@0: if (ioctl(0, TCGETA, &t) == 0 sl@0: || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { sl@0: t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=termio sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: if test $tcl_cv_api_serial = no; then sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_api_serial=none sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: sl@0: int main() { sl@0: struct sgttyb t; sl@0: if (ioctl(0, TIOCGETP, &t) == 0 sl@0: || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { sl@0: t.sg_ospeed = 0; sl@0: t.sg_flags |= ODDP | EVENP | RAW; sl@0: return 0; sl@0: } sl@0: return 1; sl@0: } sl@0: EOF sl@0: if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_api_serial=sgtty sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_api_serial=none sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_serial" 1>&6 sl@0: case $tcl_cv_api_serial in sl@0: termios) cat >> confdefs.h <<\EOF sl@0: #define USE_TERMIOS 1 sl@0: EOF sl@0: ;; sl@0: termio) cat >> confdefs.h <<\EOF sl@0: #define USE_TERMIO 1 sl@0: EOF sl@0: ;; sl@0: sgtty) cat >> confdefs.h <<\EOF sl@0: #define USE_SGTTY 1 sl@0: EOF sl@0: ;; sl@0: esac sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Include sys/select.h if it exists and if it supplies things sl@0: # that appear to be useful and aren't already in sys/types.h. sl@0: # This appears to be true only on the RS/6000 under AIX. Some sl@0: # systems like OSF/1 have a sys/select.h that's of no use, and sl@0: # other systems like SCO UNIX have a sys/select.h that's sl@0: # pernicious. If "fd_set" isn't defined anywhere then set a sl@0: # special flag. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 sl@0: echo "configure:6520: checking for fd_set in sys/types" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: fd_set readMask, writeMask; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_type_fd_set=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_type_fd_set=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 sl@0: tcl_ok=$tcl_cv_type_fd_set sl@0: if test $tcl_ok = no; then sl@0: echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 sl@0: echo "configure:6549: checking for fd_mask in sys/select" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "fd_mask" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: tcl_cv_grep_fd_mask=present sl@0: else sl@0: rm -rf conftest* sl@0: tcl_cv_grep_fd_mask=missing sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6 sl@0: if test $tcl_cv_grep_fd_mask = present; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_SYS_SELECT_H 1 sl@0: EOF sl@0: sl@0: tcl_ok=yes sl@0: fi sl@0: fi sl@0: if test $tcl_ok = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_FD_SET 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #------------------------------------------------------------------------------ sl@0: # Find out all about time handling differences. sl@0: #------------------------------------------------------------------------------ sl@0: sl@0: echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 sl@0: echo "configure:6592: checking whether struct tm is in sys/time.h or time.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: struct tm *tp; tp->tm_sec; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: ac_cv_struct_tm=time.h sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_struct_tm=sys/time.h sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_struct_tm" 1>&6 sl@0: if test $ac_cv_struct_tm = sys/time.h; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TM_IN_SYS_TIME 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: for ac_hdr in sys/time.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:6630: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 sl@0: echo "configure:6667: checking whether time.h and sys/time.h may both be included" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: #include sl@0: int main() { sl@0: struct tm *tp; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: ac_cv_header_time=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_header_time=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_header_time" 1>&6 sl@0: if test $ac_cv_header_time = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TIME_WITH_SYS_TIME 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 sl@0: echo "configure:6702: checking for tm_zone in struct tm" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include <$ac_cv_struct_tm> sl@0: int main() { sl@0: struct tm tm; tm.tm_zone; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: ac_cv_struct_tm_zone=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_struct_tm_zone=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 sl@0: if test "$ac_cv_struct_tm_zone" = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TM_ZONE 1 sl@0: EOF sl@0: sl@0: else sl@0: echo $ac_n "checking for tzname""... $ac_c" 1>&6 sl@0: echo "configure:6735: checking for tzname" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #ifndef tzname /* For SGI. */ sl@0: extern char *tzname[]; /* RS6000 and others reject char **tzname. */ sl@0: #endif sl@0: int main() { sl@0: atoi(*tzname); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: ac_cv_var_tzname=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_var_tzname=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_var_tzname" 1>&6 sl@0: if test $ac_cv_var_tzname = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TZNAME 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: sl@0: sl@0: for ac_func in gmtime_r localtime_r sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:6775: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: sl@0: echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 sl@0: echo "configure:6829: checking tm_tzadj in struct tm" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: struct tm tm; tm.tm_tzadj; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_member_tm_tzadj=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_member_tm_tzadj=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_member_tm_tzadj" 1>&6 sl@0: if test $tcl_cv_member_tm_tzadj = yes ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TM_TZADJ 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 sl@0: echo "configure:6863: checking tm_gmtoff in struct tm" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: struct tm tm; tm.tm_gmtoff; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_member_tm_gmtoff=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_member_tm_gmtoff=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_member_tm_gmtoff" 1>&6 sl@0: if test $tcl_cv_member_tm_gmtoff = yes ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TM_GMTOFF 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: # sl@0: # Its important to include time.h in this check, as some systems sl@0: # (like convex) have timezone functions, etc. sl@0: # sl@0: echo $ac_n "checking long timezone variable""... $ac_c" 1>&6 sl@0: echo "configure:6901: checking long timezone variable" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: extern long timezone; sl@0: timezone += 1; sl@0: exit (0); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_timezone_long=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_timezone_long=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_timezone_long" 1>&6 sl@0: if test $tcl_cv_timezone_long = yes ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TIMEZONE_VAR 1 sl@0: EOF sl@0: sl@0: else sl@0: # sl@0: # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. sl@0: # sl@0: echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6 sl@0: echo "configure:6939: checking time_t timezone variable" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: extern time_t timezone; sl@0: timezone += 1; sl@0: exit (0); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_timezone_time=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_timezone_time=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_timezone_time" 1>&6 sl@0: if test $tcl_cv_timezone_time = yes ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_TIMEZONE_VAR 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Some systems (e.g., IRIX 4.0.5) lack the st_blksize field sl@0: # in struct stat. But we might be able to use fstatfs instead. sl@0: #-------------------------------------------------------------------- sl@0: echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 sl@0: echo "configure:6981: checking for st_blksize in struct stat" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: struct stat s; s.st_blksize; sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: ac_cv_struct_st_blksize=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_struct_st_blksize=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 sl@0: if test $ac_cv_struct_st_blksize = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_ST_BLKSIZE 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for fstatfs""... $ac_c" 1>&6 sl@0: echo "configure:7015: checking for fstatfs" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char fstatfs(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_fstatfs) || defined (__stub___fstatfs) sl@0: choke me sl@0: #else sl@0: fstatfs(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_fstatfs=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_fstatfs=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'fstatfs`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_FSTATFS 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Some system have no memcmp or it does not work with 8 bit sl@0: # data, this checks it and add memcmp.o to LIBOBJS if needed sl@0: #-------------------------------------------------------------------- sl@0: echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 sl@0: echo "configure:7072: checking for 8-bit clean memcmp" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test "$cross_compiling" = yes; then sl@0: ac_cv_func_memcmp_clean=no sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: ac_cv_func_memcmp_clean=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: ac_cv_func_memcmp_clean=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 sl@0: test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Some system like SunOS 4 and other BSD like systems sl@0: # have no memmove (we assume they have bcopy instead). sl@0: # {The replacement define is in compat/string.h} sl@0: #-------------------------------------------------------------------- sl@0: echo $ac_n "checking for memmove""... $ac_c" 1>&6 sl@0: echo "configure:7114: checking for memmove" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char memmove(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_memmove) || defined (__stub___memmove) sl@0: choke me sl@0: #else sl@0: memmove(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_memmove=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_memmove=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_MEMMOVE 1 sl@0: EOF sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_STRING_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # On some systems strstr is broken: it returns a pointer even sl@0: # even if the original string is empty. sl@0: #-------------------------------------------------------------------- sl@0: if test "x${ac_cv_func_strstr}" = "xyes"; then sl@0: echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 sl@0: echo "configure:7175: checking proper strstr implementation" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_strstr_unbroken=broken sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_strstr_unbroken=ok sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_strstr_unbroken=broken sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_strstr_unbroken" 1>&6 sl@0: if test $tcl_cv_strstr_unbroken = broken; then sl@0: LIBOBJS="$LIBOBJS strstr.o" sl@0: fi sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for strtoul function. This is tricky because under some sl@0: # versions of AIX strtoul returns an incorrect terminator sl@0: # pointer for the string "0". sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for strtoul""... $ac_c" 1>&6 sl@0: echo "configure:7220: checking for strtoul" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char strtoul(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_strtoul) || defined (__stub___strtoul) sl@0: choke me sl@0: #else sl@0: strtoul(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtoul=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtoul=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: if test $tcl_ok = 1; then sl@0: echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6 sl@0: echo "configure:7270: checking proper strtoul implementation" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_strtoul_unbroken=broken sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_strtoul_unbroken=ok sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_strtoul_unbroken=broken sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_strtoul_unbroken" 1>&6 sl@0: if test $tcl_cv_strtoul_unbroken = broken; then sl@0: tcl_ok=0 sl@0: fi sl@0: fi sl@0: if test $tcl_ok = 0; then sl@0: LIBOBJS="$LIBOBJS strtoul.o" sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for the strtod function. This is tricky because in some sl@0: # versions of Linux strtod mis-parses strings starting with "+". sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for strtod""... $ac_c" 1>&6 sl@0: echo "configure:7324: checking for strtod" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char strtod(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_strtod) || defined (__stub___strtod) sl@0: choke me sl@0: #else sl@0: strtod(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtod=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtod=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: if test $tcl_ok = 1; then sl@0: echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6 sl@0: echo "configure:7374: checking proper strtod implementation" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_strtod_unbroken=broken sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_strtod_unbroken=ok sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_strtod_unbroken=broken sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_strtod_unbroken" 1>&6 sl@0: if test $tcl_cv_strtod_unbroken = broken; then sl@0: tcl_ok=0 sl@0: fi sl@0: fi sl@0: if test $tcl_ok = 0; then sl@0: LIBOBJS="$LIBOBJS strtod.o" sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Under Solaris 2.4, strtod returns the wrong value for the sl@0: # terminating character under some conditions. Check for this sl@0: # and if the problem exists use a substitute procedure sl@0: # "fixstrtod" that corrects the error. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: sl@0: echo $ac_n "checking for strtod""... $ac_c" 1>&6 sl@0: echo "configure:7431: checking for strtod" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char strtod(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_strtod) || defined (__stub___strtod) sl@0: choke me sl@0: #else sl@0: strtod(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtod=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strtod=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_strtod=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_strtod=0 sl@0: fi sl@0: sl@0: if test "$tcl_strtod" = 1; then sl@0: echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 sl@0: echo "configure:7481: checking for Solaris2.4/Tru64 strtod bugs" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_strtod_buggy=buggy sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_strtod_buggy=ok sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_strtod_buggy=buggy sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6 sl@0: if test "$tcl_cv_strtod_buggy" = buggy; then sl@0: LIBOBJS="$LIBOBJS fixstrtod.o" sl@0: cat >> confdefs.h <<\EOF sl@0: #define strtod fixstrtod sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for various typedefs and provide substitutes if sl@0: # they don't exist. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 sl@0: echo "configure:7544: checking for ANSI C header files" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: #include sl@0: #include sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: ac_cv_header_stdc=yes sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: ac_cv_header_stdc=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: if test $ac_cv_header_stdc = yes; then sl@0: # SunOS 4.x string.h does not declare mem*, contrary to ANSI. sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "memchr" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_header_stdc=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: if test $ac_cv_header_stdc = yes; then sl@0: # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "free" >/dev/null 2>&1; then sl@0: : sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_header_stdc=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: if test $ac_cv_header_stdc = yes; then sl@0: # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. sl@0: if test "$cross_compiling" = yes; then sl@0: : sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') sl@0: #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) sl@0: #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) sl@0: int main () { int i; for (i = 0; i < 256; i++) sl@0: if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); sl@0: exit (0); } sl@0: sl@0: EOF sl@0: if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: : sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: ac_cv_header_stdc=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_header_stdc" 1>&6 sl@0: if test $ac_cv_header_stdc = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define STDC_HEADERS 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for mode_t""... $ac_c" 1>&6 sl@0: echo "configure:7648: checking for mode_t" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #if STDC_HEADERS sl@0: #include sl@0: #include sl@0: #endif sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_type_mode_t=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_type_mode_t=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: echo "$ac_t""$ac_cv_type_mode_t" 1>&6 sl@0: if test $ac_cv_type_mode_t = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define mode_t int sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for pid_t""... $ac_c" 1>&6 sl@0: echo "configure:7681: checking for pid_t" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #if STDC_HEADERS sl@0: #include sl@0: #include sl@0: #endif sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_type_pid_t=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_type_pid_t=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: echo "$ac_t""$ac_cv_type_pid_t" 1>&6 sl@0: if test $ac_cv_type_pid_t = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define pid_t int sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for size_t""... $ac_c" 1>&6 sl@0: echo "configure:7714: checking for size_t" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #if STDC_HEADERS sl@0: #include sl@0: #include sl@0: #endif sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_type_size_t=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_type_size_t=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: echo "$ac_t""$ac_cv_type_size_t" 1>&6 sl@0: if test $ac_cv_type_size_t = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define size_t unsigned sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 sl@0: echo "configure:7747: checking for uid_t in sys/types.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "uid_t" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_type_uid_t=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_type_uid_t=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_type_uid_t" 1>&6 sl@0: if test $ac_cv_type_uid_t = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define uid_t int sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define gid_t int sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 sl@0: echo "configure:7782: checking for socklen_t" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: #if STDC_HEADERS sl@0: #include sl@0: #include sl@0: #endif sl@0: sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_type_socklen_t=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_type_socklen_t=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 sl@0: if test $ac_cv_type_socklen_t = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define socklen_t unsigned sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # If a system doesn't have an opendir function (man, that's old!) sl@0: # then we have to supply a different version of dirent.h which sl@0: # is compatible with the substitute version of opendir that's sl@0: # provided. This version only works with V7-style directories. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for opendir""... $ac_c" 1>&6 sl@0: echo "configure:7827: checking for opendir" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char opendir(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_opendir) || defined (__stub___opendir) sl@0: choke me sl@0: #else sl@0: opendir(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_opendir=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_opendir=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_DIRENT2_H 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The check below checks whether defines the type sl@0: # "union wait" correctly. It's needed because of weirdness in sl@0: # HP-UX where "union wait" is defined in both the BSD and SYS-V sl@0: # environments. Checking the usability of WIFEXITED seems to do sl@0: # the trick. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking union wait""... $ac_c" 1>&6 sl@0: echo "configure:7888: checking union wait" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: int main() { sl@0: sl@0: union wait x; sl@0: WIFEXITED(x); /* Generates compiler error if WIFEXITED sl@0: * uses an int. */ sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_union_wait=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_union_wait=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_union_wait" 1>&6 sl@0: if test $tcl_cv_union_wait = no; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_UNION_WAIT 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check whether there is an strncasecmp function on this system. sl@0: # This is a bit tricky because under SCO it's in -lsocket and sl@0: # under Sequent Dynix it's in -linet. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 sl@0: echo "configure:7933: checking for strncasecmp" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char strncasecmp(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) sl@0: choke me sl@0: #else sl@0: strncasecmp(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strncasecmp=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_strncasecmp=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: if test "$tcl_ok" = 0; then sl@0: echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6 sl@0: echo "configure:7983: checking for strncasecmp in -lsocket" >&5 sl@0: ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-lsocket $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: fi sl@0: if test "$tcl_ok" = 0; then sl@0: echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6 sl@0: echo "configure:8026: checking for strncasecmp in -linet" >&5 sl@0: ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'` sl@0: if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: ac_save_LIBS="$LIBS" sl@0: LIBS="-linet $LIBS" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_lib_$ac_lib_var=no" sl@0: fi sl@0: rm -f conftest* sl@0: LIBS="$ac_save_LIBS" sl@0: sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: tcl_ok=1 sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: tcl_ok=0 sl@0: fi sl@0: sl@0: fi sl@0: if test "$tcl_ok" = 0; then sl@0: LIBOBJS="$LIBOBJS strncasecmp.o" sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The code below deals with several issues related to gettimeofday: sl@0: # 1. Some systems don't provide a gettimeofday function at all sl@0: # (set NO_GETTOD if this is the case). sl@0: # 2. SGI systems don't use the BSD form of the gettimeofday function, sl@0: # but they have a BSDgettimeofday function that can be used instead. sl@0: # 3. See if gettimeofday is declared in the header file. sl@0: # if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can sl@0: # declare it. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 sl@0: echo "configure:8083: checking for BSDgettimeofday" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char BSDgettimeofday(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) sl@0: choke me sl@0: #else sl@0: BSDgettimeofday(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_BSDgettimeofday=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_BSDgettimeofday=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_BSDGETTIMEOFDAY 1 sl@0: EOF sl@0: sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: sl@0: echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 sl@0: echo "configure:8133: checking for gettimeofday" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char gettimeofday(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) sl@0: choke me sl@0: #else sl@0: gettimeofday(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gettimeofday=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_gettimeofday=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: : sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: cat >> confdefs.h <<\EOF sl@0: #define NO_GETTOD 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 sl@0: echo "configure:8188: checking for gettimeofday declaration" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | sl@0: egrep "gettimeofday" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: tcl_cv_grep_gettimeofday=present sl@0: else sl@0: rm -rf conftest* sl@0: tcl_cv_grep_gettimeofday=missing sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6 sl@0: if test $tcl_cv_grep_gettimeofday = missing ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define GETTOD_NOT_DECLARED 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The following code checks to see whether it is possible to get sl@0: # signed chars on this platform. This is needed in order to sl@0: # properly generate sign-extended ints from character values. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 sl@0: echo "configure:8225: checking whether char is unsigned" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: if test "$GCC" = yes; then sl@0: # GCC predefines this symbol on systems where it applies. sl@0: cat > conftest.$ac_ext <&5 | sl@0: egrep "yes" >/dev/null 2>&1; then sl@0: rm -rf conftest* sl@0: ac_cv_c_char_unsigned=yes sl@0: else sl@0: rm -rf conftest* sl@0: ac_cv_c_char_unsigned=no sl@0: fi sl@0: rm -f conftest* sl@0: sl@0: else sl@0: if test "$cross_compiling" = yes; then sl@0: { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } sl@0: else sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: ac_cv_c_char_unsigned=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: ac_cv_c_char_unsigned=no sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: fi sl@0: sl@0: echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 sl@0: if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define __CHAR_UNSIGNED__ 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 sl@0: echo "configure:8288: checking signed char declarations" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_char_signed=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_char_signed=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_char_signed" 1>&6 sl@0: if test $tcl_cv_char_signed = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_SIGNED_CHAR 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Does putenv() copy or not? We need to know to avoid memory leaks. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6 sl@0: echo "configure:8329: checking for a putenv() that copies the buffer" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test "$cross_compiling" = yes; then sl@0: tcl_cv_putenv_copy=no sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: #define OURVAR "havecopy=yes" sl@0: int main (int argc, char *argv[]) sl@0: { sl@0: char *foo, *bar; sl@0: foo = (char *)strdup(OURVAR); sl@0: putenv(foo); sl@0: strcpy((char *)(strchr(foo, '=') + 1), "no"); sl@0: bar = getenv("havecopy"); sl@0: if (!strcmp(bar, "no")) { sl@0: /* doesnt copy */ sl@0: return 0; sl@0: } else { sl@0: /* does copy */ sl@0: return 1; sl@0: } sl@0: } sl@0: sl@0: EOF sl@0: if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null sl@0: then sl@0: tcl_cv_putenv_copy=no sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -fr conftest* sl@0: tcl_cv_putenv_copy=yes sl@0: fi sl@0: rm -fr conftest* sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_putenv_copy" 1>&6 sl@0: if test $tcl_cv_putenv_copy = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_PUTENV_THAT_COPIES 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for support of nl_langinfo function sl@0: #-------------------------------------------------------------------- sl@0: sl@0: sl@0: # Check whether --enable-langinfo or --disable-langinfo was given. sl@0: if test "${enable_langinfo+set}" = set; then sl@0: enableval="$enable_langinfo" sl@0: langinfo_ok=$enableval sl@0: else sl@0: langinfo_ok=yes sl@0: fi sl@0: sl@0: sl@0: HAVE_LANGINFO=0 sl@0: if test "$langinfo_ok" = "yes"; then sl@0: ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6 sl@0: echo "configure:8400: checking for langinfo.h" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: langinfo_ok=yes sl@0: else sl@0: echo "$ac_t""no" 1>&6 sl@0: langinfo_ok=no sl@0: fi sl@0: sl@0: fi sl@0: echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6 sl@0: echo "configure:8434: checking whether to use nl_langinfo" >&5 sl@0: if test "$langinfo_ok" = "yes"; then sl@0: if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: int main() { sl@0: nl_langinfo(CODESET); sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then sl@0: rm -rf conftest* sl@0: tcl_cv_langinfo_h=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_langinfo_h=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_langinfo_h" 1>&6 sl@0: if test $tcl_cv_langinfo_h = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_LANGINFO 1 sl@0: EOF sl@0: sl@0: fi sl@0: else sl@0: echo "$ac_t""$langinfo_ok" 1>&6 sl@0: fi sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Darwin specific API checks and defines sl@0: #-------------------------------------------------------------------- sl@0: sl@0: if test "`uname -s`" = "Darwin" ; then sl@0: for ac_hdr in copyfile.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:8481: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: for ac_func in copyfile sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:8520: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: if test $tcl_corefoundation = yes; then sl@0: for ac_hdr in libkern/OSAtomic.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:8577: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: for ac_func in OSSpinLockLock sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:8616: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: for ac_func in pthread_atfork sl@0: do sl@0: echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 sl@0: echo "configure:8671: checking for $ac_func" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: /* Override any gcc2 internal prototype to avoid an error. */ sl@0: /* We use char because int might match the return type of a gcc2 sl@0: builtin and then its argument prototype would still apply. */ sl@0: char $ac_func(); sl@0: sl@0: int main() { sl@0: sl@0: /* The GNU C library defines this for functions which it implements sl@0: to always fail with ENOSYS. Some functions are actually named sl@0: something starting with __ and the normal name is an alias. */ sl@0: #if defined (__stub_$ac_func) || defined (__stub___$ac_func) sl@0: choke me sl@0: #else sl@0: $ac_func(); sl@0: #endif sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=yes" sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_func_$ac_func=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: fi sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_VFORK 1 sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_DEFAULT_ENCODING "utf-8" sl@0: EOF sl@0: sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_LOAD_FROM_MEMORY 1 sl@0: EOF sl@0: sl@0: for ac_hdr in AvailabilityMacros.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:8740: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: if test "$ac_cv_header_AvailabilityMacros_h" = yes; then sl@0: echo $ac_n "checking if weak import is available""... $ac_c" 1>&6 sl@0: echo "configure:8778: checking if weak import is available" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" sl@0: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_cc_weak_import=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_cc_weak_import=no sl@0: fi sl@0: rm -f conftest* sl@0: CFLAGS=$hold_cflags sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_cc_weak_import" 1>&6 sl@0: if test $tcl_cv_cc_weak_import = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_WEAK_IMPORT 1 sl@0: EOF sl@0: sl@0: fi sl@0: fi sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # Check for support of fts functions (readdir replacement) sl@0: #-------------------------------------------------------------------- sl@0: sl@0: echo $ac_n "checking for fts""... $ac_c" 1>&6 sl@0: echo "configure:8829: checking for fts" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: cat > conftest.$ac_ext < sl@0: #include sl@0: #include sl@0: sl@0: int main() { sl@0: sl@0: char*const p[2] = {"/", NULL}; sl@0: FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL); sl@0: FTSENT *e = fts_read(f); fts_close(f); sl@0: sl@0: ; return 0; } sl@0: EOF sl@0: if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then sl@0: rm -rf conftest* sl@0: tcl_cv_api_fts=yes sl@0: else sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: tcl_cv_api_fts=no sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_api_fts" 1>&6 sl@0: if test $tcl_cv_api_fts = yes; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define HAVE_FTS 1 sl@0: EOF sl@0: sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The statements below check for systems where POSIX-style sl@0: # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. sl@0: # On these systems (mostly older ones), use the old BSD-style sl@0: # FIONBIO approach instead. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: sl@0: for ac_hdr in sys/ioctl.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:8882: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: for ac_hdr in sys/filio.h sl@0: do sl@0: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` sl@0: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 sl@0: echo "configure:8922: checking for $ac_hdr" >&5 sl@0: if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: cat > conftest.$ac_ext < sl@0: EOF sl@0: ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" sl@0: { (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } sl@0: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` sl@0: if test -z "$ac_err"; then sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=yes" sl@0: else sl@0: echo "$ac_err" >&5 sl@0: echo "configure: failed program was:" >&5 sl@0: cat conftest.$ac_ext >&5 sl@0: rm -rf conftest* sl@0: eval "ac_cv_header_$ac_safe=no" sl@0: fi sl@0: rm -f conftest* sl@0: fi sl@0: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then sl@0: echo "$ac_t""yes" 1>&6 sl@0: ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` sl@0: cat >> confdefs.h <&6 sl@0: fi sl@0: done sl@0: sl@0: sl@0: echo $ac_n "checking system version""... $ac_c" 1>&6 sl@0: echo "configure:8960: checking system version" >&5 sl@0: if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then sl@0: echo $ac_n "(cached) $ac_c" 1>&6 sl@0: else sl@0: sl@0: if test -f /usr/lib/NextStep/software_version; then sl@0: tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` sl@0: else sl@0: tcl_cv_sys_version=`uname -s`-`uname -r` sl@0: if test "$?" -ne 0 ; then sl@0: echo "configure: warning: can't find uname command" 1>&2 sl@0: tcl_cv_sys_version=unknown sl@0: else sl@0: # Special check for weird MP-RAS system (uname returns weird sl@0: # results, and the version is kept in special file). sl@0: sl@0: if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then sl@0: tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` sl@0: fi sl@0: if test "`uname -s`" = "AIX" ; then sl@0: tcl_cv_sys_version=AIX-`uname -v`.`uname -r` sl@0: fi sl@0: fi sl@0: fi sl@0: sl@0: fi sl@0: sl@0: echo "$ac_t""$tcl_cv_sys_version" 1>&6 sl@0: system=$tcl_cv_sys_version sl@0: sl@0: echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 sl@0: echo "configure:8991: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 sl@0: case $system in sl@0: # There used to be code here to use FIONBIO under AIX. However, it sl@0: # was reported that FIONBIO doesn't work under AIX 3.2.5. Since sl@0: # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO sl@0: # code (JO, 5/31/97). sl@0: sl@0: OSF*) sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_FIONBIO 1 sl@0: EOF sl@0: sl@0: echo "$ac_t""FIONBIO" 1>&6 sl@0: ;; sl@0: SunOS-4*) sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_FIONBIO 1 sl@0: EOF sl@0: sl@0: echo "$ac_t""FIONBIO" 1>&6 sl@0: ;; sl@0: ULTRIX-4.*) sl@0: cat >> confdefs.h <<\EOF sl@0: #define USE_FIONBIO 1 sl@0: EOF sl@0: sl@0: echo "$ac_t""FIONBIO" 1>&6 sl@0: ;; sl@0: *) sl@0: echo "$ac_t""O_NONBLOCK" 1>&6 sl@0: ;; sl@0: esac sl@0: sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The statements below define a collection of symbols related to sl@0: # building libtcl as a shared library instead of a static library. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} sl@0: TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} sl@0: eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}" sl@0: sl@0: # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed sl@0: # so that the backslashes quoting the DBX braces are dropped. sl@0: sl@0: # Trick to replace DBGX with TCL_DBGX sl@0: DBGX='${TCL_DBGX}' sl@0: eval "TCL_LIB_FILE=${TCL_LIB_FILE}" sl@0: sl@0: TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' sl@0: PRIVATE_INCLUDE_DIR='$(includedir)' sl@0: HTML_DIR='$(DISTDIR)/html' sl@0: sl@0: # Note: in the following variable, it's important to use the absolute sl@0: # path name of the Tcl directory rather than "..": this is because sl@0: # AIX remembers this path and will attempt to use it at run-time to look sl@0: # up the Tcl library. sl@0: sl@0: if test "`uname -s`" = "Darwin" ; then sl@0: sl@0: if test "`uname -s`" = "Darwin" ; then sl@0: echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 sl@0: echo "configure:9054: checking how to package libraries" >&5 sl@0: # Check whether --enable-framework or --disable-framework was given. sl@0: if test "${enable_framework+set}" = set; then sl@0: enableval="$enable_framework" sl@0: enable_framework=$enableval sl@0: else sl@0: enable_framework=no sl@0: fi sl@0: sl@0: if test $enable_framework = yes; then sl@0: if test $SHARED_BUILD = 0; then sl@0: echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2 sl@0: enable_framework=no sl@0: fi sl@0: if test $tcl_corefoundation = no; then sl@0: echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2 sl@0: enable_framework=no sl@0: fi sl@0: fi sl@0: if test $enable_framework = yes; then sl@0: echo "$ac_t""framework" 1>&6 sl@0: FRAMEWORK_BUILD=1 sl@0: else sl@0: if test $SHARED_BUILD = 1; then sl@0: echo "$ac_t""shared library" 1>&6 sl@0: else sl@0: echo "$ac_t""static library" 1>&6 sl@0: fi sl@0: FRAMEWORK_BUILD=0 sl@0: fi sl@0: fi sl@0: sl@0: TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" sl@0: TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' sl@0: fi sl@0: sl@0: if test "$FRAMEWORK_BUILD" = "1" ; then sl@0: cat >> confdefs.h <<\EOF sl@0: #define TCL_FRAMEWORK 1 sl@0: EOF sl@0: sl@0: tcl_config_files="${tcl_config_files} Tcl-Info.plist:../macosx/Tcl-Info.plist.in" sl@0: # Construct a fake local framework structure to make linking with sl@0: # '-framework Tcl' and running of tcltest work sl@0: sl@0: LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" sl@0: if test "${libdir}" = '${exec_prefix}/lib'; then sl@0: # override libdir default sl@0: libdir="/Library/Frameworks" sl@0: fi sl@0: TCL_LIB_FILE="Tcl" sl@0: TCL_LIB_FLAG="-framework Tcl" sl@0: TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" sl@0: TCL_LIB_SPEC="-F${libdir} -framework Tcl" sl@0: libdir="${libdir}/Tcl.framework/Versions/\${VERSION}" sl@0: TCL_LIBRARY="${libdir}/Resources/Scripts" sl@0: includedir="${libdir}/Headers" sl@0: PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders" sl@0: HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl" sl@0: EXTRA_INSTALL="install-private-headers html-tcl" sl@0: EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' sl@0: EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' sl@0: EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' sl@0: EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' sl@0: TCL_YEAR="`date +%Y`" sl@0: # Don't use AC_DEFINE for the following as the framework version define sl@0: # needs to go into the Makefile even when using autoheader, so that we sl@0: # can pick up a potential make override of VERSION. Also, don't put this sl@0: # into CFLAGS as it should not go into tclConfig.sh sl@0: EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"' sl@0: else sl@0: # libdir must be a fully qualified path and not ${exec_prefix}/lib sl@0: eval libdir="$libdir" sl@0: if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then sl@0: if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then sl@0: TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}" sl@0: else sl@0: TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" sl@0: fi sl@0: TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" sl@0: TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" sl@0: else sl@0: TCL_BUILD_EXP_FILE="lib.exp" sl@0: eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" sl@0: sl@0: # Replace DBGX with TCL_DBGX sl@0: eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\"" sl@0: sl@0: if test "$GCC" = "yes" ; then sl@0: TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" sl@0: TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" sl@0: else sl@0: TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" sl@0: TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" sl@0: fi sl@0: fi sl@0: fi sl@0: VERSION='${VERSION}' sl@0: eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}" sl@0: eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" sl@0: eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}" sl@0: VERSION=${TCL_VERSION} sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The statements below define the symbol TCL_PACKAGE_PATH, which sl@0: # gives a list of directories that may contain packages. The list sl@0: # consists of one directory for machine-dependent binaries and sl@0: # another for platform-independent scripts. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: if test "$FRAMEWORK_BUILD" = "1" ; then sl@0: TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" sl@0: elif test "$prefix" != "$exec_prefix"; then sl@0: TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" sl@0: else sl@0: TCL_PACKAGE_PATH="${prefix}/lib" sl@0: fi sl@0: sl@0: #-------------------------------------------------------------------- sl@0: # The statements below define various symbols relating to Tcl sl@0: # stub support. sl@0: #-------------------------------------------------------------------- sl@0: sl@0: # Replace ${VERSION} with contents of ${TCL_VERSION} sl@0: eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" sl@0: # Replace DBGX with TCL_DBGX sl@0: eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" sl@0: eval "TCL_STUB_LIB_DIR=${libdir}" sl@0: sl@0: if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then sl@0: TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" sl@0: else sl@0: TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" sl@0: fi sl@0: sl@0: TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" sl@0: TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}" sl@0: TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}" sl@0: TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" sl@0: sl@0: # Install time header dir can be set via --includedir sl@0: eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" sl@0: sl@0: #------------------------------------------------------------------------ sl@0: # tclConfig.sh refers to this by a different name sl@0: #------------------------------------------------------------------------ sl@0: sl@0: TCL_SHARED_BUILD=${SHARED_BUILD} sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" sl@0: sl@0: sl@0: tcl_config_files="${tcl_config_files} Makefile dltest/Makefile tclConfig.sh" sl@0: trap '' 1 2 15 sl@0: cat > confcache <<\EOF sl@0: # This file is a shell script that caches the results of configure sl@0: # tests run on this system so they can be shared between configure sl@0: # scripts and configure runs. It is not useful on other systems. sl@0: # If it contains results you don't want to keep, you may remove or edit it. sl@0: # sl@0: # By default, configure uses ./config.cache as the cache file, sl@0: # creating it if it does not exist already. You can give configure sl@0: # the --cache-file=FILE option to use a different cache file; that is sl@0: # what configure does when it calls configure scripts in sl@0: # subdirectories, so they share the cache. sl@0: # Giving --cache-file=/dev/null disables caching, for debugging configure. sl@0: # config.status only pays attention to the cache file if you give it the sl@0: # --recheck option to rerun configure. sl@0: # sl@0: EOF sl@0: # The following way of writing the cache mishandles newlines in values, sl@0: # but we know of no workaround that is simple, portable, and efficient. sl@0: # So, don't put newlines in cache variables' values. sl@0: # Ultrix sh set writes to stderr and can't be redirected directly, sl@0: # and sets the high bit in the cache file unless we assign to the vars. sl@0: (set) 2>&1 | sl@0: case `(ac_space=' '; set | grep ac_space) 2>&1` in sl@0: *ac_space=\ *) sl@0: # `set' does not quote correctly, so add quotes (double-quote substitution sl@0: # turns \\\\ into \\, and sed turns \\ into \). sl@0: sed -n \ sl@0: -e "s/'/'\\\\''/g" \ sl@0: -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" sl@0: ;; sl@0: *) sl@0: # `set' quotes correctly as required by POSIX, so do not add quotes. sl@0: sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' sl@0: ;; sl@0: esac >> confcache sl@0: if cmp -s $cache_file confcache; then sl@0: : sl@0: else sl@0: if test -w $cache_file; then sl@0: echo "updating cache $cache_file" sl@0: cat confcache > $cache_file sl@0: else sl@0: echo "not updating unwritable cache $cache_file" sl@0: fi sl@0: fi sl@0: rm -f confcache sl@0: sl@0: trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 sl@0: sl@0: test "x$prefix" = xNONE && prefix=$ac_default_prefix sl@0: # Let make expand exec_prefix. sl@0: test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' sl@0: sl@0: # Any assignment to VPATH causes Sun make to only execute sl@0: # the first set of double-colon rules, so remove it if not needed. sl@0: # If there is a colon in the path, we need to keep it. sl@0: if test "x$srcdir" = x.; then sl@0: ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' sl@0: fi sl@0: sl@0: trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 sl@0: sl@0: # Transform confdefs.h into DEFS. sl@0: # Protect against shell expansion while executing Makefile rules. sl@0: # Protect against Makefile macro expansion. sl@0: cat > conftest.defs <<\EOF sl@0: s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g sl@0: s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g sl@0: s%\[%\\&%g sl@0: s%\]%\\&%g sl@0: s%\$%$$%g sl@0: EOF sl@0: DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` sl@0: rm -f conftest.defs sl@0: sl@0: sl@0: # Without the "./", some shells look in PATH for config.status. sl@0: : ${CONFIG_STATUS=./config.status} sl@0: sl@0: echo creating $CONFIG_STATUS sl@0: rm -f $CONFIG_STATUS sl@0: cat > $CONFIG_STATUS </dev/null | sed 1q`: sl@0: # sl@0: # $0 $ac_configure_args sl@0: # sl@0: # Compiler output produced by configure, useful for debugging sl@0: # configure, is in ./config.log if it exists. sl@0: sl@0: ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" sl@0: for ac_option sl@0: do sl@0: case "\$ac_option" in sl@0: -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) sl@0: echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" sl@0: exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; sl@0: -version | --version | --versio | --versi | --vers | --ver | --ve | --v) sl@0: echo "$CONFIG_STATUS generated by autoconf version 2.13" sl@0: exit 0 ;; sl@0: -help | --help | --hel | --he | --h) sl@0: echo "\$ac_cs_usage"; exit 0 ;; sl@0: *) echo "\$ac_cs_usage"; exit 1 ;; sl@0: esac sl@0: done sl@0: sl@0: ac_given_srcdir=$srcdir sl@0: sl@0: trap 'rm -fr `echo "${tcl_config_files}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 sl@0: EOF sl@0: cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF sl@0: $ac_vpsub sl@0: $extrasub sl@0: s%@SHELL@%$SHELL%g sl@0: s%@CFLAGS@%$CFLAGS%g sl@0: s%@CPPFLAGS@%$CPPFLAGS%g sl@0: s%@CXXFLAGS@%$CXXFLAGS%g sl@0: s%@FFLAGS@%$FFLAGS%g sl@0: s%@DEFS@%$DEFS%g sl@0: s%@LDFLAGS@%$LDFLAGS%g sl@0: s%@LIBS@%$LIBS%g sl@0: s%@exec_prefix@%$exec_prefix%g sl@0: s%@prefix@%$prefix%g sl@0: s%@program_transform_name@%$program_transform_name%g sl@0: s%@bindir@%$bindir%g sl@0: s%@sbindir@%$sbindir%g sl@0: s%@libexecdir@%$libexecdir%g sl@0: s%@datadir@%$datadir%g sl@0: s%@sysconfdir@%$sysconfdir%g sl@0: s%@sharedstatedir@%$sharedstatedir%g sl@0: s%@localstatedir@%$localstatedir%g sl@0: s%@libdir@%$libdir%g sl@0: s%@includedir@%$includedir%g sl@0: s%@oldincludedir@%$oldincludedir%g sl@0: s%@infodir@%$infodir%g sl@0: s%@mandir@%$mandir%g sl@0: s%@MAN_FLAGS@%$MAN_FLAGS%g sl@0: s%@CC@%$CC%g sl@0: s%@CPP@%$CPP%g sl@0: s%@TCL_THREADS@%$TCL_THREADS%g sl@0: s%@TCL_LIBS@%$TCL_LIBS%g sl@0: s%@MATH_LIBS@%$MATH_LIBS%g sl@0: s%@RANLIB@%$RANLIB%g sl@0: s%@AR@%$AR%g sl@0: s%@DL_LIBS@%$DL_LIBS%g sl@0: s%@DL_OBJS@%$DL_OBJS%g sl@0: s%@PLAT_OBJS@%$PLAT_OBJS%g sl@0: s%@PLAT_SRCS@%$PLAT_SRCS%g sl@0: s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g sl@0: s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g sl@0: s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g sl@0: s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g sl@0: s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g sl@0: s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g sl@0: s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g sl@0: s%@STLIB_LD@%$STLIB_LD%g sl@0: s%@SHLIB_LD@%$SHLIB_LD%g sl@0: s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g sl@0: s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g sl@0: s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g sl@0: s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g sl@0: s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g sl@0: s%@MAKE_LIB@%$MAKE_LIB%g sl@0: s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g sl@0: s%@INSTALL_LIB@%$INSTALL_LIB%g sl@0: s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g sl@0: s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g sl@0: s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g sl@0: s%@LIBOBJS@%$LIBOBJS%g sl@0: s%@TCL_VERSION@%$TCL_VERSION%g sl@0: s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g sl@0: s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g sl@0: s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g sl@0: s%@TCL_YEAR@%$TCL_YEAR%g sl@0: s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g sl@0: s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g sl@0: s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g sl@0: s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g sl@0: s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g sl@0: s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g sl@0: s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g sl@0: s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g sl@0: s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g sl@0: s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g sl@0: s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g sl@0: s%@TCL_DBGX@%$TCL_DBGX%g sl@0: s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g sl@0: s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g sl@0: s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g sl@0: s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g sl@0: s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g sl@0: s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g sl@0: s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g sl@0: s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g sl@0: s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g sl@0: s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g sl@0: s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g sl@0: s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g sl@0: s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g sl@0: s%@BUILD_DLTEST@%$BUILD_DLTEST%g sl@0: s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g sl@0: s%@TCL_LIBRARY@%$TCL_LIBRARY%g sl@0: s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g sl@0: s%@HTML_DIR@%$HTML_DIR%g sl@0: s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g sl@0: s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g sl@0: s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g sl@0: s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g sl@0: sl@0: CEOF sl@0: EOF sl@0: sl@0: cat >> $CONFIG_STATUS <<\EOF sl@0: sl@0: # Split the substitutions into bite-sized pieces for seds with sl@0: # small command number limits, like on Digital OSF/1 and HP-UX. sl@0: ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. sl@0: ac_file=1 # Number of current file. sl@0: ac_beg=1 # First line for current file. sl@0: ac_end=$ac_max_sed_cmds # Line after last line for current file. sl@0: ac_more_lines=: sl@0: ac_sed_cmds="" sl@0: while $ac_more_lines; do sl@0: if test $ac_beg -gt 1; then sl@0: sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file sl@0: else sl@0: sed "${ac_end}q" conftest.subs > conftest.s$ac_file sl@0: fi sl@0: if test ! -s conftest.s$ac_file; then sl@0: ac_more_lines=false sl@0: rm -f conftest.s$ac_file sl@0: else sl@0: if test -z "$ac_sed_cmds"; then sl@0: ac_sed_cmds="sed -f conftest.s$ac_file" sl@0: else sl@0: ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" sl@0: fi sl@0: ac_file=`expr $ac_file + 1` sl@0: ac_beg=$ac_end sl@0: ac_end=`expr $ac_end + $ac_max_sed_cmds` sl@0: fi sl@0: done sl@0: if test -z "$ac_sed_cmds"; then sl@0: ac_sed_cmds=cat sl@0: fi sl@0: EOF sl@0: sl@0: cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF sl@0: for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then sl@0: # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". sl@0: case "$ac_file" in sl@0: *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` sl@0: ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; sl@0: *) ac_file_in="${ac_file}.in" ;; sl@0: esac sl@0: sl@0: # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. sl@0: sl@0: # Remove last slash and all that follows it. Not all systems have dirname. sl@0: ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` sl@0: if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then sl@0: # The file is in a subdirectory. sl@0: test ! -d "$ac_dir" && mkdir "$ac_dir" sl@0: ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" sl@0: # A "../" for each directory in $ac_dir_suffix. sl@0: ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` sl@0: else sl@0: ac_dir_suffix= ac_dots= sl@0: fi sl@0: sl@0: case "$ac_given_srcdir" in sl@0: .) srcdir=. sl@0: if test -z "$ac_dots"; then top_srcdir=. sl@0: else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; sl@0: /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; sl@0: *) # Relative path. sl@0: srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" sl@0: top_srcdir="$ac_dots$ac_given_srcdir" ;; sl@0: esac sl@0: sl@0: sl@0: echo creating "$ac_file" sl@0: rm -f "$ac_file" sl@0: configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." sl@0: case "$ac_file" in sl@0: *Makefile*) ac_comsub="1i\\ sl@0: # $configure_input" ;; sl@0: *) ac_comsub= ;; sl@0: esac sl@0: sl@0: ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sl@0: sed -e "$ac_comsub sl@0: s%@configure_input@%$configure_input%g sl@0: s%@srcdir@%$srcdir%g sl@0: s%@top_srcdir@%$top_srcdir%g sl@0: " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file sl@0: fi; done sl@0: rm -f conftest.s* sl@0: sl@0: EOF sl@0: cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF sl@0: test "$FRAMEWORK_BUILD" = "1" && n=Tcl && sl@0: f=$n.framework && v=Versions/$VERSION && sl@0: echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources && sl@0: ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && sl@0: ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && sl@0: unset n f v sl@0: sl@0: sl@0: exit 0 sl@0: EOF sl@0: chmod +x $CONFIG_STATUS sl@0: rm -fr confdefs* $ac_clean_files sl@0: test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 sl@0: