configure
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:187k
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
- # Generated automatically using autoconf version 2.13
- # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
- #
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- # Defaults:
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
- ac_help="$ac_help
- --with-tcl directory containing tcl configuration (tclConfig.sh)"
- ac_help="$ac_help
- --enable-man-symlinks use symlinks for the manpages"
- ac_help="$ac_help
- --enable-man-compression=PROG
- compress the manpages with PROG"
- ac_help="$ac_help
- --enable-man-suffix=STRING
- use STRING as a suffix to manpage file names
- (default: tk)"
- ac_help="$ac_help
- --enable-threads build with threads"
- ac_help="$ac_help
- --enable-shared build and link with shared libraries [--enable-shared]"
- ac_help="$ac_help
- --enable-64bit enable 64bit support (where applicable)"
- ac_help="$ac_help
- --enable-64bit-vis enable 64bit Sparc VIS support"
- ac_help="$ac_help
- --enable-corefoundation use CoreFoundation API [--enable-corefoundation]"
- ac_help="$ac_help
- --disable-load disallow dynamic loading and "load" command"
- ac_help="$ac_help
- --enable-symbols build with debugging symbols [--disable-symbols]"
- ac_help="$ac_help
- --enable-aqua enable Aqua windowingsystem on Mac OS X [--disable-aqua]"
- ac_help="$ac_help
- --with-x use the X Window System"
- ac_help="$ac_help
- --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]"
- # Initialize some variables set by options.
- # The variables have the same names as the options, with
- # dashes changed to underlines.
- build=NONE
- cache_file=./config.cache
- exec_prefix=NONE
- host=NONE
- no_create=
- nonopt=NONE
- no_recursion=
- prefix=NONE
- program_prefix=NONE
- program_suffix=NONE
- program_transform_name=s,x,x,
- silent=
- site=
- srcdir=
- target=NONE
- verbose=
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
- sbindir='${exec_prefix}/sbin'
- libexecdir='${exec_prefix}/libexec'
- datadir='${prefix}/share'
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- infodir='${prefix}/info'
- mandir='${prefix}/man'
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
- SHELL=${CONFIG_SHELL-/bin/sh}
- # Maximum number of lines to put in a shell here document.
- ac_max_here_lines=12
- ac_prev=
- for ac_option
- do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=$ac_option"
- ac_prev=
- continue
- fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
- -cache-file | --cache-file | --cache-fil | --cache-fi
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=*
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=*
- | --da=*)
- datadir="$ac_optarg" ;;
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec-
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=*
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=*
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
- Usage: configure [options] [host]
- Options: [defaults in brackets after descriptions]
- Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print `checking...' messages
- --version print the version of autoconf that created configure
- Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
- EOF
- cat << EOF
- Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
- Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
- EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
- -includedir | --includedir | --includedi | --included | --include
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=*
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=*
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
- -localstatedir | --localstatedir | --localstatedi | --localstated
- | --localstate | --localstat | --localsta | --localst
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=*
- | --localstate=* | --localstat=* | --localsta=* | --localst=*
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
- -no-create | --no-create | --no-creat | --no-crea | --no-cre
- | --no-cr | --no-c)
- no_create=yes ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=*
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=*
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
- -program-prefix | --program-prefix | --program-prefi | --program-pref
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=*
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
- -program-suffix | --program-suffix | --program-suffi | --program-suff
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=*
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
- -program-transform-name | --program-transform-name
- | --program-transform-nam | --program-transform-na
- | --program-transform-n | --program-transform-
- | --program-transform | --program-transfor
- | --program-transfo | --program-transf
- | --program-trans | --program-tran
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=*
- | --program-transform-nam=* | --program-transform-na=*
- | --program-transform-n=* | --program-transform-=*
- | --program-transform=* | --program-transfor=*
- | --program-transfo=* | --program-transf=*
- | --program-trans=* | --program-tran=*
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=*
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
- -sharedstatedir | --sharedstatedir | --sharedstatedi
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta
- | --sharedst | --shareds | --shared | --share | --shar
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=*
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=*
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=*
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=*
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=*
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
- -x-libraries | --x-libraries | --x-librarie | --x-librari
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=*
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
- esac
- done
- if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
- fi
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- # File descriptor usage:
- # 0 standard input
- # 1 file creation
- # 2 errors and warnings
- # 3 some systems may open it to /dev/tty
- # 4 used on the Kubota Titan
- # 6 checking for... messages and results
- # 5 compiler messages saved in config.log
- if test "$silent" = yes; then
- exec 6>/dev/null
- else
- exec 6>&1
- fi
- exec 5>./config.log
- echo "
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- " 1>&5
- # Strip out --no-create and --no-recursion so they do not pile up.
- # Also quote any args containing shell metacharacters.
- ac_configure_args=
- for ac_arg
- do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[[]~#$^&*(){}\|;<>?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
- done
- # NLS nuisances.
- # Only set these to C if already set. These must not be set unconditionally
- # because not all systems understand e.g. LANG=C (notably SCO).
- # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
- # Non-C LC_CTYPE values break the ctype check.
- if test "${LANG+set}" = set; then LANG=C; export LANG; fi
- if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
- if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
- if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
- echo > confdefs.h
- # A filename unique to this package, relative to the directory that
- # configure is in, which we can look for to find out if srcdir is correct.
- ac_unique_file=../generic/tk.h
- # Find the source files, if location was not specified.
- if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
- else
- ac_srcdir_defaulted=no
- fi
- if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
- fi
- srcdir=`echo "${srcdir}" | sed 's%([^/])/*$%1%'`
- # Prefer explicitly selected file to automatically selected ones.
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
- for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
- done
- if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
- else
- echo "creating cache $cache_file"
- > $cache_file
- fi
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- ac_exeext=
- ac_objext=o
- if (echo "testingc"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
- ' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
- else
- ac_n= ac_c='c' ac_t=
- fi
- TK_VERSION=8.4
- TK_MAJOR_VERSION=8
- TK_MINOR_VERSION=4
- TK_PATCH_LEVEL=".18"
- VERSION=${TK_VERSION}
- LOCALES="cs de el en en_gb eo es fr hu it nl pl pt ru"
- #--------------------------------------------------------------------
- # Find and load the tclConfig.sh file
- #--------------------------------------------------------------------
- #
- # Ok, lets find the tcl configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tcl
- #
- if test x"${no_tcl}" = x ; then
- # we reset no_tcl in case something fails here
- no_tcl=true
- # Check whether --with-tcl or --without-tcl was given.
- if test "${with_tcl+set}" = set; then
- withval="$with_tcl"
- with_tclconfig=${withval}
- fi
- echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
- echo "configure:586: checking for Tcl configuration" >&5
- if eval "test "`echo '$''{'ac_cv_c_tclconfig'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- # First check to see if --with-tcl was specified.
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
- fi
- fi
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in
- ../tcl
- `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null`
- `ls -dr ../tcl[8-9].[0-9] 2>/dev/null`
- `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null`
- ../../tcl
- `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null`
- `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null`
- `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null`
- ../../../tcl
- `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null`
- `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null`
- `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
- # on Darwin, check in Framework installation locations
- if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ~/Library/Frameworks 2>/dev/null`
- `ls -d /Library/Frameworks 2>/dev/null`
- `ls -d /Network/Library/Frameworks 2>/dev/null`
- `ls -d /System/Library/Frameworks 2>/dev/null`
- ; do
- if test -f "$i/Tcl.framework/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
- break
- fi
- done
- fi
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ${libdir} 2>/dev/null`
- `ls -d ${exec_prefix}/lib 2>/dev/null`
- `ls -d ${prefix}/lib 2>/dev/null`
- `ls -d /usr/local/lib 2>/dev/null`
- `ls -d /usr/contrib/lib 2>/dev/null`
- `ls -d /usr/lib 2>/dev/null`
- ; do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in
- ${srcdir}/../tcl
- `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null`
- `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null`
- `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
- fi
- if test x"${ac_cv_c_tclconfig}" = x ; then
- TCL_BIN_DIR="# no Tcl configs found"
- echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
- exit 0
- else
- no_tcl=
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- echo "$ac_t""found ${TCL_BIN_DIR}/tclConfig.sh" 1>&6
- fi
- fi
- echo $ac_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh""... $ac_c" 1>&6
- echo "configure:683: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
- if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- echo "$ac_t""loading" 1>&6
- . ${TCL_BIN_DIR}/tclConfig.sh
- else
- echo "$ac_t""could not find ${TCL_BIN_DIR}/tclConfig.sh" 1>&6
- fi
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FILE="${TCL_LIB_FILE}""
- eval "TCL_STUB_LIB_FILE="${TCL_STUB_LIB_FILE}""
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- if test -f ${TCL_BIN_DIR}/Makefile ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- elif test "`uname -s`" = "Darwin"; then
- # If Tcl was built as a framework, attempt to use the libraries
- # from the framework at the given location so that linking works
- # against Tcl.framework installed in an arbitary location.
- case ${TCL_DEFS} in
- *TCL_FRAMEWORK*)
- if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
- for i in "`cd ${TCL_BIN_DIR}; pwd`"
- "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
- if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
- TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
- break
- fi
- done
- fi
- if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
- TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
- TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
- fi
- ;;
- esac
- fi
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FLAG="${TCL_LIB_FLAG}""
- eval "TCL_LIB_SPEC="${TCL_LIB_SPEC}""
- eval "TCL_STUB_LIB_FLAG="${TCL_STUB_LIB_FLAG}""
- eval "TCL_STUB_LIB_SPEC="${TCL_STUB_LIB_SPEC}""
-
-
-
-
-
-
-
-
-
-
- echo $ac_n "checking for tclsh""... $ac_c" 1>&6
- echo "configure:751: checking for tclsh" >&5
- if eval "test "`echo '$''{'ac_cv_path_tclsh'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- for dir in $search_path ; do
- for j in `ls -r $dir/tclsh[8-9]* 2> /dev/null`
- `ls -r $dir/tclsh* 2> /dev/null` ; do
- if test x"$ac_cv_path_tclsh" = x ; then
- if test -f "$j" ; then
- ac_cv_path_tclsh=$j
- break
- fi
- fi
- done
- done
-
- fi
- if test -f "$ac_cv_path_tclsh" ; then
- TCLSH_PROG="$ac_cv_path_tclsh"
- echo "$ac_t""$TCLSH_PROG" 1>&6
- else
- # It is not an error if an installed version of Tcl can't be located.
- TCLSH_PROG=""
- echo "$ac_t""No tclsh found on PATH" 1>&6
- fi
-
- echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6
- echo "configure:784: checking for tclsh in Tcl build directory" >&5
- BUILD_TCLSH=${TCL_BIN_DIR}/tclsh
- echo "$ac_t""$BUILD_TCLSH" 1>&6
-
- if test "${TCL_VERSION}" != "${TK_VERSION}"; then
- { echo "configure: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
- Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
- Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." 1>&2; exit 1; }
- fi
- #------------------------------------------------------------------------
- # Handle the --prefix=... option
- #------------------------------------------------------------------------
- if test "${prefix}" = "NONE"; then
- prefix="$TCL_PREFIX"
- fi
- if test "${exec_prefix}" = "NONE"; then
- exec_prefix=$prefix
- fi
- # Make sure srcdir is fully qualified!
- srcdir=`cd $srcdir ; pwd`
- TK_SRC_DIR=`cd $srcdir/..; pwd`
- #------------------------------------------------------------------------
- # Compress and/or soft link the manpages?
- #------------------------------------------------------------------------
- echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
- echo "configure:816: checking whether to use symlinks for manpages" >&5
- # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
- if test "${enable_man_symlinks+set}" = set; then
- enableval="$enable_man_symlinks"
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
- else
- enableval="no"
- fi
- echo "$ac_t""$enableval" 1>&6
- echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
- echo "configure:828: checking whether to compress the manpages" >&5
- # Check whether --enable-man-compression or --disable-man-compression was given.
- if test "${enable_man_compression+set}" = set; then
- enableval="$enable_man_compression"
- case $enableval in
- yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };;
- no) ;;
- *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
- esac
- else
- enableval="no"
- fi
- echo "$ac_t""$enableval" 1>&6
- if test "$enableval" != "no"; then
- echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
- echo "configure:844: checking for compressed file suffix" >&5
- touch TeST
- $enableval TeST
- Z=`ls TeST* | sed 's/^....//'`
- rm -f TeST*
- MAN_FLAGS="$MAN_FLAGS --extension $Z"
- echo "$ac_t""$Z" 1>&6
- fi
- echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
- echo "configure:854: checking whether to add a package name suffix for the manpages" >&5
- # Check whether --enable-man-suffix or --disable-man-suffix was given.
- if test "${enable_man_suffix+set}" = set; then
- enableval="$enable_man_suffix"
- case $enableval in
- yes) enableval="tk" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
- no) ;;
- *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
- esac
- else
- enableval="no"
- fi
- echo "$ac_t""$enableval" 1>&6
-
- #------------------------------------------------------------------------
- # Standard compiler checks
- #------------------------------------------------------------------------
- # If the user did not set CFLAGS, set it now to keep
- # the AC_PROG_CC macro from adding "-g -O2".
- if test "${CFLAGS+set}" != "set" ; then
- CFLAGS=""
- fi
- # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:885: checking for $ac_word" >&5
- if eval "test "`echo '$''{'ac_cv_prog_CC'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:915: checking for $ac_word" >&5
- if eval "test "`echo '$''{'ac_cv_prog_CC'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
- fi
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
- set dummy cl; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:966: checking for $ac_word" >&5
- if eval "test "`echo '$''{'ac_cv_prog_CC'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in $PATH" 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
- echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- cat > conftest.$ac_ext << EOF
- #line 1009 "configure"
- #include "confdefs.h"
- main(){return(0);}
- EOF
- if { (eval echo configure:1014: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
- fi
- rm -fr conftest*
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
- ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
- cross_compiling=$ac_cv_prog_cc_cross
- echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
- if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
- echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- cross_compiling=$ac_cv_prog_cc_cross
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
- echo "configure:1045: checking whether we are using GNU C" >&5
- if eval "test "`echo '$''{'ac_cv_prog_gcc'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.c <<EOF
- #ifdef __GNUC__
- yes;
- #endif
- EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
- else
- ac_cv_prog_gcc=no
- fi
- fi
- echo "$ac_t""$ac_cv_prog_gcc" 1>&6
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- else
- GCC=
- fi
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
- echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
- if eval "test "`echo '$''{'ac_cv_prog_cc_g'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- echo 'void f(){}' > conftest.c
- if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
- else
- ac_cv_prog_cc_g=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
- else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
- fi
- # limits header checks must come early to prevent
- # an autoconf bug that throws errors on configure
- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
- echo "configure:1108: checking how to run the C preprocessor" >&5
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
- CPP=
- fi
- if test -z "$CPP"; then
- if eval "test "`echo '$''{'ac_cv_prog_CPP'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
- #line 1123 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1129: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
- #line 1140 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1146: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
- #line 1157 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1163: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- ac_cv_prog_CPP="$CPP"
- fi
- CPP="$ac_cv_prog_CPP"
- else
- ac_cv_prog_CPP="$CPP"
- fi
- echo "$ac_t""$CPP" 1>&6
- ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for limits.h""... $ac_c" 1>&6
- echo "configure:1189: checking for limits.h" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1194 "configure"
- #include "confdefs.h"
- #include <limits.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1199: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_LIMITS_H 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_LIMITS_H 1
- EOF
- fi
- for ac_hdr in unistd.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:1231: checking for $ac_hdr" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1236 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:1241: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- #--------------------------------------------------------------------
- # Supply a substitute for stdlib.h if it doesn't define strtol,
- # strtoul, or strtod (which it doesn't in some versions of SunOS).
- #--------------------------------------------------------------------
- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
- echo "configure:1274: checking stdlib.h" >&5
- cat > conftest.$ac_ext <<EOF
- #line 1276 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtol" >/dev/null 2>&1; then
- rm -rf conftest*
- tk_ok=yes
- else
- rm -rf conftest*
- tk_ok=no
- fi
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
- #line 1291 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtoul" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- tk_ok=no
- fi
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
- #line 1305 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtod" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- tk_ok=no
- fi
- rm -f conftest*
- if test $tk_ok = no; then
- cat >> confdefs.h <<EOF
- #define NO_STDLIB_H 1
- EOF
- fi
- echo "$ac_t""$tk_ok" 1>&6
- #------------------------------------------------------------------------
- # If we're using GCC, see if the compiler understands -pipe. If so, use it.
- # It makes compiling go faster. (This is only a performance feature.)
- #------------------------------------------------------------------------
- if test -z "$no_pipe" && test -n "$GCC"; then
- echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
- echo "configure:1333: checking if the compiler understands -pipe" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_pipe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
- cat > conftest.$ac_ext <<EOF
- #line 1340 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:1347: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_cc_pipe=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_pipe=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_pipe" 1>&6
- if test $tcl_cv_cc_pipe = yes; then
- CFLAGS="$CFLAGS -pipe"
- fi
- fi
- #------------------------------------------------------------------------
- # Threads support - this auto-enables if Tcl was compiled threaded
- #------------------------------------------------------------------------
- # Check whether --enable-threads or --disable-threads was given.
- if test "${enable_threads+set}" = set; then
- enableval="$enable_threads"
- tcl_ok=$enableval
- else
- tcl_ok=no
- fi
- if test "${TCL_THREADS}" = 1; then
- tcl_threaded_core=1;
- fi
- if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
- TCL_THREADS=1
- # USE_THREAD_ALLOC tells us to try the special thread-based
- # allocator that significantly reduces lock contention
- cat >> confdefs.h <<EOF
- #define USE_THREAD_ALLOC 1
- EOF
- cat >> confdefs.h <<EOF
- #define _REENTRANT 1
- EOF
- if test "`uname -s`" = "SunOS" ; then
- cat >> confdefs.h <<EOF
- #define _POSIX_PTHREAD_SEMANTICS 1
- EOF
- fi
- cat >> confdefs.h <<EOF
- #define _THREAD_SAFE 1
- EOF
- echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
- echo "configure:1407: checking for pthread_mutex_init in -lpthread" >&5
- ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lpthread $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1415 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char pthread_mutex_init();
- int main() {
- pthread_mutex_init()
- ; return 0; }
- EOF
- if { (eval echo configure:1426: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = "no"; then
- # Check a little harder for __pthread_mutex_init in the same
- # library, as some systems hide it there until pthread.h is
- # defined. We could alternatively do an AC_TRY_COMPILE with
- # pthread.h, but that will work with libpthread really doesn't
- # exist, like AIX 4.2. [Bug: 4359]
- echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
- echo "configure:1454: checking for __pthread_mutex_init in -lpthread" >&5
- ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lpthread $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1462 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char __pthread_mutex_init();
- int main() {
- __pthread_mutex_init()
- ; return 0; }
- EOF
- if { (eval echo configure:1473: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- fi
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthread"
- else
- echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
- echo "configure:1501: checking for pthread_mutex_init in -lpthreads" >&5
- ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lpthreads $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1509 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char pthread_mutex_init();
- int main() {
- pthread_mutex_init()
- ; return 0; }
- EOF
- if { (eval echo configure:1520: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthreads"
- else
- echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
- echo "configure:1546: checking for pthread_mutex_init in -lc" >&5
- ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lc $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1554 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char pthread_mutex_init();
- int main() {
- pthread_mutex_init()
- ; return 0; }
- EOF
- if { (eval echo configure:1565: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = "no"; then
- echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
- echo "configure:1588: checking for pthread_mutex_init in -lc_r" >&5
- ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lc_r $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1596 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char pthread_mutex_init();
- int main() {
- pthread_mutex_init()
- ; return 0; }
- EOF
- if { (eval echo configure:1607: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -pthread"
- else
- TCL_THREADS=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
- fi
- fi
- fi
- fi
- # Does the pthread-implementation provide
- # 'pthread_attr_setstacksize' ?
- ac_saved_libs=$LIBS
- LIBS="$LIBS $THREADS_LIBS"
- for ac_func in pthread_attr_setstacksize
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:1647: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1652 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1675: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in pthread_atfork
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:1702: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1707 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1730: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- LIBS=$ac_saved_libs
- else
- TCL_THREADS=0
- fi
- # Do checking message here to not mess up interleaved configure output
- echo $ac_n "checking for building with threads""... $ac_c" 1>&6
- echo "configure:1760: checking for building with threads" >&5
- if test "${TCL_THREADS}" = 1; then
- cat >> confdefs.h <<EOF
- #define TCL_THREADS 1
- EOF
- if test "${tcl_threaded_core}" = 1; then
- echo "$ac_t""yes (threaded core)" 1>&6
- else
- echo "$ac_t""yes" 1>&6
- fi
- else
- echo "$ac_t""no (default)" 1>&6
- fi
-
- #--------------------------------------------------------------------
- # On a few very rare systems, all of the libm.a stuff is
- # already in libc.a. Set compiler flags accordingly.
- # Also, Linux requires the "ieee" library for math to work
- # right (and it must appear before "-lm").
- #--------------------------------------------------------------------
- MATH_LIBS=""
- echo $ac_n "checking for sin""... $ac_c" 1>&6
- echo "configure:1787: checking for sin" >&5
- if eval "test "`echo '$''{'ac_cv_func_sin'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 1792 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char sin(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char sin();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_sin) || defined (__stub___sin)
- choke me
- #else
- sin();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:1815: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_sin=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_sin=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'sin`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- MATH_LIBS="-lm"
- fi
- echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
- echo "configure:1836: checking for main in -lieee" >&5
- ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lieee $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 1844 "configure"
- #include "confdefs.h"
- int main() {
- main()
- ; return 0; }
- EOF
- if { (eval echo configure:1851: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- MATH_LIBS="-lieee $MATH_LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- # Add the threads support libraries
- LIBS="$LIBS$THREADS_LIBS"
- echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
- echo "configure:1877: checking how to build libraries" >&5
- # Check whether --enable-shared or --disable-shared was given.
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
- if test "$tcl_ok" = "yes" ; then
- echo "$ac_t""shared" 1>&6
- SHARED_BUILD=1
- else
- echo "$ac_t""static" 1>&6
- SHARED_BUILD=0
- cat >> confdefs.h <<EOF
- #define STATIC_BUILD 1
- EOF
- fi
- #--------------------------------------------------------------------
- # The statements below define a collection of compile flags. This
- # macro depends on the value of SHARED_BUILD, and should be called
- # after SC_ENABLE_SHARED checks the configure switches.
- #--------------------------------------------------------------------
- # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:1916: checking for $ac_word" >&5
- if eval "test "`echo '$''{'ac_cv_prog_RANLIB'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- fi
- fi
- RANLIB="$ac_cv_prog_RANLIB"
- if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- # Step 0.a: Enable 64 bit support?
- echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
- echo "configure:1948: checking if 64bit support is requested" >&5
- # Check whether --enable-64bit or --disable-64bit was given.
- if test "${enable_64bit+set}" = set; then
- enableval="$enable_64bit"
- do64bit=$enableval
- else
- do64bit=no
- fi
- echo "$ac_t""$do64bit" 1>&6
- # Step 0.b: Enable Solaris 64 bit VIS support?
- echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
- echo "configure:1962: checking if 64bit Sparc VIS support is requested" >&5
- # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
- if test "${enable_64bit_vis+set}" = set; then
- enableval="$enable_64bit_vis"
- do64bitVIS=$enableval
- else
- do64bitVIS=no
- fi
- echo "$ac_t""$do64bitVIS" 1>&6
- if test "$do64bitVIS" = "yes"; then
- # Force 64bit on with VIS
- do64bit=yes
- fi
- # Step 1: set the variable "system" to hold the name and version number
- # for the system.
-
- echo $ac_n "checking system version""... $ac_c" 1>&6
- echo "configure:1983: checking system version" >&5
- if eval "test "`echo '$''{'tcl_cv_sys_version'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- if test -f /usr/lib/NextStep/software_version; then
- tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
- else
- tcl_cv_sys_version=`uname -s`-`uname -r`
- if test "$?" -ne 0 ; then
- echo "configure: warning: can't find uname command" 1>&2
- tcl_cv_sys_version=unknown
- else
- # Special check for weird MP-RAS system (uname returns weird
- # results, and the version is kept in special file).
- if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
- fi
- if test "`uname -s`" = "AIX" ; then
- tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
- fi
- fi
- fi
-
- fi
- echo "$ac_t""$tcl_cv_sys_version" 1>&6
- system=$tcl_cv_sys_version
- # Step 2: check for existence of -ldl library. This is needed because
- # Linux can use either -ldl or -ldld for dynamic loading.
- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
- echo "configure:2018: checking for dlopen in -ldl" >&5
- ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldl $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2026 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char dlopen();
- int main() {
- dlopen()
- ; return 0; }
- EOF
- if { (eval echo configure:2037: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- have_dl=yes
- else
- echo "$ac_t""no" 1>&6
- have_dl=no
- fi
- # Require ranlib early so we can override it in special cases below.
-
- # Step 3: set configuration options based on system name and version.
- do64bit_ok=no
- LDFLAGS_ORIG="$LDFLAGS"
- TCL_EXPORT_FILE_SUFFIX=""
- UNSHARED_LIB_SUFFIX=""
- TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
- ECHO_VERSION='`echo ${VERSION}`'
- TCL_LIB_VERSIONS_OK=ok
- CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O
- if test "$GCC" = "yes" ; then
- CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
- else
- CFLAGS_WARNING=""
- fi
- TCL_NEEDS_EXP_FILE=0
- TCL_BUILD_EXP_FILE=""
- TCL_EXP_FILE=""
- # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:2085: checking for $ac_word" >&5
- if eval "test "`echo '$''{'ac_cv_prog_AR'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
- else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- fi
- fi
- AR="$ac_cv_prog_AR"
- if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- if test "${AR}" = "" ; then
- { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
- fi
- STLIB_LD='${AR} cr'
- LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
- PLAT_OBJS=""
- PLAT_SRCS=""
- case $system in
- AIX-*)
- if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
- # AIX requires the _r compiler when gcc isn't being used
- case "${CC}" in
- *_r)
- # ok ...
- ;;
- *)
- CC=${CC}_r
- ;;
- esac
- echo "$ac_t""Using $CC for compiling with threads" 1>&6
- fi
- LIBS="$LIBS -lc"
- SHLIB_CFLAGS=""
- # Note: need the LIBS below, otherwise Tk won't find Tcl's
- # symbols when dynamically loaded into tclsh.
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- LD_LIBRARY_PATH_VAR="LIBPATH"
- # Check to enable 64-bit flags for compiler/linker on AIX 4+
- if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
- if test "$GCC" = "yes" ; then
- echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS -q64"
- LDFLAGS="$LDFLAGS -q64"
- RANLIB="${RANLIB} -X64"
- AR="${AR} -X64"
- SHLIB_LD_FLAGS="-b64"
- fi
- fi
- if test "`uname -m`" = "ia64" ; then
- # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
- SHLIB_LD="/usr/ccs/bin/ld -G -z text"
- # AIX-5 has dl* in libc.so
- DL_LIBS=""
- if test "$GCC" = "yes" ; then
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- else
- CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
- fi
- LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
- else
- if test "$GCC" = "yes" ; then
- SHLIB_LD="gcc -shared"
- else
- SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
- fi
- SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- TCL_NEEDS_EXP_FILE=1
- TCL_EXPORT_FILE_SUFFIX='${VERSION}${DBGX}.exp'
- fi
- # AIX v<=4.1 has some different flags than 4.2+
- if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
- LIBOBJS="$LIBOBJS tclLoadAix.o"
- DL_LIBS="-lld"
- fi
- # On AIX <=v4 systems, libbsd.a has to be linked in to support
- # non-blocking file IO. This library has to be linked in after
- # the MATH_LIBS or it breaks the pow() function. The way to
- # insure proper sequencing, is to add it to the tail of MATH_LIBS.
- # This library also supplies gettimeofday.
- #
- # AIX does not have a timezone field in struct tm. When the AIX
- # bsd library is used, the timezone global and the gettimeofday
- # methods are to be avoided for timezone deduction instead, we
- # deduce the timezone by comparing the localtime result on a
- # known GMT value.
- echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
- echo "configure:2200: checking for gettimeofday in -lbsd" >&5
- ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lbsd $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2208 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gettimeofday();
- int main() {
- gettimeofday()
- ; return 0; }
- EOF
- if { (eval echo configure:2219: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- libbsd=yes
- else
- echo "$ac_t""no" 1>&6
- libbsd=no
- fi
- if test $libbsd = yes; then
- MATH_LIBS="$MATH_LIBS -lbsd"
- cat >> confdefs.h <<EOF
- #define USE_DELTA_FOR_TZ 1
- EOF
- fi
- ;;
- BeOS*)
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="${CC} -nostart"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- #-----------------------------------------------------------
- # Check for inet_ntoa in -lbind, for BeOS (which also needs
- # -lsocket, even if the network functions are in -lnet which
- # is always linked to, for compatibility.
- #-----------------------------------------------------------
- echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
- echo "configure:2262: checking for inet_ntoa in -lbind" >&5
- ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lbind $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2270 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char inet_ntoa();
- int main() {
- inet_ntoa()
- ; return 0; }
- EOF
- if { (eval echo configure:2281: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lbind -lsocket"
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- BSD/OS-2.1*|BSD/OS-3*)
- SHLIB_CFLAGS=""
- SHLIB_LD="shlicc -r"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- BSD/OS-4.*)
- SHLIB_CFLAGS="-export-dynamic -fPIC"
- SHLIB_LD="cc -shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -export-dynamic"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- dgux*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- HP-UX-*.11.*)
- # Use updated header definitions where possible
- cat >> confdefs.h <<EOF
- #define _XOPEN_SOURCE 1
- EOF
- # Use the XOPEN network library
- cat >> confdefs.h <<EOF
- #define _XOPEN_SOURCE_EXTENDED 1
- EOF
- # Use the XOPEN network library
- LIBS="$LIBS -lxnet" # Use the XOPEN network library
- if test "`uname -m`" = "ia64" ; then
- SHLIB_SUFFIX=".so"
- else
- SHLIB_SUFFIX=".sl"
- fi
- echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
- echo "configure:2351: checking for shl_load in -ldld" >&5
- ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldld $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2359 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char shl_load();
- int main() {
- shl_load()
- ; return 0; }
- EOF
- if { (eval echo configure:2370: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = yes; then
- SHLIB_CFLAGS="+z"
- SHLIB_LD="ld -b"
- SHLIB_LD_LIBS='${LIBS}'
- DL_OBJS="tclLoadShl.o"
- DL_LIBS="-ldld"
- LDFLAGS="$LDFLAGS -Wl,-E"
- CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
- LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
- LD_LIBRARY_PATH_VAR="SHLIB_PATH"
- fi
- if test "$GCC" = "yes" ; then
- SHLIB_LD="gcc -shared"
- SHLIB_LD_LIBS='${LIBS}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- fi
- # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
- #CFLAGS="$CFLAGS +DAportable"
- # Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = "yes" ; then
- if test "$GCC" = "yes" ; then
- hpux_arch=`${CC} -dumpmachine`
- case $hpux_arch in
- hppa64*)
- # 64-bit gcc in use. Fix flags for GNU ld.
- do64bit_ok=yes
- SHLIB_LD="${CC} -shared"
- SHLIB_LD_LIBS='${LIBS}'
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- ;;
- *)
- echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
- ;;
- esac
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS +DD64"
- LDFLAGS="$LDFLAGS +DD64"
- fi
- fi
- ;;
- HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
- SHLIB_SUFFIX=".sl"
- echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
- echo "configure:2438: checking for shl_load in -ldld" >&5
- ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-ldld $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2446 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char shl_load();
- int main() {
- shl_load()
- ; return 0; }
- EOF
- if { (eval echo configure:2457: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
- else
- echo "$ac_t""no" 1>&6
- tcl_ok=no
- fi
- if test "$tcl_ok" = yes; then
- SHLIB_CFLAGS="+z"
- SHLIB_LD="ld -b"
- SHLIB_LD_LIBS=""
- DL_OBJS="tclLoadShl.o"
- DL_LIBS="-ldld"
- LDFLAGS="$LDFLAGS -Wl,-E"
- CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
- LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
- LD_LIBRARY_PATH_VAR="SHLIB_PATH"
- fi
- ;;
- IRIX-4.*)
- SHLIB_CFLAGS="-G 0"
- SHLIB_SUFFIX=".a"
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r -G 0"
- SHLIB_LD_LIBS='${LIBS}'
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -Wl,-D,08000000"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${VERSION}${DBGX}.a'
- ;;
- IRIX-5.*)
- SHLIB_CFLAGS=""
- SHLIB_LD="ld -shared -rdata_shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- ;;
- IRIX-6.*)
- SHLIB_CFLAGS=""
- SHLIB_LD="ld -n32 -shared -rdata_shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- if test "$GCC" = "yes" ; then
- CFLAGS="$CFLAGS -mabi=n32"
- LDFLAGS="$LDFLAGS -mabi=n32"
- else
- case $system in
- IRIX-6.3)
- # Use to build 6.2 compatible binaries on 6.3.
- CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
- ;;
- *)
- CFLAGS="$CFLAGS -n32"
- ;;
- esac
- LDFLAGS="$LDFLAGS -n32"
- fi
- ;;
- IRIX64-6.*)
- SHLIB_CFLAGS=""
- SHLIB_LD="ld -n32 -shared -rdata_shared"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- # Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = "yes" ; then
- if test "$GCC" = "yes" ; then
- echo "configure: warning: 64bit mode not supported by gcc" 1>&2
- else
- do64bit_ok=yes
- SHLIB_LD="ld -64 -shared -rdata_shared"
- CFLAGS="$CFLAGS -64"
- LDFLAGS="$LDFLAGS -64"
- fi
- fi
- ;;
- Linux*)
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- CFLAGS_OPTIMIZE=-O2
- # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
- # when you inline the string and math operations. Turn this off to
- # get rid of the warnings.
- #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
- if test "$have_dl" = yes; then
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- else
- ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for dld.h""... $ac_c" 1>&6
- echo "configure:2581: checking for dld.h" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2586 "configure"
- #include "confdefs.h"
- #include <dld.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:2591: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- SHLIB_LD="ld -shared"
- DL_OBJS="tclLoadDld.o"
- DL_LIBS="-ldld"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- if test "`uname -m`" = "alpha" ; then
- CFLAGS="$CFLAGS -mieee"
- fi
- if test $do64bit = yes; then
- echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6
- echo "configure:2623: checking if compiler accepts -m64 flag" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_m64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -m64"
- cat > conftest.$ac_ext <<EOF
- #line 2631 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:2638: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_cc_m64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_m64=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_m64" 1>&6
- if test $tcl_cv_cc_m64 = yes; then
- CFLAGS="$CFLAGS -m64"
- do64bit_ok=yes
- fi
- fi
- # The combo of gcc + glibc has a bug related
- # to inlining of functions like strtod(). The
- # -fno-builtin flag should address this problem
- # but it does not work. The -fno-inline flag
- # is kind of overkill but it works.
- # Disable inlining only when one of the
- # files in compat/*.c is being linked in.
- if test x"${LIBOBJS}" != x ; then
- CFLAGS="$CFLAGS -fno-inline"
- fi
- # XIM peeking works under XFree86.
- cat >> confdefs.h <<EOF
- #define PEEK_XCLOSEIM 1
- EOF
- ;;
- GNU*)
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- if test "$have_dl" = yes; then
- SHLIB_LD="${CC} -shared"
- DL_OBJS=""
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- else
- ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for dld.h""... $ac_c" 1>&6
- echo "configure:2691: checking for dld.h" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2696 "configure"
- #include "confdefs.h"
- #include <dld.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:2701: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- SHLIB_LD="ld -shared"
- DL_OBJS=""
- DL_LIBS="-ldld"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- if test "`uname -m`" = "alpha" ; then
- CFLAGS="$CFLAGS -mieee"
- fi
- ;;
- Lynx*)
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- CFLAGS_OPTIMIZE=-02
- SHLIB_LD="${CC} -shared "
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-mshared -ldl"
- LD_FLAGS="-Wl,--export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- ;;
- MP-RAS-02*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- MP-RAS-*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- NetBSD-*|FreeBSD-[1-2].*)
- # Not available on all versions: check for include file.
- ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
- echo "configure:2769: checking for dlfcn.h" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2774 "configure"
- #include "confdefs.h"
- #include <dlfcn.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:2779: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- # NetBSD/SPARC needs -fPIC, -fpic will not do.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- echo $ac_n "checking for ELF""... $ac_c" 1>&6
- echo "configure:2806: checking for ELF" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_elf'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 2812 "configure"
- #include "confdefs.h"
- #ifdef __ELF__
- yes
- #endif
-
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- tcl_cv_ld_elf=yes
- else
- rm -rf conftest*
- tcl_cv_ld_elf=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_ld_elf" 1>&6
- if test $tcl_cv_ld_elf = yes; then
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so'
- else
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- fi
-
- else
- echo "$ac_t""no" 1>&6
- SHLIB_CFLAGS=""
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
-
- fi
- # FreeBSD doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- OpenBSD-*)
- case `arch -s` in
- m88k|vax)
- SHLIB_CFLAGS=""
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS=""
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- ;;
- *)
- # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
- case `machine` in
- sparc|sparc64)
- SHLIB_CFLAGS="-fPIC";;
- *)
- SHLIB_CFLAGS="-fpic";;
- esac
- SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- echo $ac_n "checking for ELF""... $ac_c" 1>&6
- echo "configure:2891: checking for ELF" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_elf'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 2897 "configure"
- #include "confdefs.h"
- #ifdef __ELF__
- yes
- #endif
-
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- tcl_cv_ld_elf=yes
- else
- rm -rf conftest*
- tcl_cv_ld_elf=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_ld_elf" 1>&6
- if test $tcl_cv_ld_elf = yes; then
- LDFLAGS=-Wl,-export-dynamic
- else
- LDFLAGS=""
- fi
- ;;
- esac
- # OpenBSD doesn't do version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- FreeBSD-*)
- # FreeBSD 3.* and greater have ELF.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- if test "${TCL_THREADS}" = "1" ; then
- # The -pthread needs to go in the CFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- fi
- case $system in
- FreeBSD-3.*)
- # FreeBSD-3 doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- esac
- ;;
- Darwin-*)
- CFLAGS_OPTIMIZE="-Os"
- SHLIB_CFLAGS="-fno-common"
- # To avoid discrepancies between what headers configure sees during
- # preprocessing tests and compiling tests, move any -isysroot and
- # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
- CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" |
- awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++)
- if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
- CFLAGS="`echo " ${CFLAGS}" |
- awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++)
- if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
- if test $do64bit = yes; then
- case `arch` in
- ppc)
- echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
- echo "configure:2972: checking if compiler accepts -arch ppc64 flag" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- cat > conftest.$ac_ext <<EOF
- #line 2980 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:2987: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_cc_arch_ppc64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_arch_ppc64=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
- if test $tcl_cv_cc_arch_ppc64 = yes; then
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- do64bit_ok=yes
- fi;;
- i386)
- echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
- echo "configure:3007: checking if compiler accepts -arch x86_64 flag" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -arch x86_64"
- cat > conftest.$ac_ext <<EOF
- #line 3015 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:3022: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_cc_arch_x86_64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_arch_x86_64=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6
- if test $tcl_cv_cc_arch_x86_64 = yes; then
- CFLAGS="$CFLAGS -arch x86_64"
- do64bit_ok=yes
- fi;;
- *)
- echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;;
- esac
- else
- # Check for combined 32-bit and 64-bit fat build
- echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' &&
- echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' &&
- fat_32_64=yes
- fi
- SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
- echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
- echo "configure:3051: checking if ld accepts -single_module flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_single_module'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
- cat > conftest.$ac_ext <<EOF
- #line 3059 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:3066: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_single_module=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_single_module=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
- if test $tcl_cv_ld_single_module = yes; then
- SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
- fi
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".dylib"
- DL_OBJS="tclLoadDyld.o"
- DL_LIBS=""
- # Don't use -prebind when building for Mac OS X 10.4 or later only:
- test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\.' '{print int($2)}'`" -lt 4 -a
- "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\.' '{print int($2)}'`" -lt 4 &&
- LDFLAGS="$LDFLAGS -prebind"
- LDFLAGS="$LDFLAGS -headerpad_max_install_names"
- echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
- echo "configure:3093: checking if ld accepts -search_paths_first flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- cat > conftest.$ac_ext <<EOF
- #line 3101 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:3108: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_search_paths_first=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_search_paths_first=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
- if test $tcl_cv_ld_search_paths_first = yes; then
- LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- fi
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
- PLAT_OBJS=$(MAC_OSX_OBJS)
- PLAT_SRCS=$(MAC_OSX_SRCS)
- echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
- echo "configure:3131: checking whether to use CoreFoundation" >&5
- # Check whether --enable-corefoundation or --disable-corefoundation was given.
- if test "${enable_corefoundation+set}" = set; then
- enableval="$enable_corefoundation"
- tcl_corefoundation=$enableval
- else
- tcl_corefoundation=yes
- fi
- echo "$ac_t""$tcl_corefoundation" 1>&6
- if test $tcl_corefoundation = yes; then
- echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
- echo "configure:3143: checking for CoreFoundation.framework" >&5
- if eval "test "`echo '$''{'tcl_cv_lib_corefoundation'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_libs=$LIBS
- if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
- # On Tiger there is no 64-bit CF, so remove 64-bit archs
- # from CFLAGS et al. while testing for presence of CF.
- # 64-bit CF is disabled in tclUnixPort.h if necessary.
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done; fi
- LIBS="$LIBS -framework CoreFoundation"
- cat > conftest.$ac_ext <<EOF
- #line 3157 "configure"
- #include "confdefs.h"
- #include <CoreFoundation/CoreFoundation.h>
- int main() {
- CFBundleRef b = CFBundleGetMainBundle();
- ; return 0; }
- EOF
- if { (eval echo configure:3164: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_lib_corefoundation=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_lib_corefoundation=no
- fi
- rm -f conftest*
- if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done; fi; LIBS=$hold_libs
- fi
- echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
- if test $tcl_cv_lib_corefoundation = yes; then
- LIBS="$LIBS -framework CoreFoundation"
- cat >> confdefs.h <<EOF
- #define HAVE_COREFOUNDATION 1
- EOF
- else
- tcl_corefoundation=no
- fi
- if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
- echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6
- echo "configure:3191: checking for 64-bit CoreFoundation" >&5
- if eval "test "`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
- done
- cat > conftest.$ac_ext <<EOF
- #line 3200 "configure"
- #include "confdefs.h"
- #include <CoreFoundation/CoreFoundation.h>
- int main() {
- CFBundleRef b = CFBundleGetMainBundle();
- ; return 0; }
- EOF
- if { (eval echo configure:3207: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_lib_corefoundation_64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_lib_corefoundation_64=no
- fi
- rm -f conftest*
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done
- fi
- echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6
- if test $tcl_cv_lib_corefoundation_64 = no; then
- cat >> confdefs.h <<EOF
- #define NO_COREFOUNDATION_64 1
- EOF
- fi
- fi
- fi
- cat >> confdefs.h <<EOF
- #define MAC_OSX_TCL 1
- EOF
- ;;
- NEXTSTEP-*)
- SHLIB_CFLAGS=""
- SHLIB_LD="cc -nostdlib -r"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadNext.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OS/390-*)
- CFLAGS_OPTIMIZE="" # Optimizer is buggy
- cat >> confdefs.h <<EOF
- #define _OE_SOCKETS 1
- EOF
- # needed in sys/socket.h