Changeset 1018


Ignore:
Timestamp:
Jun 8, 2008, 6:24:34 PM (16 years ago)
Author:
gah
Message:

Massive changes: New directory/file layout

Location:
trunk
Files:
65 added
24 deleted
35 edited
38 copied
34 moved

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r951 r1018  
    88mandir          = @mandir@
    99prefix          = @prefix@
     10srcdir          = @srcdir@
    1011
    1112INSTALL         = @INSTALL@
    12 INSTALL_PROGRAM = ${INSTALL} -m 755
    13 INSTALL_DATA    = ${INSTALL} -m 644
    14 INSTALL_SCRIPT  = ${INSTALL} -m 644
    15 
     13SHELL           = @SHELL@
     14RM              = rm -f
     15VPATH           = $(srcdir)
    1616
    1717build_date      := $(shell date +%Y%m%d)
     
    1919os              := $(shell uname -s)
    2020bn              := $(shell basename $(prefix))
    21 TarfileBasename=rappture-$(os)-$(machine)-$(build_date)
    2221
    23 # fix this before commiting
    24 all: rplib build_bindings build_gui
    25 install: install_rplib install_bindings install_gui install_examples
    26         ${INSTALL_PROGRAM}  gui/apps/rappture      $(bindir)/rappture
    27         ${INSTALL_DATA}     gui/apps/rappture.env  $(bindir)/rappture.env
    28         ${INSTALL_PROGRAM}  gui/apps/driver        $(bindir)/driver
    29         ${INSTALL_PROGRAM}  gui/apps/nanovis-test  $(bindir)/nanovis-test
    30         ${INSTALL_PROGRAM}  gui/apps/rerun         $(bindir)/rerun
    31         ${INSTALL_PROGRAM}  gui/apps/simsim        $(bindir)/simsim
    32         ${INSTALL_PROGRAM}  gui/apps/simsim.tcl    $(bindir)/simsim.tcl
    33         find $(prefix) -name .svn | xargs rm -rf
     22tarfile         = rappture-$(os)-$(machine)-$(build_date).tar.gz
    3423
    35 ###########################################################################
    36 # Makefile - build and install all Rappture libraries
    37 ###########################################################################
     24ENABLE_GUI = @ENABLE_GUI@
    3825
    39 
    40 build_gui:
    41         @if test "x@ENABLE_GUI@" == "xyes" ; then \
    42                 $(MAKE) -C gui; \
    43         fi
    44 
    45 install_gui:
    46         @if test "x@ENABLE_GUI@" == "xyes" ; then \
    47                 $(MAKE) -C gui install; \
    48         fi
    49 
    50 rplib:
    51         @if ! test -d "include"; then \
    52                 mkdir include;\
    53         fi
    54         $(MAKE) -C src2/core librappture2.a librappture2.so.0.0
    55         $(MAKE) -C src librappture
    56 
    57 install_rplib:
    58         $(MAKE) -C src2/core install
    59         $(MAKE) -C src install_rappture
    60 
    61 build_bindings: build_matlab build_octave build_python build_perl
    62 
    63 install_bindings: install_matlab install_octave install_python install_perl install_tcl
    64 
    65 #############################################################################
    66 # build rappture examples
    67 # examples:
    68 #       - compile rappture examples in rappture/examples
    69 #############################################################################
    70 build_examples:
    71 ifneq ($(strip @F77@),)
    72         $(MAKE) -C examples/app-fermi/fortran
    73 endif
    74 ifneq ($(strip @CC@),)
    75         $(MAKE) -C examples/app-fermi/cee
    76         $(MAKE) -C examples/app-fermi/wrapper/cee
    77         $(MAKE) -C examples/c-example
     26ifneq ($(ENABLE_GUI),)
     27   GUI = gui
    7828endif
    7929
    80 install_examples: build_examples
    81         cp -r examples $(prefix)
    82         rm -f $(prefix)/examples/demo.bash.in
    83         find $(prefix)/examples -name .svn | xargs rm -rf
     30.PHONY: src gui lang test examples
    8431
     32all: src gui lang examples test
    8533
     34src:
     35        $(MAKE) -C src all
     36gui:
     37        $(MAKE) -C gui all
     38lang:
     39        $(MAKE) -C lang all
     40examples:
     41        $(MAKE) -C examples all
     42test:
     43        #$(MAKE) -C test all
    8644
    87 #############################################################################
    88 
    89 #tcl bindings
    90 #cd tcl; @TCLSH@ install.tcl
    91 install_tcl:
    92         @if test "x@TCLSH@" != "x" ; then \
    93                 cd tcl; $(bindir)/tclsh install.tcl; cd -;\
    94                 $(MAKE) -C src/tcl install; \
    95         fi
    96 
    97 # matlab bindings
    98 build_matlab:
    99         @if test "x@MEX@" != "x" ; then \
    100                 $(MAKE) -C src/matlab; \
    101         fi
    102 
    103 install_matlab: build_matlab
    104         @if test "x@MEX@" != "x" ; then \
    105                 $(MAKE) -C src/matlab install; \
    106         fi
    107 
    108 # octave bindings
    109 build_octave:
    110         @if test "x@MKOCTFILE@" != "x" ; then \
    111                 $(MAKE) -C src/octave; \
    112         fi
    113 
    114 install_octave: build_octave
    115         @if test "x@MKOCTFILE@" != "x" ; then \
    116                 $(MAKE) -C src/octave install; \
    117         fi
    118 
    119 build_python:
    120         @if test "x@PYTHON@" != "x" ; then \
    121                 set -x; \
    122                 cd python; \
    123                 @PYTHON@ setup.py \
    124                         build_ext \
    125                         --library-dirs=$(libdir):../src \
    126                         --include-dirs=$(includedir) \
    127                         build; \
    128         fi
    129 
    130 install_python: build_python
    131         @if test "x@PYTHON@" != "x" ; then \
    132                 cd python; \
    133                 @PYTHON@ setup.py install --prefix=$(prefix); \
    134         fi
    135 
    136 build_perl:
    137         @if test "x@PERL@" != "x" ; then \
    138                 cd perl; \
    139                 @PERL@ Makefile.PL INSTALLSITELIB=$(libdir)/perl5 INSTALLSITEARCH=$(libdir)/perl5 INSTALLSITEMAN3DIR=$(mandir)/man3; \
    140                 $(MAKE); LD_LIBRARY_PATH=$(libdir):../src $(MAKE) test; \
    141         fi
    142 
    143 install_perl: build_perl
    144         @if test "x@PERL@" != "x" ; then \
    145                 $(MAKE) -C perl install; \
    146         fi
    147 
    148 build_pkgs:
    149         @if ! test -d "bin"; then \
    150                 mkdir bin;\
    151         fi
    152         # building rappture binary package
    153         cd $(prefix)/..; tar czf @RP_BASE@/bin/$(TarfileBasename).tar.gz $(bn)
     45install:
     46        $(MAKE) -C examples install
     47        $(MAKE) -C gui install
     48        $(MAKE) -C lang install
     49        $(MAKE) -C src install
    15450
    15551clean:
    156         $(MAKE) -C examples/app-fermi/cee clean
    157         $(MAKE) -C examples/app-fermi/fortran clean
    158         $(MAKE) -C examples/app-fermi/wrapper/cee clean
    159         $(MAKE) -C examples/c-example clean
     52        $(MAKE) -C examples clean
    16053        $(MAKE) -C gui clean
    161         @if test -r "perl/Makefile" ; then \
    162                 $(MAKE) -C perl clean; \
    163         fi
    164         rm -rf python/build
     54        $(MAKE) -C lang clean
    16555        $(MAKE) -C src clean
    166         $(MAKE) -C src/matlab clean
    167         $(MAKE) -C src/octave clean
    168         $(MAKE) -C src/tcl clean
    169         $(MAKE) -C src2/core clean
    170         rm -f include/*
     56        $(MAKE) -C test clean
    17157
    172 distclean:
    173         rm -f examples/demo.bash
    174         $(MAKE) -C examples/app-fermi/cee distclean
    175         $(MAKE) -C examples/app-fermi/fortran distclean
    176         $(MAKE) -C examples/app-fermi/wrapper/cee distclean
    177         $(MAKE) -C examples/c-example distclean
     58distclean:
     59        $(MAKE) -C examples distclean
    17860        $(MAKE) -C gui distclean
    179         $(MAKE) -C perl clean; rm perl/Makefile.PL
    180         rm -rf python/build python/setup.py
     61        $(MAKE) -C lang distclean
    18162        $(MAKE) -C src distclean
    182         $(MAKE) -C src/matlab distclean
    183         $(MAKE) -C src/octave distclean
    184         $(MAKE) -C src/tcl distclean
    185         $(MAKE) -C src2/core distclean
    18663        $(MAKE) -C test distclean
    187         rm -f gui/apps/rappture gui/apps/simsim gui/apps/rappture.env;
    188         rm -rf Makefile config.status config.log bin;
    189         rm -f include/*
     64        $(RM) Makefile config.status config.log  *~
     65
     66package:
     67        tar -C $(prefix) -czf $(tarfile) .
  • trunk/configure

    r942 r1018  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.61 for Rappture Core and Bindings 1.1.
     3# Generated by GNU Autoconf 2.62 for Rappture 1.1.
    44#
    55# Report bugs to <rappture@nanohub.org>.
    66#
    77# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
    8 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
     8# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    99# This configure script is free software; the Free Software Foundation
    1010# gives unlimited permission to copy, distribute and modify it.
     
    1818  emulate sh
    1919  NULLCMD=:
    20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
    2121  # is contrary to our usage.  Disable this feature.
    2222  alias -g '${1+"$@"}'='"$@"'
     
    4040as_cr_alnum=$as_cr_Letters$as_cr_digits
    4141
     42as_nl='
     43'
     44export as_nl
     45# Printing a long string crashes Solaris 7 /usr/bin/printf.
     46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
     47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
     48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
     49if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
     50  as_echo='printf %s\n'
     51  as_echo_n='printf %s'
     52else
     53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
     54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
     55    as_echo_n='/usr/ucb/echo -n'
     56  else
     57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     58    as_echo_n_body='eval
     59      arg=$1;
     60      case $arg in
     61      *"$as_nl"*)
     62        expr "X$arg" : "X\\(.*\\)$as_nl";
     63        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
     64      esac;
     65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
     66    '
     67    export as_echo_n_body
     68    as_echo_n='sh -c $as_echo_n_body as_echo'
     69  fi
     70  export as_echo_body
     71  as_echo='sh -c $as_echo_body as_echo'
     72fi
     73
    4274# The user is always right.
    4375if test "${PATH_SEPARATOR+set}" != set; then
    44   echo "#! /bin/sh" >conf$$.sh
    45   echo  "exit 0"   >>conf$$.sh
    46   chmod +x conf$$.sh
    47   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    48     PATH_SEPARATOR=';'
    49   else
    50     PATH_SEPARATOR=:
    51   fi
    52   rm -f conf$$.sh
     76  PATH_SEPARATOR=:
     77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
     79      PATH_SEPARATOR=';'
     80  }
    5381fi
    5482
     
    6694# (If _AS_PATH_WALK were called with IFS unset, it would disable word
    6795# splitting by setting IFS to empty value.)
    68 as_nl='
    69 '
    7096IFS=" ""        $as_nl"
    7197
     
    90116fi
    91117if test ! -f "$as_myself"; then
    92   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
    93119  { (exit 1); exit 1; }
    94120fi
     
    103129
    104130# NLS nuisances.
    105 for as_var in \
    106   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
    107   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
    108   LC_TELEPHONE LC_TIME
    109 do
    110   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    111     eval $as_var=C; export $as_var
    112   else
    113     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
    114   fi
    115 done
     131LC_ALL=C
     132export LC_ALL
     133LANGUAGE=C
     134export LANGUAGE
    116135
    117136# Required to use basename.
     
    135154         X"$0" : 'X\(//\)$' \| \
    136155         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    137 echo X/"$0" |
     156$as_echo X/"$0" |
    138157    sed '/^.*\/\([^/][^/]*\)\/*$/{
    139158            s//\1/
     
    161180fi
    162181
    163   if test $as_have_required = yes &&     (eval ":
     182  if test $as_have_required = yes &&     (eval ":
    164183(as_func_return () {
    165184  (exit \$1)
     
    243262  emulate sh
    244263  NULLCMD=:
    245   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     264  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
    246265  # is contrary to our usage.  Disable this feature.
    247266  alias -g '${1+"$@"}'='"$@"'
     
    264283  emulate sh
    265284  NULLCMD=:
    266   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     285  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
    267286  # is contrary to our usage.  Disable this feature.
    268287  alias -g '${1+"$@"}'='"$@"'
     
    344363      if test "x$CONFIG_SHELL" != x; then
    345364  for as_var in BASH_ENV ENV
    346         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
    347         done
    348         export CONFIG_SHELL
    349         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
     365        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
     366        done
     367        export CONFIG_SHELL
     368        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
    350369fi
    351370
     
    416435test \$exitcode = 0") || {
    417436  echo No shell found that supports shell functions.
    418   echo Please tell autoconf@gnu.org about your system,
    419   echo including any error possibly output before this
    420   echo message
     437  echo Please tell bug-autoconf@gnu.org about your system,
     438  echo including any error possibly output before this message.
     439  echo This can help us improve future autoconf versions.
     440  echo Configuration will now proceed without shell functions.
    421441}
    422442
     
    454474    ' >$as_me.lineno &&
    455475  chmod +x "$as_me.lineno" ||
    456     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
     476    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    457477   { (exit 1); exit 1; }; }
    458478
     
    482502  ECHO_N='-n';;
    483503esac
    484 
    485504if expr a : '\(a\)' >/dev/null 2>&1 &&
    486505   test "X`expr 00001 : '.*\(...\)'`" = X001; then
     
    495514else
    496515  rm -f conf$$.dir
    497   mkdir conf$$.dir
    498 fi
    499 echo >conf$$.file
    500 if ln -s conf$$.file conf$$ 2>/dev/null; then
    501   as_ln_s='ln -s'
    502   # ... but there are two gotchas:
    503   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    504   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    505   # In both cases, we have to default to `cp -p'.
    506   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     516  mkdir conf$$.dir 2>/dev/null
     517fi
     518if (echo >conf$$.file) 2>/dev/null; then
     519  if ln -s conf$$.file conf$$ 2>/dev/null; then
     520    as_ln_s='ln -s'
     521    # ... but there are two gotchas:
     522    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     523    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
     524    # In both cases, we have to default to `cp -p'.
     525    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     526      as_ln_s='cp -p'
     527  elif ln conf$$.file conf$$ 2>/dev/null; then
     528    as_ln_s=ln
     529  else
    507530    as_ln_s='cp -p'
    508 elif ln conf$$.file conf$$ 2>/dev/null; then
    509   as_ln_s=ln
     531  fi
    510532else
    511533  as_ln_s='cp -p'
     
    532554    eval sh -c '\''
    533555      if test -d "$1"; then
    534         test -d "$1/.";
     556        test -d "$1/.";
    535557      else
    536558        case $1 in
    537         -*)set "./$1";;
     559        -*)set "./$1";;
    538560        esac;
    539561        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
     
    573595
    574596# Identity of this package.
    575 PACKAGE_NAME='Rappture Core and Bindings'
    576 PACKAGE_TARNAME='rappture-core-and-bindings'
     597PACKAGE_NAME='Rappture'
     598PACKAGE_TARNAME='rappture'
    577599PACKAGE_VERSION='1.1'
    578 PACKAGE_STRING='Rappture Core and Bindings 1.1'
     600PACKAGE_STRING='Rappture 1.1'
    579601PACKAGE_BUGREPORT='rappture@nanohub.org'
    580602
     
    615637#endif"
    616638
     639enable_option_checking=no
    617640ac_subst_vars='SHELL
    618641PATH_SEPARATOR
     
    652675host_alias
    653676target_alias
    654 VERSION
    655677LIB_SEARCH_DIRS
    656678INSTALL_PROGRAM
     
    665687EXEEXT
    666688OBJEXT
     689RANLIB
     690LN_S
    667691CPP
    668692GREP
     
    675699FFLAGS
    676700ac_ct_F77
     701AR
     702DL_LIBS
     703DL_OBJS
     704PLAT_OBJS
     705PLAT_SRCS
     706CFLAGS_DEBUG
     707CFLAGS_OPTIMIZE
     708CFLAGS_WARNING
     709LDFLAGS_DEBUG
     710LDFLAGS_OPTIMIZE
     711CC_SEARCH_FLAGS
     712LD_SEARCH_FLAGS
     713STLIB_LD
     714SHLIB_LD
     715TCL_SHLIB_LD_EXTRAS
     716TK_SHLIB_LD_EXTRAS
     717SHLIB_LD_LIBS
     718SHLIB_CFLAGS
     719SHLIB_SUFFIX
     720MAKE_LIB
     721MAKE_STUB_LIB
     722INSTALL_LIB
     723INSTALL_STUB_LIB
    677724ENABLE_GUI
    678725TCLSH
     
    689736PYTHON_INCLUDES
    690737PYTHON_SITE_PACKAGES
     738RUBY
    691739RP_BASE
     740SHLIB_LDFLAGS
     741CFLAGS_DEFAULT
     742LDFLAGS_DEFAULT
    692743subdirs
    693744LIBOBJS
    694745LTLIBOBJS'
    695746ac_subst_files=''
     747ac_user_opts='
     748enable_option_checking
     749enable_64bit
     750enable_64bit_vis
     751enable_corefoundation
     752enable_load
     753enable_gui
     754with_tclsh
     755with_matlab
     756with_matlab_arch
     757with_mexext
     758with_octave
     759with_perl
     760with_python
     761with_ruby
     762enable_shared
     763enable_symbols
     764'
    696765      ac_precious_vars='build_alias
    697766host_alias
     
    709778F77
    710779FFLAGS'
    711 ac_subdirs_all='gui
    712 src/tcl
    713 optimizer/src '
     780ac_subdirs_all='packages/optimizer/src '
    714781
    715782# Initialize some variables set by options.
    716783ac_init_help=
    717784ac_init_version=false
     785ac_unrecognized_opts=
     786ac_unrecognized_sep=
    718787# The variables have the same names as the options, with
    719788# dashes changed to underlines.
     
    814883
    815884  -disable-* | --disable-*)
    816     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     885    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    817886    # Reject names that are not valid shell variable names.
    818     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    819       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
     887    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
     888      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
    820889   { (exit 1); exit 1; }; }
    821     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
    822     eval enable_$ac_feature=no ;;
     890    ac_useropt_orig=$ac_useropt
     891    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     892    case $ac_user_opts in
     893      *"
     894"enable_$ac_useropt"
     895"*) ;;
     896      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
     897         ac_unrecognized_sep=', ';;
     898    esac
     899    eval enable_$ac_useropt=no ;;
    823900
    824901  -docdir | --docdir | --docdi | --doc | --do)
     
    833910
    834911  -enable-* | --enable-*)
    835     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     912    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    836913    # Reject names that are not valid shell variable names.
    837     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    838       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
     914    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
     915      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
    839916   { (exit 1); exit 1; }; }
    840     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
    841     eval enable_$ac_feature=\$ac_optarg ;;
     917    ac_useropt_orig=$ac_useropt
     918    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     919    case $ac_user_opts in
     920      *"
     921"enable_$ac_useropt"
     922"*) ;;
     923      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
     924         ac_unrecognized_sep=', ';;
     925    esac
     926    eval enable_$ac_useropt=\$ac_optarg ;;
    842927
    843928  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
     
    10301115
    10311116  -with-* | --with-*)
    1032     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     1117    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    10331118    # Reject names that are not valid shell variable names.
    1034     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    1035       { echo "$as_me: error: invalid package name: $ac_package" >&2
     1119    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
     1120      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
    10361121   { (exit 1); exit 1; }; }
    1037     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
    1038     eval with_$ac_package=\$ac_optarg ;;
     1122    ac_useropt_orig=$ac_useropt
     1123    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     1124    case $ac_user_opts in
     1125      *"
     1126"with_$ac_useropt"
     1127"*) ;;
     1128      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
     1129         ac_unrecognized_sep=', ';;
     1130    esac
     1131    eval with_$ac_useropt=\$ac_optarg ;;
    10391132
    10401133  -without-* | --without-*)
    1041     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     1134    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    10421135    # Reject names that are not valid shell variable names.
    1043     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    1044       { echo "$as_me: error: invalid package name: $ac_package" >&2
     1136    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
     1137      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
    10451138   { (exit 1); exit 1; }; }
    1046     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
    1047     eval with_$ac_package=no ;;
     1139    ac_useropt_orig=$ac_useropt
     1140    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     1141    case $ac_user_opts in
     1142      *"
     1143"with_$ac_useropt"
     1144"*) ;;
     1145      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
     1146         ac_unrecognized_sep=', ';;
     1147    esac
     1148    eval with_$ac_useropt=no ;;
    10481149
    10491150  --x)
     
    10651166    x_libraries=$ac_optarg ;;
    10661167
    1067   -*) { echo "$as_me: error: unrecognized option: $ac_option
     1168  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
    10681169Try \`$0 --help' for more information." >&2
    10691170   { (exit 1); exit 1; }; }
     
    10741175    # Reject names that are not valid shell variable names.
    10751176    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
    1076       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
     1177      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    10771178   { (exit 1); exit 1; }; }
    10781179    eval $ac_envvar=\$ac_optarg
     
    10811182  *)
    10821183    # FIXME: should be removed in autoconf 3.0.
    1083     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     1184    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    10841185    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    1085       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
     1186      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    10861187    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    10871188    ;;
     
    10921193if test -n "$ac_prev"; then
    10931194  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
    1094   { echo "$as_me: error: missing argument to $ac_option" >&2
     1195  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
    10951196   { (exit 1); exit 1; }; }
    10961197fi
    10971198
    1098 # Be sure to have absolute directory names.
     1199if test -n "$ac_unrecognized_opts"; then
     1200  case $enable_option_checking in
     1201    no) ;;
     1202    fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
     1203   { (exit 1); exit 1; }; } ;;
     1204    *)     $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
     1205  esac
     1206fi
     1207
     1208# Check all directory arguments for consistency.
    10991209for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
    11001210                datadir sysconfdir sharedstatedir localstatedir includedir \
     
    11031213do
    11041214  eval ac_val=\$$ac_var
     1215  # Remove trailing slashes.
     1216  case $ac_val in
     1217    */ )
     1218      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
     1219      eval $ac_var=\$ac_val;;
     1220  esac
     1221  # Be sure to have absolute directory names.
    11051222  case $ac_val in
    11061223    [\\/$]* | ?:[\\/]* )  continue;;
    11071224    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    11081225  esac
    1109   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
     1226  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
    11101227   { (exit 1); exit 1; }; }
    11111228done
     
    11221239  if test "x$build_alias" = x; then
    11231240    cross_compiling=maybe
    1124     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
     1241    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    11251242    If a cross compiler is detected then cross compile mode will be used." >&2
    11261243  elif test "x$build_alias" != "x$host_alias"; then
     
    11381255ac_ls_di=`ls -di .` &&
    11391256ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
    1140   { echo "$as_me: error: Working directory cannot be determined" >&2
     1257  { $as_echo "$as_me: error: Working directory cannot be determined" >&2
    11411258   { (exit 1); exit 1; }; }
    11421259test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
    1143   { echo "$as_me: error: pwd does not report name of working directory" >&2
     1260  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
    11441261   { (exit 1); exit 1; }; }
    11451262
     
    11491266  ac_srcdir_defaulted=yes
    11501267  # Try the directory containing this script, then the parent directory.
    1151   ac_confdir=`$as_dirname -- "$0" ||
    1152 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    1153          X"$0" : 'X\(//\)[^/]' \| \
    1154          X"$0" : 'X\(//\)$' \| \
    1155          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    1156 echo X"$0" |
     1268  ac_confdir=`$as_dirname -- "$as_myself" ||
     1269$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
     1270         X"$as_myself" : 'X\(//\)[^/]' \| \
     1271         X"$as_myself" : 'X\(//\)$' \| \
     1272         X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
     1273$as_echo X"$as_myself" |
    11571274    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    11581275            s//\1/
     
    11811298if test ! -r "$srcdir/$ac_unique_file"; then
    11821299  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
    1183   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
     1300  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    11841301   { (exit 1); exit 1; }; }
    11851302fi
    11861303ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
    11871304ac_abs_confdir=`(
    1188         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
     1305        cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
    11891306   { (exit 1); exit 1; }; }
    11901307        pwd)`
     
    12131330  # This message is too long to be a string in the A/UX 3.1 sh.
    12141331  cat <<_ACEOF
    1215 \`configure' configures Rappture Core and Bindings 1.1 to adapt to many kinds of systems.
     1332\`configure' configures Rappture 1.1 to adapt to many kinds of systems.
    12161333
    12171334Usage: $0 [OPTION]... [VAR=VALUE]...
     
    12351352Installation directories:
    12361353  --prefix=PREFIX         install architecture-independent files in PREFIX
    1237                           [$ac_default_prefix]
     1354                          [$ac_default_prefix]
    12381355  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
    1239                           [PREFIX]
     1356                          [PREFIX]
    12401357
    12411358By default, \`make install' will install all the files in
     
    12471364
    12481365Fine tuning of the installation directories:
    1249   --bindir=DIR           user executables [EPREFIX/bin]
    1250   --sbindir=DIR          system admin executables [EPREFIX/sbin]
    1251   --libexecdir=DIR       program executables [EPREFIX/libexec]
    1252   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
    1253   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
    1254   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
    1255   --libdir=DIR           object code libraries [EPREFIX/lib]
    1256   --includedir=DIR       C header files [PREFIX/include]
    1257   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
    1258   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
    1259   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
    1260   --infodir=DIR          info documentation [DATAROOTDIR/info]
    1261   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
    1262   --mandir=DIR           man documentation [DATAROOTDIR/man]
    1263   --docdir=DIR           documentation root [DATAROOTDIR/doc/rappture-core-and-bindings]
    1264   --htmldir=DIR          html documentation [DOCDIR]
    1265   --dvidir=DIR           dvi documentation [DOCDIR]
    1266   --pdfdir=DIR           pdf documentation [DOCDIR]
    1267   --psdir=DIR            ps documentation [DOCDIR]
     1366  --bindir=DIR            user executables [EPREFIX/bin]
     1367  --sbindir=DIR           system admin executables [EPREFIX/sbin]
     1368  --libexecdir=DIR        program executables [EPREFIX/libexec]
     1369  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
     1370  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
     1371  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
     1372  --libdir=DIR            object code libraries [EPREFIX/lib]
     1373  --includedir=DIR        C header files [PREFIX/include]
     1374  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
     1375  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
     1376  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
     1377  --infodir=DIR           info documentation [DATAROOTDIR/info]
     1378  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
     1379  --mandir=DIR            man documentation [DATAROOTDIR/man]
     1380  --docdir=DIR            documentation root [DATAROOTDIR/doc/rappture]
     1381  --htmldir=DIR           html documentation [DOCDIR]
     1382  --dvidir=DIR            dvi documentation [DOCDIR]
     1383  --pdfdir=DIR            pdf documentation [DOCDIR]
     1384  --psdir=DIR             ps documentation [DOCDIR]
    12681385_ACEOF
    12691386
     
    12741391if test -n "$ac_init_help"; then
    12751392  case $ac_init_help in
    1276      short | recursive ) echo "Configuration of Rappture Core and Bindings 1.1:";;
     1393     short | recursive ) echo "Configuration of Rappture 1.1:";;
    12771394   esac
    12781395  cat <<\_ACEOF
    12791396
    12801397Optional Features:
     1398  --disable-option-checking  ignore unrecognized --enable/--with options
    12811399  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
    12821400  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
     1401  --enable-64bit          enable 64bit support (where applicable)
     1402  --enable-64bit-vis      enable 64bit Sparc VIS support
     1403  --enable-corefoundation use CoreFoundation API --enable-corefoundation
     1404  --disable-load          disallow dynamic loading and "load" command
    12831405  --enable-gui            build code related to the graphical user interface
    12841406                          [default=yes]
     1407  --enable-shared         build and link with shared libraries --enable-shared
     1408  --enable-symbols        build with debugging symbols --disable-symbols
    12851409
    12861410Optional Packages:
     
    12971421  --with-perl=DIR         location of perl [default=check]
    12981422  --with-python=DIR       location of python [default=check]
     1423  --with-ruby=DIR         location of ruby [default=check]
    12991424
    13001425Some influential environment variables:
     
    13241449  # If there are subdirs, report their specific --help.
    13251450  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    1326     test -d "$ac_dir" || continue
     1451    test -d "$ac_dir" ||
     1452      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
     1453      continue
    13271454    ac_builddir=.
    13281455
     
    13301457.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
    13311458*)
    1332   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
     1459  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
    13331460  # A ".." for each directory in $ac_dir_suffix.
    1334   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
     1461  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
    13351462  case $ac_top_builddir_sub in
    13361463  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     
    13681495      $SHELL "$ac_srcdir/configure" --help=recursive
    13691496    else
    1370       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     1497      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    13711498    fi || ac_status=$?
    13721499    cd "$ac_pwd" || { ac_status=$?; break; }
     
    13771504if $ac_init_version; then
    13781505  cat <<\_ACEOF
    1379 Rappture Core and Bindings configure 1.1
    1380 generated by GNU Autoconf 2.61
     1506Rappture configure 1.1
     1507generated by GNU Autoconf 2.62
    13811508
    13821509Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
    1383 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
     15102002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    13841511This configure script is free software; the Free Software Foundation
    13851512gives unlimited permission to copy, distribute and modify it.
     
    13911518running configure, to aid debugging if configure makes a mistake.
    13921519
    1393 It was created by Rappture Core and Bindings $as_me 1.1, which was
    1394 generated by GNU Autoconf 2.61.  Invocation command line was
     1520It was created by Rappture $as_me 1.1, which was
     1521generated by GNU Autoconf 2.62.  Invocation command line was
    13951522
    13961523  $ $0 $@
     
    14281555  IFS=$as_save_IFS
    14291556  test -z "$as_dir" && as_dir=.
    1430   echo "PATH: $as_dir"
     1557  $as_echo "PATH: $as_dir"
    14311558done
    14321559IFS=$as_save_IFS
     
    14631590      continue ;;
    14641591    *\'*)
    1465       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     1592      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    14661593    esac
    14671594    case $ac_pass in
     
    15151642    *${as_nl}*)
    15161643      case $ac_var in #(
    1517       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
    1518 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
     1644      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
     1645$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
    15191646      esac
    15201647      case $ac_var in #(
    15211648      _ | IFS | as_nl) ;; #(
     1649      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
    15221650      *) $as_unset $ac_var ;;
    15231651      esac ;;
     
    15491677      eval ac_val=\$$ac_var
    15501678      case $ac_val in
    1551       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     1679      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
    15521680      esac
    1553       echo "$ac_var='\''$ac_val'\''"
     1681      $as_echo "$ac_var='\''$ac_val'\''"
    15541682    done | sort
    15551683    echo
     
    15661694        eval ac_val=\$$ac_var
    15671695        case $ac_val in
    1568         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     1696        *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
    15691697        esac
    1570         echo "$ac_var='\''$ac_val'\''"
     1698        $as_echo "$ac_var='\''$ac_val'\''"
    15711699      done | sort
    15721700      echo
     
    15841712    fi
    15851713    test "$ac_signal" != 0 &&
    1586       echo "$as_me: caught signal $ac_signal"
    1587     echo "$as_me: exit $exit_status"
     1714      $as_echo "$as_me: caught signal $ac_signal"
     1715    $as_echo "$as_me: exit $exit_status"
    15881716  } >&5
    15891717  rm -f core *.core core.conftest.* &&
     
    16271755
    16281756# Let the site file select an alternate cache file if it wants to.
    1629 # Prefer explicitly selected file to automatically selected ones.
     1757# Prefer an explicitly selected file to automatically selected ones.
     1758ac_site_file1=NONE
     1759ac_site_file2=NONE
    16301760if test -n "$CONFIG_SITE"; then
    1631   set x "$CONFIG_SITE"
     1761  ac_site_file1=$CONFIG_SITE
    16321762elif test "x$prefix" != xNONE; then
    1633   set x "$prefix/share/config.site" "$prefix/etc/config.site"
    1634 else
    1635   set x "$ac_default_prefix/share/config.site" \
    1636         "$ac_default_prefix/etc/config.site"
    1637 fi
    1638 shift
    1639 for ac_site_file
     1763  ac_site_file1=$prefix/share/config.site
     1764  ac_site_file2=$prefix/etc/config.site
     1765else
     1766  ac_site_file1=$ac_default_prefix/share/config.site
     1767  ac_site_file2=$ac_default_prefix/etc/config.site
     1768fi
     1769for ac_site_file in "$ac_site_file1" "$ac_site_file2"
    16401770do
     1771  test "x$ac_site_file" = xNONE && continue
    16411772  if test -r "$ac_site_file"; then
    1642     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
    1643 echo "$as_me: loading site script $ac_site_file" >&6;}
     1773    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
     1774$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    16441775    sed 's/^/| /' "$ac_site_file" >&5
    16451776    . "$ac_site_file"
     
    16511782  # files actually), so we avoid doing that.
    16521783  if test -f "$cache_file"; then
    1653     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
    1654 echo "$as_me: loading cache $cache_file" >&6;}
     1784    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
     1785$as_echo "$as_me: loading cache $cache_file" >&6;}
    16551786    case $cache_file in
    16561787      [\\/]* | ?:[\\/]* ) . "$cache_file";;
     
    16591790  fi
    16601791else
    1661   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
    1662 echo "$as_me: creating cache $cache_file" >&6;}
     1792  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
     1793$as_echo "$as_me: creating cache $cache_file" >&6;}
    16631794  >$cache_file
    16641795fi
     
    16741805  case $ac_old_set,$ac_new_set in
    16751806    set,)
    1676       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
    1677 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
     1807      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
     1808$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
    16781809      ac_cache_corrupted=: ;;
    16791810    ,set)
    1680       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
    1681 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
     1811      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
     1812$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
    16821813      ac_cache_corrupted=: ;;
    16831814    ,);;
    16841815    *)
    16851816      if test "x$ac_old_val" != "x$ac_new_val"; then
    1686         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
    1687 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
    1688         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
    1689 echo "$as_me:   former value:  $ac_old_val" >&2;}
    1690         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
    1691 echo "$as_me:   current value: $ac_new_val" >&2;}
    1692         ac_cache_corrupted=:
     1817        # differences in whitespace do not lead to failure.
     1818        ac_old_val_w=`echo x $ac_old_val`
     1819        ac_new_val_w=`echo x $ac_new_val`
     1820        if test "$ac_old_val_w" != "$ac_new_val_w"; then
     1821          { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
     1822$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
     1823          ac_cache_corrupted=:
     1824        else
     1825          { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
     1826$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
     1827          eval $ac_var=\$ac_old_val
     1828        fi
     1829        { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
     1830$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
     1831        { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
     1832$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
    16931833      fi;;
    16941834  esac
     
    16961836  if test "$ac_new_set" = set; then
    16971837    case $ac_new_val in
    1698     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     1838    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    16991839    *) ac_arg=$ac_var=$ac_new_val ;;
    17001840    esac
     
    17061846done
    17071847if $ac_cache_corrupted; then
    1708   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
    1709 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
    1710   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
    1711 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
     1848  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
     1849$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
     1850  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
     1851$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
    17121852   { (exit 1); exit 1; }; }
    17131853fi
     
    17431883ac_compiler_gnu=$ac_cv_c_compiler_gnu
    17441884
    1745 
    1746 
    1747 VERSION=0.0.1
    17481885
    17491886
     
    17841921done
    17851922if test -z "$ac_aux_dir"; then
    1786   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
    1787 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
     1923  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
     1924$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
    17881925   { (exit 1); exit 1; }; }
    17891926fi
     
    18111948# OS/2's system install, which has a completely different semantic
    18121949# ./install, which can be erroneously created by make from ./install.sh.
    1813 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
    1814 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
     1950# Reject install programs that cannot install multiple files.
     1951{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
     1952$as_echo_n "checking for a BSD-compatible install... " >&6; }
    18151953if test -z "$INSTALL"; then
    18161954if test "${ac_cv_path_install+set}" = set; then
    1817   echo $ECHO_N "(cached) $ECHO_C" >&6
     1955  $as_echo_n "(cached) " >&6
    18181956else
    18191957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     
    18441982            :
    18451983          else
    1846             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
    1847             break 3
     1984            rm -rf conftest.one conftest.two conftest.dir
     1985            echo one > conftest.one
     1986            echo two > conftest.two
     1987            mkdir conftest.dir
     1988            if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
     1989              test -s conftest.one && test -s conftest.two &&
     1990              test -s conftest.dir/conftest.one &&
     1991              test -s conftest.dir/conftest.two
     1992            then
     1993              ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
     1994              break 3
     1995            fi
    18481996          fi
    18491997        fi
     
    18522000    ;;
    18532001esac
     2002
    18542003done
    18552004IFS=$as_save_IFS
    18562005
     2006rm -rf conftest.one conftest.two conftest.dir
    18572007
    18582008fi
     
    18672017  fi
    18682018fi
    1869 { echo "$as_me:$LINENO: result: $INSTALL" >&5
    1870 echo "${ECHO_T}$INSTALL" >&6; }
     2019{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
     2020$as_echo "$INSTALL" >&6; }
    18712021
    18722022# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
     
    18782028test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
    18792029
    1880 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
    1881 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
    1882 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
     2030{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
     2031$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
     2032set x ${MAKE-make}
     2033ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
    18832034if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
    1884   echo $ECHO_N "(cached) $ECHO_C" >&6
     2035  $as_echo_n "(cached) " >&6
    18852036else
    18862037  cat >conftest.make <<\_ACEOF
     
    18992050fi
    19002051if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
    1901   { echo "$as_me:$LINENO: result: yes" >&5
    1902 echo "${ECHO_T}yes" >&6; }
     2052  { $as_echo "$as_me:$LINENO: result: yes" >&5
     2053$as_echo "yes" >&6; }
    19032054  SET_MAKE=
    19042055else
    1905   { echo "$as_me:$LINENO: result: no" >&5
    1906 echo "${ECHO_T}no" >&6; }
     2056  { $as_echo "$as_me:$LINENO: result: no" >&5
     2057$as_echo "no" >&6; }
    19072058  SET_MAKE="MAKE=${MAKE-make}"
    19082059fi
     
    19172068  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
    19182069set dummy ${ac_tool_prefix}gcc; ac_word=$2
    1919 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    1920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2070{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2071$as_echo_n "checking for $ac_word... " >&6; }
    19212072if test "${ac_cv_prog_CC+set}" = set; then
    1922   echo $ECHO_N "(cached) $ECHO_C" >&6
     2073  $as_echo_n "(cached) " >&6
    19232074else
    19242075  if test -n "$CC"; then
     
    19332084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    19342085    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    1935     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2086    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    19362087    break 2
    19372088  fi
     
    19442095CC=$ac_cv_prog_CC
    19452096if test -n "$CC"; then
    1946   { echo "$as_me:$LINENO: result: $CC" >&5
    1947 echo "${ECHO_T}$CC" >&6; }
    1948 else
    1949   { echo "$as_me:$LINENO: result: no" >&5
    1950 echo "${ECHO_T}no" >&6; }
     2097  { $as_echo "$as_me:$LINENO: result: $CC" >&5
     2098$as_echo "$CC" >&6; }
     2099else
     2100  { $as_echo "$as_me:$LINENO: result: no" >&5
     2101$as_echo "no" >&6; }
    19512102fi
    19522103
     
    19572108  # Extract the first word of "gcc", so it can be a program name with args.
    19582109set dummy gcc; ac_word=$2
    1959 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    1960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2110{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2111$as_echo_n "checking for $ac_word... " >&6; }
    19612112if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
    1962   echo $ECHO_N "(cached) $ECHO_C" >&6
     2113  $as_echo_n "(cached) " >&6
    19632114else
    19642115  if test -n "$ac_ct_CC"; then
     
    19732124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    19742125    ac_cv_prog_ac_ct_CC="gcc"
    1975     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2126    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    19762127    break 2
    19772128  fi
     
    19842135ac_ct_CC=$ac_cv_prog_ac_ct_CC
    19852136if test -n "$ac_ct_CC"; then
    1986   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
    1987 echo "${ECHO_T}$ac_ct_CC" >&6; }
    1988 else
    1989   { echo "$as_me:$LINENO: result: no" >&5
    1990 echo "${ECHO_T}no" >&6; }
     2137  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
     2138$as_echo "$ac_ct_CC" >&6; }
     2139else
     2140  { $as_echo "$as_me:$LINENO: result: no" >&5
     2141$as_echo "no" >&6; }
    19912142fi
    19922143
     
    19962147    case $cross_compiling:$ac_tool_warned in
    19972148yes:)
    1998 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     2149{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
    19992150whose name does not start with the host triplet.  If you think this
    20002151configuration is useful to you, please write to autoconf@gnu.org." >&5
    2001 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     2152$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
    20022153whose name does not start with the host triplet.  If you think this
    20032154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     
    20142165    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
    20152166set dummy ${ac_tool_prefix}cc; ac_word=$2
    2016 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    2017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2167{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2168$as_echo_n "checking for $ac_word... " >&6; }
    20182169if test "${ac_cv_prog_CC+set}" = set; then
    2019   echo $ECHO_N "(cached) $ECHO_C" >&6
     2170  $as_echo_n "(cached) " >&6
    20202171else
    20212172  if test -n "$CC"; then
     
    20302181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    20312182    ac_cv_prog_CC="${ac_tool_prefix}cc"
    2032     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2183    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    20332184    break 2
    20342185  fi
     
    20412192CC=$ac_cv_prog_CC
    20422193if test -n "$CC"; then
    2043   { echo "$as_me:$LINENO: result: $CC" >&5
    2044 echo "${ECHO_T}$CC" >&6; }
    2045 else
    2046   { echo "$as_me:$LINENO: result: no" >&5
    2047 echo "${ECHO_T}no" >&6; }
     2194  { $as_echo "$as_me:$LINENO: result: $CC" >&5
     2195$as_echo "$CC" >&6; }
     2196else
     2197  { $as_echo "$as_me:$LINENO: result: no" >&5
     2198$as_echo "no" >&6; }
    20482199fi
    20492200
     
    20542205  # Extract the first word of "cc", so it can be a program name with args.
    20552206set dummy cc; ac_word=$2
    2056 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    2057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2207{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2208$as_echo_n "checking for $ac_word... " >&6; }
    20582209if test "${ac_cv_prog_CC+set}" = set; then
    2059   echo $ECHO_N "(cached) $ECHO_C" >&6
     2210  $as_echo_n "(cached) " >&6
    20602211else
    20612212  if test -n "$CC"; then
     
    20752226     fi
    20762227    ac_cv_prog_CC="cc"
    2077     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2228    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    20782229    break 2
    20792230  fi
     
    20982249CC=$ac_cv_prog_CC
    20992250if test -n "$CC"; then
    2100   { echo "$as_me:$LINENO: result: $CC" >&5
    2101 echo "${ECHO_T}$CC" >&6; }
    2102 else
    2103   { echo "$as_me:$LINENO: result: no" >&5
    2104 echo "${ECHO_T}no" >&6; }
     2251  { $as_echo "$as_me:$LINENO: result: $CC" >&5
     2252$as_echo "$CC" >&6; }
     2253else
     2254  { $as_echo "$as_me:$LINENO: result: no" >&5
     2255$as_echo "no" >&6; }
    21052256fi
    21062257
     
    21132264    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    21142265set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    2115 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    2116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2266{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2267$as_echo_n "checking for $ac_word... " >&6; }
    21172268if test "${ac_cv_prog_CC+set}" = set; then
    2118   echo $ECHO_N "(cached) $ECHO_C" >&6
     2269  $as_echo_n "(cached) " >&6
    21192270else
    21202271  if test -n "$CC"; then
     
    21292280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    21302281    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    2131     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2282    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    21322283    break 2
    21332284  fi
     
    21402291CC=$ac_cv_prog_CC
    21412292if test -n "$CC"; then
    2142   { echo "$as_me:$LINENO: result: $CC" >&5
    2143 echo "${ECHO_T}$CC" >&6; }
    2144 else
    2145   { echo "$as_me:$LINENO: result: no" >&5
    2146 echo "${ECHO_T}no" >&6; }
     2293  { $as_echo "$as_me:$LINENO: result: $CC" >&5
     2294$as_echo "$CC" >&6; }
     2295else
     2296  { $as_echo "$as_me:$LINENO: result: no" >&5
     2297$as_echo "no" >&6; }
    21472298fi
    21482299
     
    21572308  # Extract the first word of "$ac_prog", so it can be a program name with args.
    21582309set dummy $ac_prog; ac_word=$2
    2159 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    2160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     2310{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2311$as_echo_n "checking for $ac_word... " >&6; }
    21612312if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
    2162   echo $ECHO_N "(cached) $ECHO_C" >&6
     2313  $as_echo_n "(cached) " >&6
    21632314else
    21642315  if test -n "$ac_ct_CC"; then
     
    21732324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    21742325    ac_cv_prog_ac_ct_CC="$ac_prog"
    2175     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2326    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    21762327    break 2
    21772328  fi
     
    21842335ac_ct_CC=$ac_cv_prog_ac_ct_CC
    21852336if test -n "$ac_ct_CC"; then
    2186   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
    2187 echo "${ECHO_T}$ac_ct_CC" >&6; }
    2188 else
    2189   { echo "$as_me:$LINENO: result: no" >&5
    2190 echo "${ECHO_T}no" >&6; }
     2337  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
     2338$as_echo "$ac_ct_CC" >&6; }
     2339else
     2340  { $as_echo "$as_me:$LINENO: result: no" >&5
     2341$as_echo "no" >&6; }
    21912342fi
    21922343
     
    22002351    case $cross_compiling:$ac_tool_warned in
    22012352yes:)
    2202 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     2353{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
    22032354whose name does not start with the host triplet.  If you think this
    22042355configuration is useful to you, please write to autoconf@gnu.org." >&5
    2205 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     2356$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
    22062357whose name does not start with the host triplet.  If you think this
    22072358configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     
    22152366
    22162367
    2217 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
     2368test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
    22182369See \`config.log' for more details." >&5
    2219 echo "$as_me: error: no acceptable C compiler found in \$PATH
     2370$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
    22202371See \`config.log' for more details." >&2;}
    22212372   { (exit 1); exit 1; }; }
    22222373
    22232374# Provide some information about the compiler.
    2224 echo "$as_me:$LINENO: checking for C compiler version" >&5
    2225 ac_compiler=`set X $ac_compile; echo $2`
     2375$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
     2376set X $ac_compile
     2377ac_compiler=$2
    22262378{ (ac_try="$ac_compiler --version >&5"
    22272379case "(($ac_try" in
     
    22292381  *) ac_try_echo=$ac_try;;
    22302382esac
    2231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2383eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2384$as_echo "$ac_try_echo") >&5
    22322385  (eval "$ac_compiler --version >&5") 2>&5
    22332386  ac_status=$?
    2234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2387  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    22352388  (exit $ac_status); }
    22362389{ (ac_try="$ac_compiler -v >&5"
     
    22392392  *) ac_try_echo=$ac_try;;
    22402393esac
    2241 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2394eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2395$as_echo "$ac_try_echo") >&5
    22422396  (eval "$ac_compiler -v >&5") 2>&5
    22432397  ac_status=$?
    2244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2398  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    22452399  (exit $ac_status); }
    22462400{ (ac_try="$ac_compiler -V >&5"
     
    22492403  *) ac_try_echo=$ac_try;;
    22502404esac
    2251 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2406$as_echo "$ac_try_echo") >&5
    22522407  (eval "$ac_compiler -V >&5") 2>&5
    22532408  ac_status=$?
    2254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2409  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    22552410  (exit $ac_status); }
    22562411
     
    22712426_ACEOF
    22722427ac_clean_files_save=$ac_clean_files
    2273 ac_clean_files="$ac_clean_files a.out a.exe b.out"
     2428ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
    22742429# Try to create an executable without -o first, disregard a.out.
    22752430# It will help us diagnose broken compilers, and finding out an intuition
    22762431# of exeext.
    2277 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
    2278 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
    2279 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
    2280 #
    2281 # List of possible output files, starting from the most likely.
    2282 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
    2283 # only as a last resort.  b.out is created by i960 compilers.
    2284 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
    2285 #
    2286 # The IRIX 6 linker writes into existing files which may not be
    2287 # executable, retaining their permissions.  Remove them first so a
    2288 # subsequent execution test works.
     2432{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
     2433$as_echo_n "checking for C compiler default output file name... " >&6; }
     2434ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
     2435
     2436# The possible output files:
     2437ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
     2438
    22892439ac_rmfiles=
    22902440for ac_file in $ac_files
    22912441do
    22922442  case $ac_file in
    2293     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     2443    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    22942444    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
    22952445  esac
     
    23022452  *) ac_try_echo=$ac_try;;
    23032453esac
    2304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2454eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2455$as_echo "$ac_try_echo") >&5
    23052456  (eval "$ac_link_default") 2>&5
    23062457  ac_status=$?
    2307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2458  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    23082459  (exit $ac_status); }; then
    23092460  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
     
    23162467  test -f "$ac_file" || continue
    23172468  case $ac_file in
    2318     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
     2469    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
    23192470        ;;
    23202471    [ab].out )
     
    23432494fi
    23442495
    2345 { echo "$as_me:$LINENO: result: $ac_file" >&5
    2346 echo "${ECHO_T}$ac_file" >&6; }
     2496{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
     2497$as_echo "$ac_file" >&6; }
    23472498if test -z "$ac_file"; then
    2348   echo "$as_me: failed program was:" >&5
     2499  $as_echo "$as_me: failed program was:" >&5
    23492500sed 's/^/| /' conftest.$ac_ext >&5
    23502501
    2351 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
     2502{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
    23522503See \`config.log' for more details." >&5
    2353 echo "$as_me: error: C compiler cannot create executables
     2504$as_echo "$as_me: error: C compiler cannot create executables
    23542505See \`config.log' for more details." >&2;}
    23552506   { (exit 77); exit 77; }; }
     
    23602511# Check that the compiler produces executables we can run.  If not, either
    23612512# the compiler is broken, or we cross compile.
    2362 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
    2363 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
     2513{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
     2514$as_echo_n "checking whether the C compiler works... " >&6; }
    23642515# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
    23652516# If not cross compiling, check that we can run a simple program.
     
    23702521  *) ac_try_echo=$ac_try;;
    23712522esac
    2372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2523eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2524$as_echo "$ac_try_echo") >&5
    23732525  (eval "$ac_try") 2>&5
    23742526  ac_status=$?
    2375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2527  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    23762528  (exit $ac_status); }; }; then
    23772529    cross_compiling=no
     
    23802532        cross_compiling=yes
    23812533    else
    2382         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
     2534        { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
    23832535If you meant to cross compile, use \`--host'.
    23842536See \`config.log' for more details." >&5
    2385 echo "$as_me: error: cannot run C compiled programs.
     2537$as_echo "$as_me: error: cannot run C compiled programs.
    23862538If you meant to cross compile, use \`--host'.
    23872539See \`config.log' for more details." >&2;}
     
    23902542  fi
    23912543fi
    2392 { echo "$as_me:$LINENO: result: yes" >&5
    2393 echo "${ECHO_T}yes" >&6; }
    2394 
    2395 rm -f a.out a.exe conftest$ac_cv_exeext b.out
     2544{ $as_echo "$as_me:$LINENO: result: yes" >&5
     2545$as_echo "yes" >&6; }
     2546
     2547rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
    23962548ac_clean_files=$ac_clean_files_save
    23972549# Check that the compiler produces executables we can run.  If not, either
    23982550# the compiler is broken, or we cross compile.
    2399 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
    2400 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
    2401 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
    2402 echo "${ECHO_T}$cross_compiling" >&6; }
    2403 
    2404 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
    2405 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
     2551{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
     2552$as_echo_n "checking whether we are cross compiling... " >&6; }
     2553{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
     2554$as_echo "$cross_compiling" >&6; }
     2555
     2556{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
     2557$as_echo_n "checking for suffix of executables... " >&6; }
    24062558if { (ac_try="$ac_link"
    24072559case "(($ac_try" in
     
    24092561  *) ac_try_echo=$ac_try;;
    24102562esac
    2411 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2564$as_echo "$ac_try_echo") >&5
    24122565  (eval "$ac_link") 2>&5
    24132566  ac_status=$?
    2414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2567  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    24152568  (exit $ac_status); }; then
    24162569  # If both `conftest.exe' and `conftest' are `present' (well, observable)
     
    24212574  test -f "$ac_file" || continue
    24222575  case $ac_file in
    2423     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     2576    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    24242577    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
    24252578          break;;
     
    24282581done
    24292582else
    2430   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
     2583  { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
    24312584See \`config.log' for more details." >&5
    2432 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
     2585$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
    24332586See \`config.log' for more details." >&2;}
    24342587   { (exit 1); exit 1; }; }
     
    24362589
    24372590rm -f conftest$ac_cv_exeext
    2438 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
    2439 echo "${ECHO_T}$ac_cv_exeext" >&6; }
     2591{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
     2592$as_echo "$ac_cv_exeext" >&6; }
    24402593
    24412594rm -f conftest.$ac_ext
    24422595EXEEXT=$ac_cv_exeext
    24432596ac_exeext=$EXEEXT
    2444 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
    2445 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
     2597{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
     2598$as_echo_n "checking for suffix of object files... " >&6; }
    24462599if test "${ac_cv_objext+set}" = set; then
    2447   echo $ECHO_N "(cached) $ECHO_C" >&6
     2600  $as_echo_n "(cached) " >&6
    24482601else
    24492602  cat >conftest.$ac_ext <<_ACEOF
     
    24682621  *) ac_try_echo=$ac_try;;
    24692622esac
    2470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2623eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2624$as_echo "$ac_try_echo") >&5
    24712625  (eval "$ac_compile") 2>&5
    24722626  ac_status=$?
    2473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2627  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    24742628  (exit $ac_status); }; then
    24752629  for ac_file in conftest.o conftest.obj conftest.*; do
    24762630  test -f "$ac_file" || continue;
    24772631  case $ac_file in
    2478     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
     2632    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
    24792633    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
    24802634       break;;
     
    24822636done
    24832637else
    2484   echo "$as_me: failed program was:" >&5
     2638  $as_echo "$as_me: failed program was:" >&5
    24852639sed 's/^/| /' conftest.$ac_ext >&5
    24862640
    2487 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
     2641{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
    24882642See \`config.log' for more details." >&5
    2489 echo "$as_me: error: cannot compute suffix of object files: cannot compile
     2643$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
    24902644See \`config.log' for more details." >&2;}
    24912645   { (exit 1); exit 1; }; }
     
    24942648rm -f conftest.$ac_cv_objext conftest.$ac_ext
    24952649fi
    2496 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
    2497 echo "${ECHO_T}$ac_cv_objext" >&6; }
     2650{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
     2651$as_echo "$ac_cv_objext" >&6; }
    24982652OBJEXT=$ac_cv_objext
    24992653ac_objext=$OBJEXT
    2500 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
    2501 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
     2654{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
     2655$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
    25022656if test "${ac_cv_c_compiler_gnu+set}" = set; then
    2503   echo $ECHO_N "(cached) $ECHO_C" >&6
     2657  $as_echo_n "(cached) " >&6
    25042658else
    25052659  cat >conftest.$ac_ext <<_ACEOF
     
    25272681  *) ac_try_echo=$ac_try;;
    25282682esac
    2529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2683eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2684$as_echo "$ac_try_echo") >&5
    25302685  (eval "$ac_compile") 2>conftest.er1
    25312686  ac_status=$?
     
    25332688  rm -f conftest.er1
    25342689  cat conftest.err >&5
    2535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2690  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    25362691  (exit $ac_status); } && {
    25372692         test -z "$ac_c_werror_flag" ||
     
    25402695  ac_compiler_gnu=yes
    25412696else
    2542   echo "$as_me: failed program was:" >&5
     2697  $as_echo "$as_me: failed program was:" >&5
    25432698sed 's/^/| /' conftest.$ac_ext >&5
    25442699
     
    25502705
    25512706fi
    2552 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
    2553 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
    2554 GCC=`test $ac_compiler_gnu = yes && echo yes`
     2707{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
     2708$as_echo "$ac_cv_c_compiler_gnu" >&6; }
     2709if test $ac_compiler_gnu = yes; then
     2710  GCC=yes
     2711else
     2712  GCC=
     2713fi
    25552714ac_test_CFLAGS=${CFLAGS+set}
    25562715ac_save_CFLAGS=$CFLAGS
    2557 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
    2558 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
     2716{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
     2717$as_echo_n "checking whether $CC accepts -g... " >&6; }
    25592718if test "${ac_cv_prog_cc_g+set}" = set; then
    2560   echo $ECHO_N "(cached) $ECHO_C" >&6
     2719  $as_echo_n "(cached) " >&6
    25612720else
    25622721  ac_save_c_werror_flag=$ac_c_werror_flag
     
    25852744  *) ac_try_echo=$ac_try;;
    25862745esac
    2587 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2746eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2747$as_echo "$ac_try_echo") >&5
    25882748  (eval "$ac_compile") 2>conftest.er1
    25892749  ac_status=$?
     
    25912751  rm -f conftest.er1
    25922752  cat conftest.err >&5
    2593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2753  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    25942754  (exit $ac_status); } && {
    25952755         test -z "$ac_c_werror_flag" ||
     
    25982758  ac_cv_prog_cc_g=yes
    25992759else
    2600   echo "$as_me: failed program was:" >&5
     2760  $as_echo "$as_me: failed program was:" >&5
    26012761sed 's/^/| /' conftest.$ac_ext >&5
    26022762
     
    26232783  *) ac_try_echo=$ac_try;;
    26242784esac
    2625 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2785eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2786$as_echo "$ac_try_echo") >&5
    26262787  (eval "$ac_compile") 2>conftest.er1
    26272788  ac_status=$?
     
    26292790  rm -f conftest.er1
    26302791  cat conftest.err >&5
    2631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2792  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    26322793  (exit $ac_status); } && {
    26332794         test -z "$ac_c_werror_flag" ||
     
    26362797  :
    26372798else
    2638   echo "$as_me: failed program was:" >&5
     2799  $as_echo "$as_me: failed program was:" >&5
    26392800sed 's/^/| /' conftest.$ac_ext >&5
    26402801
     
    26622823  *) ac_try_echo=$ac_try;;
    26632824esac
    2664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2825eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2826$as_echo "$ac_try_echo") >&5
    26652827  (eval "$ac_compile") 2>conftest.er1
    26662828  ac_status=$?
     
    26682830  rm -f conftest.er1
    26692831  cat conftest.err >&5
    2670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2832  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    26712833  (exit $ac_status); } && {
    26722834         test -z "$ac_c_werror_flag" ||
     
    26752837  ac_cv_prog_cc_g=yes
    26762838else
    2677   echo "$as_me: failed program was:" >&5
     2839  $as_echo "$as_me: failed program was:" >&5
    26782840sed 's/^/| /' conftest.$ac_ext >&5
    26792841
     
    26902852   ac_c_werror_flag=$ac_save_c_werror_flag
    26912853fi
    2692 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
    2693 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
     2854{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
     2855$as_echo "$ac_cv_prog_cc_g" >&6; }
    26942856if test "$ac_test_CFLAGS" = set; then
    26952857  CFLAGS=$ac_save_CFLAGS
     
    27072869  fi
    27082870fi
    2709 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
    2710 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
     2871{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
     2872$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
    27112873if test "${ac_cv_prog_cc_c89+set}" = set; then
    2712   echo $ECHO_N "(cached) $ECHO_C" >&6
     2874  $as_echo_n "(cached) " >&6
    27132875else
    27142876  ac_cv_prog_cc_c89=no
     
    27812943  *) ac_try_echo=$ac_try;;
    27822944esac
    2783 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     2945eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     2946$as_echo "$ac_try_echo") >&5
    27842947  (eval "$ac_compile") 2>conftest.er1
    27852948  ac_status=$?
     
    27872950  rm -f conftest.er1
    27882951  cat conftest.err >&5
    2789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2952  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    27902953  (exit $ac_status); } && {
    27912954         test -z "$ac_c_werror_flag" ||
     
    27942957  ac_cv_prog_cc_c89=$ac_arg
    27952958else
    2796   echo "$as_me: failed program was:" >&5
     2959  $as_echo "$as_me: failed program was:" >&5
    27972960sed 's/^/| /' conftest.$ac_ext >&5
    27982961
     
    28102973case "x$ac_cv_prog_cc_c89" in
    28112974  x)
    2812     { echo "$as_me:$LINENO: result: none needed" >&5
    2813 echo "${ECHO_T}none needed" >&6; } ;;
     2975    { $as_echo "$as_me:$LINENO: result: none needed" >&5
     2976$as_echo "none needed" >&6; } ;;
    28142977  xno)
    2815     { echo "$as_me:$LINENO: result: unsupported" >&5
    2816 echo "${ECHO_T}unsupported" >&6; } ;;
     2978    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
     2979$as_echo "unsupported" >&6; } ;;
    28172980  *)
    28182981    CC="$CC $ac_cv_prog_cc_c89"
    2819     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
    2820 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
     2982    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
     2983$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
    28212984esac
    28222985
     
    28352998
    28362999
     3000# Find a good install program.  We prefer a C program (faster),
     3001# so one script is as good as another.  But avoid the broken or
     3002# incompatible versions:
     3003# SysV /etc/install, /usr/sbin/install
     3004# SunOS /usr/etc/install
     3005# IRIX /sbin/install
     3006# AIX /bin/install
     3007# AmigaOS /C/install, which installs bootblocks on floppy discs
     3008# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
     3009# AFS /usr/afsws/bin/install, which mishandles nonexistent args
     3010# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
     3011# OS/2's system install, which has a completely different semantic
     3012# ./install, which can be erroneously created by make from ./install.sh.
     3013# Reject install programs that cannot install multiple files.
     3014{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
     3015$as_echo_n "checking for a BSD-compatible install... " >&6; }
     3016if test -z "$INSTALL"; then
     3017if test "${ac_cv_path_install+set}" = set; then
     3018  $as_echo_n "(cached) " >&6
     3019else
     3020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3021for as_dir in $PATH
     3022do
     3023  IFS=$as_save_IFS
     3024  test -z "$as_dir" && as_dir=.
     3025  # Account for people who put trailing slashes in PATH elements.
     3026case $as_dir/ in
     3027  ./ | .// | /cC/* | \
     3028  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
     3029  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
     3030  /usr/ucb/* ) ;;
     3031  *)
     3032    # OSF1 and SCO ODT 3.0 have their own names for install.
     3033    # Don't use installbsd from OSF since it installs stuff as root
     3034    # by default.
     3035    for ac_prog in ginstall scoinst install; do
     3036      for ac_exec_ext in '' $ac_executable_extensions; do
     3037        if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
     3038          if test $ac_prog = install &&
     3039            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     3040            # AIX install.  It has an incompatible calling convention.
     3041            :
     3042          elif test $ac_prog = install &&
     3043            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     3044            # program-specific install script used by HP pwplus--don't use.
     3045            :
     3046          else
     3047            rm -rf conftest.one conftest.two conftest.dir
     3048            echo one > conftest.one
     3049            echo two > conftest.two
     3050            mkdir conftest.dir
     3051            if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
     3052              test -s conftest.one && test -s conftest.two &&
     3053              test -s conftest.dir/conftest.one &&
     3054              test -s conftest.dir/conftest.two
     3055            then
     3056              ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
     3057              break 3
     3058            fi
     3059          fi
     3060        fi
     3061      done
     3062    done
     3063    ;;
     3064esac
     3065
     3066done
     3067IFS=$as_save_IFS
     3068
     3069rm -rf conftest.one conftest.two conftest.dir
     3070
     3071fi
     3072  if test "${ac_cv_path_install+set}" = set; then
     3073    INSTALL=$ac_cv_path_install
     3074  else
     3075    # As a last resort, use the slow shell script.  Don't cache a
     3076    # value for INSTALL within a source directory, because that will
     3077    # break other packages using the cache if that directory is
     3078    # removed, or if the value is a relative name.
     3079    INSTALL=$ac_install_sh
     3080  fi
     3081fi
     3082{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
     3083$as_echo "$INSTALL" >&6; }
     3084
     3085# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
     3086# It thinks the first close brace ends the variable substitution.
     3087test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
     3088
     3089test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
     3090
     3091test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
     3092
     3093if test -n "$ac_tool_prefix"; then
     3094  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
     3095set dummy ${ac_tool_prefix}ranlib; ac_word=$2
     3096{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3097$as_echo_n "checking for $ac_word... " >&6; }
     3098if test "${ac_cv_prog_RANLIB+set}" = set; then
     3099  $as_echo_n "(cached) " >&6
     3100else
     3101  if test -n "$RANLIB"; then
     3102  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
     3103else
     3104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3105for as_dir in $PATH
     3106do
     3107  IFS=$as_save_IFS
     3108  test -z "$as_dir" && as_dir=.
     3109  for ac_exec_ext in '' $ac_executable_extensions; do
     3110  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     3111    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     3112    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3113    break 2
     3114  fi
     3115done
     3116done
     3117IFS=$as_save_IFS
     3118
     3119fi
     3120fi
     3121RANLIB=$ac_cv_prog_RANLIB
     3122if test -n "$RANLIB"; then
     3123  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
     3124$as_echo "$RANLIB" >&6; }
     3125else
     3126  { $as_echo "$as_me:$LINENO: result: no" >&5
     3127$as_echo "no" >&6; }
     3128fi
     3129
     3130
     3131fi
     3132if test -z "$ac_cv_prog_RANLIB"; then
     3133  ac_ct_RANLIB=$RANLIB
     3134  # Extract the first word of "ranlib", so it can be a program name with args.
     3135set dummy ranlib; ac_word=$2
     3136{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3137$as_echo_n "checking for $ac_word... " >&6; }
     3138if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
     3139  $as_echo_n "(cached) " >&6
     3140else
     3141  if test -n "$ac_ct_RANLIB"; then
     3142  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
     3143else
     3144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3145for as_dir in $PATH
     3146do
     3147  IFS=$as_save_IFS
     3148  test -z "$as_dir" && as_dir=.
     3149  for ac_exec_ext in '' $ac_executable_extensions; do
     3150  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     3151    ac_cv_prog_ac_ct_RANLIB="ranlib"
     3152    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3153    break 2
     3154  fi
     3155done
     3156done
     3157IFS=$as_save_IFS
     3158
     3159fi
     3160fi
     3161ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
     3162if test -n "$ac_ct_RANLIB"; then
     3163  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
     3164$as_echo "$ac_ct_RANLIB" >&6; }
     3165else
     3166  { $as_echo "$as_me:$LINENO: result: no" >&5
     3167$as_echo "no" >&6; }
     3168fi
     3169
     3170  if test "x$ac_ct_RANLIB" = x; then
     3171    RANLIB=":"
     3172  else
     3173    case $cross_compiling:$ac_tool_warned in
     3174yes:)
     3175{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     3176whose name does not start with the host triplet.  If you think this
     3177configuration is useful to you, please write to autoconf@gnu.org." >&5
     3178$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     3179whose name does not start with the host triplet.  If you think this
     3180configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     3181ac_tool_warned=yes ;;
     3182esac
     3183    RANLIB=$ac_ct_RANLIB
     3184  fi
     3185else
     3186  RANLIB="$ac_cv_prog_RANLIB"
     3187fi
     3188
     3189{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
     3190$as_echo_n "checking whether ln -s works... " >&6; }
     3191LN_S=$as_ln_s
     3192if test "$LN_S" = "ln -s"; then
     3193  { $as_echo "$as_me:$LINENO: result: yes" >&5
     3194$as_echo "yes" >&6; }
     3195else
     3196  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
     3197$as_echo "no, using $LN_S" >&6; }
     3198fi
     3199
     3200
    28373201
    28383202ac_ext=c
     
    28413205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    28423206ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2843 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
    2844 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
     3207{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
     3208$as_echo_n "checking how to run the C preprocessor... " >&6; }
    28453209# On Suns, sometimes $CPP names a directory.
    28463210if test -n "$CPP" && test -d "$CPP"; then
     
    28493213if test -z "$CPP"; then
    28503214  if test "${ac_cv_prog_CPP+set}" = set; then
    2851   echo $ECHO_N "(cached) $ECHO_C" >&6
     3215  $as_echo_n "(cached) " >&6
    28523216else
    28533217      # Double quotes because CPP needs to be expanded
     
    28813245  *) ac_try_echo=$ac_try;;
    28823246esac
    2883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3247eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3248$as_echo "$ac_try_echo") >&5
    28843249  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    28853250  ac_status=$?
     
    28873252  rm -f conftest.er1
    28883253  cat conftest.err >&5
    2889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3254  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    28903255  (exit $ac_status); } >/dev/null && {
    28913256         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     
    28943259  :
    28953260else
    2896   echo "$as_me: failed program was:" >&5
     3261  $as_echo "$as_me: failed program was:" >&5
    28973262sed 's/^/| /' conftest.$ac_ext >&5
    28983263
     
    29183283  *) ac_try_echo=$ac_try;;
    29193284esac
    2920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3286$as_echo "$ac_try_echo") >&5
    29213287  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    29223288  ac_status=$?
     
    29243290  rm -f conftest.er1
    29253291  cat conftest.err >&5
    2926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3292  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    29273293  (exit $ac_status); } >/dev/null && {
    29283294         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     
    29323298continue
    29333299else
    2934   echo "$as_me: failed program was:" >&5
     3300  $as_echo "$as_me: failed program was:" >&5
    29353301sed 's/^/| /' conftest.$ac_ext >&5
    29363302
     
    29573323  ac_cv_prog_CPP=$CPP
    29583324fi
    2959 { echo "$as_me:$LINENO: result: $CPP" >&5
    2960 echo "${ECHO_T}$CPP" >&6; }
     3325{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
     3326$as_echo "$CPP" >&6; }
    29613327ac_preproc_ok=false
    29623328for ac_c_preproc_warn_flag in '' yes
     
    29863352  *) ac_try_echo=$ac_try;;
    29873353esac
    2988 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3354eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3355$as_echo "$ac_try_echo") >&5
    29893356  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    29903357  ac_status=$?
     
    29923359  rm -f conftest.er1
    29933360  cat conftest.err >&5
    2994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3361  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    29953362  (exit $ac_status); } >/dev/null && {
    29963363         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     
    29993366  :
    30003367else
    3001   echo "$as_me: failed program was:" >&5
     3368  $as_echo "$as_me: failed program was:" >&5
    30023369sed 's/^/| /' conftest.$ac_ext >&5
    30033370
     
    30233390  *) ac_try_echo=$ac_try;;
    30243391esac
    3025 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3392eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3393$as_echo "$ac_try_echo") >&5
    30263394  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    30273395  ac_status=$?
     
    30293397  rm -f conftest.er1
    30303398  cat conftest.err >&5
    3031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3399  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    30323400  (exit $ac_status); } >/dev/null && {
    30333401         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     
    30373405continue
    30383406else
    3039   echo "$as_me: failed program was:" >&5
     3407  $as_echo "$as_me: failed program was:" >&5
    30403408sed 's/^/| /' conftest.$ac_ext >&5
    30413409
     
    30533421  :
    30543422else
    3055   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
     3423  { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
    30563424See \`config.log' for more details." >&5
    3057 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
     3425$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
    30583426See \`config.log' for more details." >&2;}
    30593427   { (exit 1); exit 1; }; }
     
    30673435
    30683436
    3069 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
    3070 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
     3437{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
     3438$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
    30713439if test "${ac_cv_path_GREP+set}" = set; then
    3072   echo $ECHO_N "(cached) $ECHO_C" >&6
    3073 else
    3074   # Extract the first word of "grep ggrep" to use in msg output
    3075 if test -z "$GREP"; then
    3076 set dummy grep ggrep; ac_prog_name=$2
    3077 if test "${ac_cv_path_GREP+set}" = set; then
    3078   echo $ECHO_N "(cached) $ECHO_C" >&6
    3079 else
     3440  $as_echo_n "(cached) " >&6
     3441else
     3442  if test -z "$GREP"; then
    30803443  ac_path_GREP_found=false
    3081 # Loop through the user's path and test for each of PROGNAME-LIST
    3082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3444  # Loop through the user's path and test for each of PROGNAME-LIST
     3445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    30833446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
    30843447do
     
    30863449  test -z "$as_dir" && as_dir=.
    30873450  for ac_prog in grep ggrep; do
    3088   for ac_exec_ext in '' $ac_executable_extensions; do
    3089     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    3090     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
    3091     # Check for GNU ac_path_GREP and select it if it is found.
     3451    for ac_exec_ext in '' $ac_executable_extensions; do
     3452      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
     3453      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
     3454# Check for GNU ac_path_GREP and select it if it is found.
    30923455  # Check for GNU $ac_path_GREP
    30933456case `"$ac_path_GREP" --version 2>&1` in
     
    30963459*)
    30973460  ac_count=0
    3098   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
     3461  $as_echo_n 0123456789 >"conftest.in"
    30993462  while :
    31003463  do
     
    31023465    mv "conftest.tmp" "conftest.in"
    31033466    cp "conftest.in" "conftest.nl"
    3104     echo 'GREP' >> "conftest.nl"
     3467    $as_echo 'GREP' >> "conftest.nl"
    31053468    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    31063469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    31173480esac
    31183481
    3119 
    3120     $ac_path_GREP_found && break 3
     3482      $ac_path_GREP_found && break 3
     3483    done
    31213484  done
    31223485done
    3123 
    3124 done
    31253486IFS=$as_save_IFS
    3126 
    3127 
    3128 fi
    3129 
    3130 GREP="$ac_cv_path_GREP"
    3131 if test -z "$GREP"; then
    3132   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
    3133 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
     3487  if test -z "$ac_cv_path_GREP"; then
     3488    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
     3489$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
    31343490   { (exit 1); exit 1; }; }
    3135 fi
    3136 
     3491  fi
    31373492else
    31383493  ac_cv_path_GREP=$GREP
    31393494fi
    31403495
    3141 
    3142 fi
    3143 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
    3144 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
     3496fi
     3497{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
     3498$as_echo "$ac_cv_path_GREP" >&6; }
    31453499 GREP="$ac_cv_path_GREP"
    31463500
    31473501
    3148 { echo "$as_me:$LINENO: checking for egrep" >&5
    3149 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
     3502{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
     3503$as_echo_n "checking for egrep... " >&6; }
    31503504if test "${ac_cv_path_EGREP+set}" = set; then
    3151   echo $ECHO_N "(cached) $ECHO_C" >&6
     3505  $as_echo_n "(cached) " >&6
    31523506else
    31533507  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    31543508   then ac_cv_path_EGREP="$GREP -E"
    31553509   else
    3156      # Extract the first word of "egrep" to use in msg output
    3157 if test -z "$EGREP"; then
    3158 set dummy egrep; ac_prog_name=$2
    3159 if test "${ac_cv_path_EGREP+set}" = set; then
    3160   echo $ECHO_N "(cached) $ECHO_C" >&6
    3161 else
     3510     if test -z "$EGREP"; then
    31623511  ac_path_EGREP_found=false
    3163 # Loop through the user's path and test for each of PROGNAME-LIST
    3164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3512  # Loop through the user's path and test for each of PROGNAME-LIST
     3513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    31653514for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
    31663515do
     
    31683517  test -z "$as_dir" && as_dir=.
    31693518  for ac_prog in egrep; do
    3170   for ac_exec_ext in '' $ac_executable_extensions; do
    3171     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
    3172     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
    3173     # Check for GNU ac_path_EGREP and select it if it is found.
     3519    for ac_exec_ext in '' $ac_executable_extensions; do
     3520      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
     3521      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
     3522# Check for GNU ac_path_EGREP and select it if it is found.
    31743523  # Check for GNU $ac_path_EGREP
    31753524case `"$ac_path_EGREP" --version 2>&1` in
     
    31783527*)
    31793528  ac_count=0
    3180   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
     3529  $as_echo_n 0123456789 >"conftest.in"
    31813530  while :
    31823531  do
     
    31843533    mv "conftest.tmp" "conftest.in"
    31853534    cp "conftest.in" "conftest.nl"
    3186     echo 'EGREP' >> "conftest.nl"
     3535    $as_echo 'EGREP' >> "conftest.nl"
    31873536    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    31883537    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    31993548esac
    32003549
    3201 
    3202     $ac_path_EGREP_found && break 3
     3550      $ac_path_EGREP_found && break 3
     3551    done
    32033552  done
    32043553done
    3205 
    3206 done
    32073554IFS=$as_save_IFS
    3208 
    3209 
    3210 fi
    3211 
    3212 EGREP="$ac_cv_path_EGREP"
    3213 if test -z "$EGREP"; then
    3214   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
    3215 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
     3555  if test -z "$ac_cv_path_EGREP"; then
     3556    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
     3557$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
    32163558   { (exit 1); exit 1; }; }
    3217 fi
    3218 
     3559  fi
    32193560else
    32203561  ac_cv_path_EGREP=$EGREP
    32213562fi
    32223563
    3223 
    32243564   fi
    32253565fi
    3226 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
    3227 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
     3566{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
     3567$as_echo "$ac_cv_path_EGREP" >&6; }
    32283568 EGREP="$ac_cv_path_EGREP"
    32293569
    32303570
    3231 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
    3232 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
     3571{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
     3572$as_echo_n "checking for ANSI C header files... " >&6; }
    32333573if test "${ac_cv_header_stdc+set}" = set; then
    3234   echo $ECHO_N "(cached) $ECHO_C" >&6
     3574  $as_echo_n "(cached) " >&6
    32353575else
    32363576  cat >conftest.$ac_ext <<_ACEOF
     
    32593599  *) ac_try_echo=$ac_try;;
    32603600esac
    3261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3601eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3602$as_echo "$ac_try_echo") >&5
    32623603  (eval "$ac_compile") 2>conftest.er1
    32633604  ac_status=$?
     
    32653606  rm -f conftest.er1
    32663607  cat conftest.err >&5
    3267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3608  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    32683609  (exit $ac_status); } && {
    32693610         test -z "$ac_c_werror_flag" ||
     
    32723613  ac_cv_header_stdc=yes
    32733614else
    3274   echo "$as_me: failed program was:" >&5
     3615  $as_echo "$as_me: failed program was:" >&5
    32753616sed 's/^/| /' conftest.$ac_ext >&5
    32763617
     
    33643705  *) ac_try_echo=$ac_try;;
    33653706esac
    3366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3707eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3708$as_echo "$ac_try_echo") >&5
    33673709  (eval "$ac_link") 2>&5
    33683710  ac_status=$?
    3369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3711  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    33703712  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    33713713  { (case "(($ac_try" in
     
    33733715  *) ac_try_echo=$ac_try;;
    33743716esac
    3375 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3718$as_echo "$ac_try_echo") >&5
    33763719  (eval "$ac_try") 2>&5
    33773720  ac_status=$?
    3378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3721  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    33793722  (exit $ac_status); }; }; then
    33803723  :
    33813724else
    3382   echo "$as_me: program exited with status $ac_status" >&5
    3383 echo "$as_me: failed program was:" >&5
     3725  $as_echo "$as_me: program exited with status $ac_status" >&5
     3726$as_echo "$as_me: failed program was:" >&5
    33843727sed 's/^/| /' conftest.$ac_ext >&5
    33853728
     
    33873730ac_cv_header_stdc=no
    33883731fi
     3732rm -rf conftest.dSYM
    33893733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    33903734fi
     
    33933737fi
    33943738fi
    3395 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
    3396 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
     3739{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
     3740$as_echo "$ac_cv_header_stdc" >&6; }
    33973741if test $ac_cv_header_stdc = yes; then
    33983742
     
    34033747fi
    34043748
    3405 { echo "$as_me:$LINENO: checking for atol" >&5
    3406 echo $ECHO_N "checking for atol... $ECHO_C" >&6; }
     3749{ $as_echo "$as_me:$LINENO: checking for atol" >&5
     3750$as_echo_n "checking for atol... " >&6; }
    34073751if test "${ac_cv_func_atol+set}" = set; then
    3408   echo $ECHO_N "(cached) $ECHO_C" >&6
     3752  $as_echo_n "(cached) " >&6
    34093753else
    34103754  cat >conftest.$ac_ext <<_ACEOF
     
    34593803  *) ac_try_echo=$ac_try;;
    34603804esac
    3461 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3806$as_echo "$ac_try_echo") >&5
    34623807  (eval "$ac_link") 2>conftest.er1
    34633808  ac_status=$?
     
    34653810  rm -f conftest.er1
    34663811  cat conftest.err >&5
    3467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3812  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    34683813  (exit $ac_status); } && {
    34693814         test -z "$ac_c_werror_flag" ||
    34703815         test ! -s conftest.err
    3471        } && test -s conftest$ac_exeext &&
    3472        $as_test_x conftest$ac_exeext; then
     3816       } && test -s conftest$ac_exeext && {
     3817         test "$cross_compiling" = yes ||
     3818         $as_test_x conftest$ac_exeext
     3819       }; then
    34733820  ac_cv_func_atol=yes
    34743821else
    3475   echo "$as_me: failed program was:" >&5
     3822  $as_echo "$as_me: failed program was:" >&5
    34763823sed 's/^/| /' conftest.$ac_ext >&5
    34773824
     
    34793826fi
    34803827
     3828rm -rf conftest.dSYM
    34813829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    34823830      conftest$ac_exeext conftest.$ac_ext
    34833831fi
    3484 { echo "$as_me:$LINENO: result: $ac_cv_func_atol" >&5
    3485 echo "${ECHO_T}$ac_cv_func_atol" >&6; }
     3832{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_atol" >&5
     3833$as_echo "$ac_cv_func_atol" >&6; }
    34863834if test $ac_cv_func_atol = yes; then
    34873835  :
    34883836else
    3489   { { echo "$as_me:$LINENO: error: oops! no atol ?!?" >&5
    3490 echo "$as_me: error: oops! no atol ?!?" >&2;}
     3837  { { $as_echo "$as_me:$LINENO: error: oops! no atol ?!?" >&5
     3838$as_echo "$as_me: error: oops! no atol ?!?" >&2;}
    34913839   { (exit 1); exit 1; }; }
    34923840fi
     
    35073855    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    35083856set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    3509 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    3510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     3857{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3858$as_echo_n "checking for $ac_word... " >&6; }
    35113859if test "${ac_cv_prog_CXX+set}" = set; then
    3512   echo $ECHO_N "(cached) $ECHO_C" >&6
     3860  $as_echo_n "(cached) " >&6
    35133861else
    35143862  if test -n "$CXX"; then
     
    35233871  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    35243872    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    3525     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3873    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    35263874    break 2
    35273875  fi
     
    35343882CXX=$ac_cv_prog_CXX
    35353883if test -n "$CXX"; then
    3536   { echo "$as_me:$LINENO: result: $CXX" >&5
    3537 echo "${ECHO_T}$CXX" >&6; }
    3538 else
    3539   { echo "$as_me:$LINENO: result: no" >&5
    3540 echo "${ECHO_T}no" >&6; }
     3884  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
     3885$as_echo "$CXX" >&6; }
     3886else
     3887  { $as_echo "$as_me:$LINENO: result: no" >&5
     3888$as_echo "no" >&6; }
    35413889fi
    35423890
     
    35513899  # Extract the first word of "$ac_prog", so it can be a program name with args.
    35523900set dummy $ac_prog; ac_word=$2
    3553 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    3554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     3901{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     3902$as_echo_n "checking for $ac_word... " >&6; }
    35553903if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
    3556   echo $ECHO_N "(cached) $ECHO_C" >&6
     3904  $as_echo_n "(cached) " >&6
    35573905else
    35583906  if test -n "$ac_ct_CXX"; then
     
    35673915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    35683916    ac_cv_prog_ac_ct_CXX="$ac_prog"
    3569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     3917    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    35703918    break 2
    35713919  fi
     
    35783926ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
    35793927if test -n "$ac_ct_CXX"; then
    3580   { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
    3581 echo "${ECHO_T}$ac_ct_CXX" >&6; }
    3582 else
    3583   { echo "$as_me:$LINENO: result: no" >&5
    3584 echo "${ECHO_T}no" >&6; }
     3928  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
     3929$as_echo "$ac_ct_CXX" >&6; }
     3930else
     3931  { $as_echo "$as_me:$LINENO: result: no" >&5
     3932$as_echo "no" >&6; }
    35853933fi
    35863934
     
    35943942    case $cross_compiling:$ac_tool_warned in
    35953943yes:)
    3596 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     3944{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
    35973945whose name does not start with the host triplet.  If you think this
    35983946configuration is useful to you, please write to autoconf@gnu.org." >&5
    3599 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     3947$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
    36003948whose name does not start with the host triplet.  If you think this
    36013949configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     
    36093957fi
    36103958# Provide some information about the compiler.
    3611 echo "$as_me:$LINENO: checking for C++ compiler version" >&5
    3612 ac_compiler=`set X $ac_compile; echo $2`
     3959$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
     3960set X $ac_compile
     3961ac_compiler=$2
    36133962{ (ac_try="$ac_compiler --version >&5"
    36143963case "(($ac_try" in
     
    36163965  *) ac_try_echo=$ac_try;;
    36173966esac
    3618 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3967eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3968$as_echo "$ac_try_echo") >&5
    36193969  (eval "$ac_compiler --version >&5") 2>&5
    36203970  ac_status=$?
    3621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3971  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    36223972  (exit $ac_status); }
    36233973{ (ac_try="$ac_compiler -v >&5"
     
    36263976  *) ac_try_echo=$ac_try;;
    36273977esac
    3628 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3978eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3979$as_echo "$ac_try_echo") >&5
    36293980  (eval "$ac_compiler -v >&5") 2>&5
    36303981  ac_status=$?
    3631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3982  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    36323983  (exit $ac_status); }
    36333984{ (ac_try="$ac_compiler -V >&5"
     
    36363987  *) ac_try_echo=$ac_try;;
    36373988esac
    3638 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     3990$as_echo "$ac_try_echo") >&5
    36393991  (eval "$ac_compiler -V >&5") 2>&5
    36403992  ac_status=$?
    3641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3993  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    36423994  (exit $ac_status); }
    36433995
    3644 { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
    3645 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
     3996{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
     3997$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
    36463998if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
    3647   echo $ECHO_N "(cached) $ECHO_C" >&6
     3999  $as_echo_n "(cached) " >&6
    36484000else
    36494001  cat >conftest.$ac_ext <<_ACEOF
     
    36714023  *) ac_try_echo=$ac_try;;
    36724024esac
    3673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4026$as_echo "$ac_try_echo") >&5
    36744027  (eval "$ac_compile") 2>conftest.er1
    36754028  ac_status=$?
     
    36774030  rm -f conftest.er1
    36784031  cat conftest.err >&5
    3679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4032  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    36804033  (exit $ac_status); } && {
    36814034         test -z "$ac_cxx_werror_flag" ||
     
    36844037  ac_compiler_gnu=yes
    36854038else
    3686   echo "$as_me: failed program was:" >&5
     4039  $as_echo "$as_me: failed program was:" >&5
    36874040sed 's/^/| /' conftest.$ac_ext >&5
    36884041
     
    36944047
    36954048fi
    3696 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
    3697 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
    3698 GXX=`test $ac_compiler_gnu = yes && echo yes`
     4049{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
     4050$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
     4051if test $ac_compiler_gnu = yes; then
     4052  GXX=yes
     4053else
     4054  GXX=
     4055fi
    36994056ac_test_CXXFLAGS=${CXXFLAGS+set}
    37004057ac_save_CXXFLAGS=$CXXFLAGS
    3701 { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
    3702 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
     4058{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
     4059$as_echo_n "checking whether $CXX accepts -g... " >&6; }
    37034060if test "${ac_cv_prog_cxx_g+set}" = set; then
    3704   echo $ECHO_N "(cached) $ECHO_C" >&6
     4061  $as_echo_n "(cached) " >&6
    37054062else
    37064063  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
     
    37294086  *) ac_try_echo=$ac_try;;
    37304087esac
    3731 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4088eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4089$as_echo "$ac_try_echo") >&5
    37324090  (eval "$ac_compile") 2>conftest.er1
    37334091  ac_status=$?
     
    37354093  rm -f conftest.er1
    37364094  cat conftest.err >&5
    3737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4095  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    37384096  (exit $ac_status); } && {
    37394097         test -z "$ac_cxx_werror_flag" ||
     
    37424100  ac_cv_prog_cxx_g=yes
    37434101else
    3744   echo "$as_me: failed program was:" >&5
     4102  $as_echo "$as_me: failed program was:" >&5
    37454103sed 's/^/| /' conftest.$ac_ext >&5
    37464104
     
    37674125  *) ac_try_echo=$ac_try;;
    37684126esac
    3769 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4128$as_echo "$ac_try_echo") >&5
    37704129  (eval "$ac_compile") 2>conftest.er1
    37714130  ac_status=$?
     
    37734132  rm -f conftest.er1
    37744133  cat conftest.err >&5
    3775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4134  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    37764135  (exit $ac_status); } && {
    37774136         test -z "$ac_cxx_werror_flag" ||
     
    37804139  :
    37814140else
    3782   echo "$as_me: failed program was:" >&5
     4141  $as_echo "$as_me: failed program was:" >&5
    37834142sed 's/^/| /' conftest.$ac_ext >&5
    37844143
     
    38064165  *) ac_try_echo=$ac_try;;
    38074166esac
    3808 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4167eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4168$as_echo "$ac_try_echo") >&5
    38094169  (eval "$ac_compile") 2>conftest.er1
    38104170  ac_status=$?
     
    38124172  rm -f conftest.er1
    38134173  cat conftest.err >&5
    3814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4174  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    38154175  (exit $ac_status); } && {
    38164176         test -z "$ac_cxx_werror_flag" ||
     
    38194179  ac_cv_prog_cxx_g=yes
    38204180else
    3821   echo "$as_me: failed program was:" >&5
     4181  $as_echo "$as_me: failed program was:" >&5
    38224182sed 's/^/| /' conftest.$ac_ext >&5
    38234183
     
    38344194   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
    38354195fi
    3836 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
    3837 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
     4196{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
     4197$as_echo "$ac_cv_prog_cxx_g" >&6; }
    38384198if test "$ac_test_CXXFLAGS" = set; then
    38394199  CXXFLAGS=$ac_save_CXXFLAGS
     
    38664226
    38674227
    3868 { echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
    3869 echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6; }
     4228{ $as_echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
     4229$as_echo_n "checking for main in -lstdc++... " >&6; }
    38704230if test "${ac_cv_lib_stdcpp_main+set}" = set; then
    3871   echo $ECHO_N "(cached) $ECHO_C" >&6
     4231  $as_echo_n "(cached) " >&6
    38724232else
    38734233  ac_check_lib_save_LIBS=$LIBS
     
    38954255  *) ac_try_echo=$ac_try;;
    38964256esac
    3897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4257eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4258$as_echo "$ac_try_echo") >&5
    38984259  (eval "$ac_link") 2>conftest.er1
    38994260  ac_status=$?
     
    39014262  rm -f conftest.er1
    39024263  cat conftest.err >&5
    3903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4264  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    39044265  (exit $ac_status); } && {
    39054266         test -z "$ac_cxx_werror_flag" ||
    39064267         test ! -s conftest.err
    3907        } && test -s conftest$ac_exeext &&
    3908        $as_test_x conftest$ac_exeext; then
     4268       } && test -s conftest$ac_exeext && {
     4269         test "$cross_compiling" = yes ||
     4270         $as_test_x conftest$ac_exeext
     4271       }; then
    39094272  ac_cv_lib_stdcpp_main=yes
    39104273else
    3911   echo "$as_me: failed program was:" >&5
     4274  $as_echo "$as_me: failed program was:" >&5
    39124275sed 's/^/| /' conftest.$ac_ext >&5
    39134276
     
    39154278fi
    39164279
     4280rm -rf conftest.dSYM
    39174281rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    39184282      conftest$ac_exeext conftest.$ac_ext
    39194283LIBS=$ac_check_lib_save_LIBS
    39204284fi
    3921 { echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5
    3922 echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >&6; }
     4285{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5
     4286$as_echo "$ac_cv_lib_stdcpp_main" >&6; }
    39234287if test $ac_cv_lib_stdcpp_main = yes; then
    39244288  cat >>confdefs.h <<_ACEOF
     
    39294293
    39304294else
    3931   { { echo "$as_me:$LINENO: error: librappture requires libstdc++" >&5
    3932 echo "$as_me: error: librappture requires libstdc++" >&2;}
     4295  { { $as_echo "$as_me:$LINENO: error: librappture requires libstdc++" >&5
     4296$as_echo "$as_me: error: librappture requires libstdc++" >&2;}
    39334297   { (exit 1); exit 1; }; }
    39344298fi
     
    39474311                  inttypes.h stdint.h unistd.h
    39484312do
    3949 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    3950 { echo "$as_me:$LINENO: checking for $ac_header" >&5
    3951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4313as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     4314{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4315$as_echo_n "checking for $ac_header... " >&6; }
    39524316if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    3953   echo $ECHO_N "(cached) $ECHO_C" >&6
     4317  $as_echo_n "(cached) " >&6
    39544318else
    39554319  cat >conftest.$ac_ext <<_ACEOF
     
    39694333  *) ac_try_echo=$ac_try;;
    39704334esac
    3971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4335eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4336$as_echo "$ac_try_echo") >&5
    39724337  (eval "$ac_compile") 2>conftest.er1
    39734338  ac_status=$?
     
    39754340  rm -f conftest.er1
    39764341  cat conftest.err >&5
    3977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4342  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    39784343  (exit $ac_status); } && {
    39794344         test -z "$ac_cxx_werror_flag" ||
     
    39824347  eval "$as_ac_Header=yes"
    39834348else
    3984   echo "$as_me: failed program was:" >&5
     4349  $as_echo "$as_me: failed program was:" >&5
    39854350sed 's/^/| /' conftest.$ac_ext >&5
    39864351
     
    39904355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    39914356fi
    3992 ac_res=`eval echo '${'$as_ac_Header'}'`
    3993                { echo "$as_me:$LINENO: result: $ac_res" >&5
    3994 echo "${ECHO_T}$ac_res" >&6; }
    3995 if test `eval echo '${'$as_ac_Header'}'` = yes; then
     4357ac_res=`eval 'as_val=${'$as_ac_Header'}
     4358                 $as_echo "$as_val"'`
     4359               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4360$as_echo "$ac_res" >&6; }
     4361if test `eval 'as_val=${'$as_ac_Header'}
     4362                 $as_echo "$as_val"'` = yes; then
    39964363  cat >>confdefs.h <<_ACEOF
    3997 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     4364#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    39984365_ACEOF
    39994366
     
    40084375ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    40094376ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    4010 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
    4011 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
     4377{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
     4378$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
    40124379if test -z "$CXXCPP"; then
    40134380  if test "${ac_cv_prog_CXXCPP+set}" = set; then
    4014   echo $ECHO_N "(cached) $ECHO_C" >&6
     4381  $as_echo_n "(cached) " >&6
    40154382else
    40164383      # Double quotes because CXXCPP needs to be expanded
     
    40444411  *) ac_try_echo=$ac_try;;
    40454412esac
    4046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4414$as_echo "$ac_try_echo") >&5
    40474415  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    40484416  ac_status=$?
     
    40504418  rm -f conftest.er1
    40514419  cat conftest.err >&5
    4052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4420  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    40534421  (exit $ac_status); } >/dev/null && {
    40544422         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    40574425  :
    40584426else
    4059   echo "$as_me: failed program was:" >&5
     4427  $as_echo "$as_me: failed program was:" >&5
    40604428sed 's/^/| /' conftest.$ac_ext >&5
    40614429
     
    40814449  *) ac_try_echo=$ac_try;;
    40824450esac
    4083 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4452$as_echo "$ac_try_echo") >&5
    40844453  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    40854454  ac_status=$?
     
    40874456  rm -f conftest.er1
    40884457  cat conftest.err >&5
    4089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4458  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    40904459  (exit $ac_status); } >/dev/null && {
    40914460         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    40954464continue
    40964465else
    4097   echo "$as_me: failed program was:" >&5
     4466  $as_echo "$as_me: failed program was:" >&5
    40984467sed 's/^/| /' conftest.$ac_ext >&5
    40994468
     
    41204489  ac_cv_prog_CXXCPP=$CXXCPP
    41214490fi
    4122 { echo "$as_me:$LINENO: result: $CXXCPP" >&5
    4123 echo "${ECHO_T}$CXXCPP" >&6; }
     4491{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
     4492$as_echo "$CXXCPP" >&6; }
    41244493ac_preproc_ok=false
    41254494for ac_cxx_preproc_warn_flag in '' yes
     
    41494518  *) ac_try_echo=$ac_try;;
    41504519esac
    4151 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4520eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4521$as_echo "$ac_try_echo") >&5
    41524522  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    41534523  ac_status=$?
     
    41554525  rm -f conftest.er1
    41564526  cat conftest.err >&5
    4157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4527  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    41584528  (exit $ac_status); } >/dev/null && {
    41594529         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    41624532  :
    41634533else
    4164   echo "$as_me: failed program was:" >&5
     4534  $as_echo "$as_me: failed program was:" >&5
    41654535sed 's/^/| /' conftest.$ac_ext >&5
    41664536
     
    41864556  *) ac_try_echo=$ac_try;;
    41874557esac
    4188 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4558eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4559$as_echo "$ac_try_echo") >&5
    41894560  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    41904561  ac_status=$?
     
    41924563  rm -f conftest.er1
    41934564  cat conftest.err >&5
    4194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4565  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    41954566  (exit $ac_status); } >/dev/null && {
    41964567         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    42004571continue
    42014572else
    4202   echo "$as_me: failed program was:" >&5
     4573  $as_echo "$as_me: failed program was:" >&5
    42034574sed 's/^/| /' conftest.$ac_ext >&5
    42044575
     
    42164587  :
    42174588else
    4218   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
     4589  { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
    42194590See \`config.log' for more details." >&5
    4220 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
     4591$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
    42214592See \`config.log' for more details." >&2;}
    42224593   { (exit 1); exit 1; }; }
     
    42334604for ac_header in stack
    42344605do
    4235 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     4606as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    42364607if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4237   { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4608  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4609$as_echo_n "checking for $ac_header... " >&6; }
    42394610if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4240   echo $ECHO_N "(cached) $ECHO_C" >&6
    4241 fi
    4242 ac_res=`eval echo '${'$as_ac_Header'}'`
    4243                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4244 echo "${ECHO_T}$ac_res" >&6; }
     4611  $as_echo_n "(cached) " >&6
     4612fi
     4613ac_res=`eval 'as_val=${'$as_ac_Header'}
     4614                 $as_echo "$as_val"'`
     4615               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4616$as_echo "$ac_res" >&6; }
    42454617else
    42464618  # Is the header compilable?
    4247 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
    4248 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
     4619{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4620$as_echo_n "checking $ac_header usability... " >&6; }
    42494621cat >conftest.$ac_ext <<_ACEOF
    42504622/* confdefs.h.  */
     
    42624634  *) ac_try_echo=$ac_try;;
    42634635esac
    4264 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4637$as_echo "$ac_try_echo") >&5
    42654638  (eval "$ac_compile") 2>conftest.er1
    42664639  ac_status=$?
     
    42684641  rm -f conftest.er1
    42694642  cat conftest.err >&5
    4270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4643  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    42714644  (exit $ac_status); } && {
    42724645         test -z "$ac_cxx_werror_flag" ||
     
    42754648  ac_header_compiler=yes
    42764649else
    4277   echo "$as_me: failed program was:" >&5
     4650  $as_echo "$as_me: failed program was:" >&5
    42784651sed 's/^/| /' conftest.$ac_ext >&5
    42794652
     
    42824655
    42834656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    4284 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    4285 echo "${ECHO_T}$ac_header_compiler" >&6; }
     4657{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4658$as_echo "$ac_header_compiler" >&6; }
    42864659
    42874660# Is the header present?
    4288 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
    4289 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
     4661{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4662$as_echo_n "checking $ac_header presence... " >&6; }
    42904663cat >conftest.$ac_ext <<_ACEOF
    42914664/* confdefs.h.  */
     
    43014674  *) ac_try_echo=$ac_try;;
    43024675esac
    4303 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4676eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4677$as_echo "$ac_try_echo") >&5
    43044678  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    43054679  ac_status=$?
     
    43074681  rm -f conftest.er1
    43084682  cat conftest.err >&5
    4309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4683  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    43104684  (exit $ac_status); } >/dev/null && {
    43114685         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    43144688  ac_header_preproc=yes
    43154689else
    4316   echo "$as_me: failed program was:" >&5
     4690  $as_echo "$as_me: failed program was:" >&5
    43174691sed 's/^/| /' conftest.$ac_ext >&5
    43184692
     
    43214695
    43224696rm -f conftest.err conftest.$ac_ext
    4323 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    4324 echo "${ECHO_T}$ac_header_preproc" >&6; }
     4697{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4698$as_echo "$ac_header_preproc" >&6; }
    43254699
    43264700# So?  What about this header?
    43274701case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
    43284702  yes:no: )
    4329     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    4330 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    4331     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    4332 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     4703    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     4704$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     4705    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     4706$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    43334707    ac_header_preproc=yes
    43344708    ;;
    43354709  no:yes:* )
    4336     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    4337 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    4338     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    4339 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    4340     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    4341 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    4342     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    4343 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    4344     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    4345 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    4346     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    4347 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     4710    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     4711$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     4712    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     4713$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     4714    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     4715$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     4716    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     4717$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     4718    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     4719$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     4720    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     4721$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    43484722    ( cat <<\_ASBOX
    43494723## ----------------------------------- ##
     
    43544728    ;;
    43554729esac
    4356 { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4357 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4730{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4731$as_echo_n "checking for $ac_header... " >&6; }
    43584732if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4359   echo $ECHO_N "(cached) $ECHO_C" >&6
     4733  $as_echo_n "(cached) " >&6
    43604734else
    43614735  eval "$as_ac_Header=\$ac_header_preproc"
    43624736fi
    4363 ac_res=`eval echo '${'$as_ac_Header'}'`
    4364                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4365 echo "${ECHO_T}$ac_res" >&6; }
    4366 
    4367 fi
    4368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
     4737ac_res=`eval 'as_val=${'$as_ac_Header'}
     4738                 $as_echo "$as_val"'`
     4739               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4740$as_echo "$ac_res" >&6; }
     4741
     4742fi
     4743if test `eval 'as_val=${'$as_ac_Header'}
     4744                 $as_echo "$as_val"'` = yes; then
    43694745  cat >>confdefs.h <<_ACEOF
    4370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    4371 _ACEOF
    4372 
    4373 else
    4374   { echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
    4375 echo "$as_me: WARNING: STL classes missing ?" >&2;}
     4746#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     4747_ACEOF
     4748
     4749else
     4750  { $as_echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
     4751$as_echo "$as_me: WARNING: STL classes missing ?" >&2;}
    43764752fi
    43774753
     
    43814757for ac_header in string
    43824758do
    4383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     4759as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    43844760if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4385   { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4761  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4762$as_echo_n "checking for $ac_header... " >&6; }
    43874763if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4388   echo $ECHO_N "(cached) $ECHO_C" >&6
    4389 fi
    4390 ac_res=`eval echo '${'$as_ac_Header'}'`
    4391                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4392 echo "${ECHO_T}$ac_res" >&6; }
     4764  $as_echo_n "(cached) " >&6
     4765fi
     4766ac_res=`eval 'as_val=${'$as_ac_Header'}
     4767                 $as_echo "$as_val"'`
     4768               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4769$as_echo "$ac_res" >&6; }
    43934770else
    43944771  # Is the header compilable?
    4395 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
    4396 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
     4772{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4773$as_echo_n "checking $ac_header usability... " >&6; }
    43974774cat >conftest.$ac_ext <<_ACEOF
    43984775/* confdefs.h.  */
     
    44104787  *) ac_try_echo=$ac_try;;
    44114788esac
    4412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4789eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4790$as_echo "$ac_try_echo") >&5
    44134791  (eval "$ac_compile") 2>conftest.er1
    44144792  ac_status=$?
     
    44164794  rm -f conftest.er1
    44174795  cat conftest.err >&5
    4418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4796  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    44194797  (exit $ac_status); } && {
    44204798         test -z "$ac_cxx_werror_flag" ||
     
    44234801  ac_header_compiler=yes
    44244802else
    4425   echo "$as_me: failed program was:" >&5
     4803  $as_echo "$as_me: failed program was:" >&5
    44264804sed 's/^/| /' conftest.$ac_ext >&5
    44274805
     
    44304808
    44314809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    4432 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    4433 echo "${ECHO_T}$ac_header_compiler" >&6; }
     4810{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4811$as_echo "$ac_header_compiler" >&6; }
    44344812
    44354813# Is the header present?
    4436 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
    4437 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
     4814{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4815$as_echo_n "checking $ac_header presence... " >&6; }
    44384816cat >conftest.$ac_ext <<_ACEOF
    44394817/* confdefs.h.  */
     
    44494827  *) ac_try_echo=$ac_try;;
    44504828esac
    4451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4830$as_echo "$ac_try_echo") >&5
    44524831  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    44534832  ac_status=$?
     
    44554834  rm -f conftest.er1
    44564835  cat conftest.err >&5
    4457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4836  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    44584837  (exit $ac_status); } >/dev/null && {
    44594838         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    44624841  ac_header_preproc=yes
    44634842else
    4464   echo "$as_me: failed program was:" >&5
     4843  $as_echo "$as_me: failed program was:" >&5
    44654844sed 's/^/| /' conftest.$ac_ext >&5
    44664845
     
    44694848
    44704849rm -f conftest.err conftest.$ac_ext
    4471 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    4472 echo "${ECHO_T}$ac_header_preproc" >&6; }
     4850{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4851$as_echo "$ac_header_preproc" >&6; }
    44734852
    44744853# So?  What about this header?
    44754854case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
    44764855  yes:no: )
    4477     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    4478 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    4479     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    4480 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     4856    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     4857$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     4858    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     4859$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    44814860    ac_header_preproc=yes
    44824861    ;;
    44834862  no:yes:* )
    4484     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    4485 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    4486     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    4487 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    4488     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    4489 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    4490     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    4491 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    4492     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    4493 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    4494     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    4495 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     4863    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     4864$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     4865    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     4866$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     4867    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     4868$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     4869    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     4870$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     4871    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     4872$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     4873    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     4874$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    44964875    ( cat <<\_ASBOX
    44974876## ----------------------------------- ##
     
    45024881    ;;
    45034882esac
    4504 { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4883{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4884$as_echo_n "checking for $ac_header... " >&6; }
    45064885if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4507   echo $ECHO_N "(cached) $ECHO_C" >&6
     4886  $as_echo_n "(cached) " >&6
    45084887else
    45094888  eval "$as_ac_Header=\$ac_header_preproc"
    45104889fi
    4511 ac_res=`eval echo '${'$as_ac_Header'}'`
    4512                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4513 echo "${ECHO_T}$ac_res" >&6; }
    4514 
    4515 fi
    4516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
     4890ac_res=`eval 'as_val=${'$as_ac_Header'}
     4891                 $as_echo "$as_val"'`
     4892               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4893$as_echo "$ac_res" >&6; }
     4894
     4895fi
     4896if test `eval 'as_val=${'$as_ac_Header'}
     4897                 $as_echo "$as_val"'` = yes; then
    45174898  cat >>confdefs.h <<_ACEOF
    4518 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    4519 _ACEOF
    4520 
    4521 else
    4522   { echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
    4523 echo "$as_me: WARNING: STL classes missing ?" >&2;}
     4899#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     4900_ACEOF
     4901
     4902else
     4903  { $as_echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
     4904$as_echo "$as_me: WARNING: STL classes missing ?" >&2;}
    45244905fi
    45254906
     
    45294910for ac_header in list
    45304911do
    4531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     4912as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    45324913if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4533   { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4534 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     4914  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     4915$as_echo_n "checking for $ac_header... " >&6; }
    45354916if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4536   echo $ECHO_N "(cached) $ECHO_C" >&6
    4537 fi
    4538 ac_res=`eval echo '${'$as_ac_Header'}'`
    4539                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4540 echo "${ECHO_T}$ac_res" >&6; }
     4917  $as_echo_n "(cached) " >&6
     4918fi
     4919ac_res=`eval 'as_val=${'$as_ac_Header'}
     4920                 $as_echo "$as_val"'`
     4921               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     4922$as_echo "$ac_res" >&6; }
    45414923else
    45424924  # Is the header compilable?
    4543 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
    4544 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
     4925{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4926$as_echo_n "checking $ac_header usability... " >&6; }
    45454927cat >conftest.$ac_ext <<_ACEOF
    45464928/* confdefs.h.  */
     
    45584940  *) ac_try_echo=$ac_try;;
    45594941esac
    4560 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4942eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4943$as_echo "$ac_try_echo") >&5
    45614944  (eval "$ac_compile") 2>conftest.er1
    45624945  ac_status=$?
     
    45644947  rm -f conftest.er1
    45654948  cat conftest.err >&5
    4566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4949  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    45674950  (exit $ac_status); } && {
    45684951         test -z "$ac_cxx_werror_flag" ||
     
    45714954  ac_header_compiler=yes
    45724955else
    4573   echo "$as_me: failed program was:" >&5
     4956  $as_echo "$as_me: failed program was:" >&5
    45744957sed 's/^/| /' conftest.$ac_ext >&5
    45754958
     
    45784961
    45794962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    4580 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    4581 echo "${ECHO_T}$ac_header_compiler" >&6; }
     4963{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4964$as_echo "$ac_header_compiler" >&6; }
    45824965
    45834966# Is the header present?
    4584 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
    4585 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
     4967{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
     4968$as_echo_n "checking $ac_header presence... " >&6; }
    45864969cat >conftest.$ac_ext <<_ACEOF
    45874970/* confdefs.h.  */
     
    45974980  *) ac_try_echo=$ac_try;;
    45984981esac
    4599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4983$as_echo "$ac_try_echo") >&5
    46004984  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    46014985  ac_status=$?
     
    46034987  rm -f conftest.er1
    46044988  cat conftest.err >&5
    4605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4989  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    46064990  (exit $ac_status); } >/dev/null && {
    46074991         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    46104994  ac_header_preproc=yes
    46114995else
    4612   echo "$as_me: failed program was:" >&5
     4996  $as_echo "$as_me: failed program was:" >&5
    46134997sed 's/^/| /' conftest.$ac_ext >&5
    46144998
     
    46175001
    46185002rm -f conftest.err conftest.$ac_ext
    4619 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    4620 echo "${ECHO_T}$ac_header_preproc" >&6; }
     5003{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5004$as_echo "$ac_header_preproc" >&6; }
    46215005
    46225006# So?  What about this header?
    46235007case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
    46245008  yes:no: )
    4625     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    4626 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    4627     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    4628 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5009    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5010$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5011    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5012$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    46295013    ac_header_preproc=yes
    46305014    ;;
    46315015  no:yes:* )
    4632     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    4633 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    4634     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    4635 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    4636     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    4637 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    4638     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    4639 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    4640     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    4641 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    4642     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    4643 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5016    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5017$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5018    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5019$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5020    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5021$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5022    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5023$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5024    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5025$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5026    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5027$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    46445028    ( cat <<\_ASBOX
    46455029## ----------------------------------- ##
     
    46505034    ;;
    46515035esac
    4652 { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4653 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     5036{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     5037$as_echo_n "checking for $ac_header... " >&6; }
    46545038if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4655   echo $ECHO_N "(cached) $ECHO_C" >&6
     5039  $as_echo_n "(cached) " >&6
    46565040else
    46575041  eval "$as_ac_Header=\$ac_header_preproc"
    46585042fi
    4659 ac_res=`eval echo '${'$as_ac_Header'}'`
    4660                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4661 echo "${ECHO_T}$ac_res" >&6; }
    4662 
    4663 fi
    4664 if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5043ac_res=`eval 'as_val=${'$as_ac_Header'}
     5044                 $as_echo "$as_val"'`
     5045               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     5046$as_echo "$ac_res" >&6; }
     5047
     5048fi
     5049if test `eval 'as_val=${'$as_ac_Header'}
     5050                 $as_echo "$as_val"'` = yes; then
    46655051  cat >>confdefs.h <<_ACEOF
    4666 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    4667 _ACEOF
    4668 
    4669 else
    4670   { echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
    4671 echo "$as_me: WARNING: STL classes missing ?" >&2;}
     5052#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5053_ACEOF
     5054
     5055else
     5056  { $as_echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
     5057$as_echo "$as_me: WARNING: STL classes missing ?" >&2;}
    46725058fi
    46735059
     
    46775063for ac_header in vector
    46785064do
    4679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5065as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    46805066if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4681   { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4682 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     5067  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     5068$as_echo_n "checking for $ac_header... " >&6; }
    46835069if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4684   echo $ECHO_N "(cached) $ECHO_C" >&6
    4685 fi
    4686 ac_res=`eval echo '${'$as_ac_Header'}'`
    4687                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4688 echo "${ECHO_T}$ac_res" >&6; }
     5070  $as_echo_n "(cached) " >&6
     5071fi
     5072ac_res=`eval 'as_val=${'$as_ac_Header'}
     5073                 $as_echo "$as_val"'`
     5074               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     5075$as_echo "$ac_res" >&6; }
    46895076else
    46905077  # Is the header compilable?
    4691 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
    4692 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
     5078{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5079$as_echo_n "checking $ac_header usability... " >&6; }
    46935080cat >conftest.$ac_ext <<_ACEOF
    46945081/* confdefs.h.  */
     
    47065093  *) ac_try_echo=$ac_try;;
    47075094esac
    4708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5095eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5096$as_echo "$ac_try_echo") >&5
    47095097  (eval "$ac_compile") 2>conftest.er1
    47105098  ac_status=$?
     
    47125100  rm -f conftest.er1
    47135101  cat conftest.err >&5
    4714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5102  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    47155103  (exit $ac_status); } && {
    47165104         test -z "$ac_cxx_werror_flag" ||
     
    47195107  ac_header_compiler=yes
    47205108else
    4721   echo "$as_me: failed program was:" >&5
     5109  $as_echo "$as_me: failed program was:" >&5
    47225110sed 's/^/| /' conftest.$ac_ext >&5
    47235111
     
    47265114
    47275115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    4728 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    4729 echo "${ECHO_T}$ac_header_compiler" >&6; }
     5116{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5117$as_echo "$ac_header_compiler" >&6; }
    47305118
    47315119# Is the header present?
    4732 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
    4733 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
     5120{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5121$as_echo_n "checking $ac_header presence... " >&6; }
    47345122cat >conftest.$ac_ext <<_ACEOF
    47355123/* confdefs.h.  */
     
    47455133  *) ac_try_echo=$ac_try;;
    47465134esac
    4747 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5135eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5136$as_echo "$ac_try_echo") >&5
    47485137  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    47495138  ac_status=$?
     
    47515140  rm -f conftest.er1
    47525141  cat conftest.err >&5
    4753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5142  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    47545143  (exit $ac_status); } >/dev/null && {
    47555144         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     
    47585147  ac_header_preproc=yes
    47595148else
    4760   echo "$as_me: failed program was:" >&5
     5149  $as_echo "$as_me: failed program was:" >&5
    47615150sed 's/^/| /' conftest.$ac_ext >&5
    47625151
     
    47655154
    47665155rm -f conftest.err conftest.$ac_ext
    4767 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    4768 echo "${ECHO_T}$ac_header_preproc" >&6; }
     5156{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5157$as_echo "$ac_header_preproc" >&6; }
    47695158
    47705159# So?  What about this header?
    47715160case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
    47725161  yes:no: )
    4773     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    4774 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    4775     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    4776 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5162    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5163$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5164    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5165$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    47775166    ac_header_preproc=yes
    47785167    ;;
    47795168  no:yes:* )
    4780     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    4781 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    4782     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    4783 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    4784     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    4785 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    4786     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    4787 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    4788     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    4789 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    4790     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    4791 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5169    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5170$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5171    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5172$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5173    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5174$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5175    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5176$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5177    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5178$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5179    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5180$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    47925181    ( cat <<\_ASBOX
    47935182## ----------------------------------- ##
     
    47985187    ;;
    47995188esac
    4800 { echo "$as_me:$LINENO: checking for $ac_header" >&5
    4801 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
     5189{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
     5190$as_echo_n "checking for $ac_header... " >&6; }
    48025191if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    4803   echo $ECHO_N "(cached) $ECHO_C" >&6
     5192  $as_echo_n "(cached) " >&6
    48045193else
    48055194  eval "$as_ac_Header=\$ac_header_preproc"
    48065195fi
    4807 ac_res=`eval echo '${'$as_ac_Header'}'`
    4808                { echo "$as_me:$LINENO: result: $ac_res" >&5
    4809 echo "${ECHO_T}$ac_res" >&6; }
    4810 
    4811 fi
    4812 if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5196ac_res=`eval 'as_val=${'$as_ac_Header'}
     5197                 $as_echo "$as_val"'`
     5198               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
     5199$as_echo "$ac_res" >&6; }
     5200
     5201fi
     5202if test `eval 'as_val=${'$as_ac_Header'}
     5203                 $as_echo "$as_val"'` = yes; then
    48135204  cat >>confdefs.h <<_ACEOF
    4814 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    4815 _ACEOF
    4816 
    4817 else
    4818   { echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
    4819 echo "$as_me: WARNING: STL classes missing ?" >&2;}
     5205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5206_ACEOF
     5207
     5208else
     5209  { $as_echo "$as_me:$LINENO: WARNING: STL classes missing ?" >&5
     5210$as_echo "$as_me: WARNING: STL classes missing ?" >&2;}
    48205211fi
    48215212
     
    48285219ac_compiler_gnu=$ac_cv_f77_compiler_gnu
    48295220if test -n "$ac_tool_prefix"; then
    4830   for ac_prog in g77 f77 fort77 f90 xlf xlf90 fl32
     5221  for ac_prog in g77 gfortran f77 fort77 f90 xlf xlf90 fl32
    48315222  do
    48325223    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    48335224set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    4834 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    4835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     5225{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     5226$as_echo_n "checking for $ac_word... " >&6; }
    48365227if test "${ac_cv_prog_F77+set}" = set; then
    4837   echo $ECHO_N "(cached) $ECHO_C" >&6
     5228  $as_echo_n "(cached) " >&6
    48385229else
    48395230  if test -n "$F77"; then
     
    48485239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    48495240    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    4850     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     5241    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    48515242    break 2
    48525243  fi
     
    48595250F77=$ac_cv_prog_F77
    48605251if test -n "$F77"; then
    4861   { echo "$as_me:$LINENO: result: $F77" >&5
    4862 echo "${ECHO_T}$F77" >&6; }
    4863 else
    4864   { echo "$as_me:$LINENO: result: no" >&5
    4865 echo "${ECHO_T}no" >&6; }
     5252  { $as_echo "$as_me:$LINENO: result: $F77" >&5
     5253$as_echo "$F77" >&6; }
     5254else
     5255  { $as_echo "$as_me:$LINENO: result: no" >&5
     5256$as_echo "no" >&6; }
    48665257fi
    48675258
     
    48725263if test -z "$F77"; then
    48735264  ac_ct_F77=$F77
    4874   for ac_prog in g77 f77 fort77 f90 xlf xlf90 fl32
     5265  for ac_prog in g77 gfortran f77 fort77 f90 xlf xlf90 fl32
    48755266do
    48765267  # Extract the first word of "$ac_prog", so it can be a program name with args.
    48775268set dummy $ac_prog; ac_word=$2
    4878 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    4879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     5269{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     5270$as_echo_n "checking for $ac_word... " >&6; }
    48805271if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
    4881   echo $ECHO_N "(cached) $ECHO_C" >&6
     5272  $as_echo_n "(cached) " >&6
    48825273else
    48835274  if test -n "$ac_ct_F77"; then
     
    48925283  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    48935284    ac_cv_prog_ac_ct_F77="$ac_prog"
    4894     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     5285    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    48955286    break 2
    48965287  fi
     
    49035294ac_ct_F77=$ac_cv_prog_ac_ct_F77
    49045295if test -n "$ac_ct_F77"; then
    4905   { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
    4906 echo "${ECHO_T}$ac_ct_F77" >&6; }
    4907 else
    4908   { echo "$as_me:$LINENO: result: no" >&5
    4909 echo "${ECHO_T}no" >&6; }
     5296  { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
     5297$as_echo "$ac_ct_F77" >&6; }
     5298else
     5299  { $as_echo "$as_me:$LINENO: result: no" >&5
     5300$as_echo "no" >&6; }
    49105301fi
    49115302
     
    49195310    case $cross_compiling:$ac_tool_warned in
    49205311yes:)
    4921 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
     5312{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
    49225313whose name does not start with the host triplet.  If you think this
    49235314configuration is useful to you, please write to autoconf@gnu.org." >&5
    4924 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
     5315$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
    49255316whose name does not start with the host triplet.  If you think this
    49265317configuration is useful to you, please write to autoconf@gnu.org." >&2;}
     
    49335324
    49345325# Provide some information about the compiler.
    4935 echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
    4936 ac_compiler=`set X $ac_compile; echo $2`
     5326$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
     5327set X $ac_compile
     5328ac_compiler=$2
    49375329{ (ac_try="$ac_compiler --version >&5"
    49385330case "(($ac_try" in
     
    49405332  *) ac_try_echo=$ac_try;;
    49415333esac
    4942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5335$as_echo "$ac_try_echo") >&5
    49435336  (eval "$ac_compiler --version >&5") 2>&5
    49445337  ac_status=$?
    4945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5338  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    49465339  (exit $ac_status); }
    49475340{ (ac_try="$ac_compiler -v >&5"
     
    49505343  *) ac_try_echo=$ac_try;;
    49515344esac
    4952 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5345eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5346$as_echo "$ac_try_echo") >&5
    49535347  (eval "$ac_compiler -v >&5") 2>&5
    49545348  ac_status=$?
    4955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5349  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    49565350  (exit $ac_status); }
    49575351{ (ac_try="$ac_compiler -V >&5"
     
    49605354  *) ac_try_echo=$ac_try;;
    49615355esac
    4962 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5356eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5357$as_echo "$ac_try_echo") >&5
    49635358  (eval "$ac_compiler -V >&5") 2>&5
    49645359  ac_status=$?
    4965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5360  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    49665361  (exit $ac_status); }
    49675362rm -f a.out
     
    49715366ac_save_ext=$ac_ext
    49725367ac_ext=F
    4973 { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
    4974 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
     5368{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
     5369$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
    49755370if test "${ac_cv_f77_compiler_gnu+set}" = set; then
    4976   echo $ECHO_N "(cached) $ECHO_C" >&6
     5371  $as_echo_n "(cached) " >&6
    49775372else
    49785373  cat >conftest.$ac_ext <<_ACEOF
     
    49905385  *) ac_try_echo=$ac_try;;
    49915386esac
    4992 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5387eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5388$as_echo "$ac_try_echo") >&5
    49935389  (eval "$ac_compile") 2>conftest.er1
    49945390  ac_status=$?
     
    49965392  rm -f conftest.er1
    49975393  cat conftest.err >&5
    4998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5394  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    49995395  (exit $ac_status); } && {
    50005396         test -z "$ac_f77_werror_flag" ||
     
    50035399  ac_compiler_gnu=yes
    50045400else
    5005   echo "$as_me: failed program was:" >&5
     5401  $as_echo "$as_me: failed program was:" >&5
    50065402sed 's/^/| /' conftest.$ac_ext >&5
    50075403
     
    50135409
    50145410fi
    5015 { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
    5016 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
     5411{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
     5412$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
    50175413ac_ext=$ac_save_ext
    50185414ac_test_FFLAGS=${FFLAGS+set}
    50195415ac_save_FFLAGS=$FFLAGS
    50205416FFLAGS=
    5021 { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
    5022 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
     5417{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
     5418$as_echo_n "checking whether $F77 accepts -g... " >&6; }
    50235419if test "${ac_cv_prog_f77_g+set}" = set; then
    5024   echo $ECHO_N "(cached) $ECHO_C" >&6
     5420  $as_echo_n "(cached) " >&6
    50255421else
    50265422  FFLAGS=-g
     
    50365432  *) ac_try_echo=$ac_try;;
    50375433esac
    5038 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     5434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5435$as_echo "$ac_try_echo") >&5
    50395436  (eval "$ac_compile") 2>conftest.er1
    50405437  ac_status=$?
     
    50425439  rm -f conftest.er1
    50435440  cat conftest.err >&5
    5044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5441  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    50455442  (exit $ac_status); } && {
    50465443         test -z "$ac_f77_werror_flag" ||
     
    50495446  ac_cv_prog_f77_g=yes
    50505447else
    5051   echo "$as_me: failed program was:" >&5
     5448  $as_echo "$as_me: failed program was:" >&5
    50525449sed 's/^/| /' conftest.$ac_ext >&5
    50535450
     
    50585455
    50595456fi
    5060 { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
    5061 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
     5457{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
     5458$as_echo "$ac_cv_prog_f77_g" >&6; }
    50625459if test "$ac_test_FFLAGS" = set; then
    50635460  FFLAGS=$ac_save_FFLAGS
     
    50765473fi
    50775474
    5078 G77=`test $ac_compiler_gnu = yes && echo yes`
     5475if test $ac_compiler_gnu = yes; then
     5476  G77=yes
     5477else
     5478  G77=
     5479fi
    50795480ac_ext=cpp
    50805481ac_cpp='$CXXCPP $CPPFLAGS'
     
    50845485
    50855486
    5086 
    5087 
     5487SC_CONFIG_GCC
     5488
     5489
     5490    # Step 0.a: Enable 64 bit support?
     5491
     5492    { $as_echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
     5493$as_echo_n "checking if 64bit support is requested... " >&6; }
     5494    # Check whether --enable-64bit was given.
     5495if test "${enable_64bit+set}" = set; then
     5496  enableval=$enable_64bit; do64bit=$enableval
     5497else
     5498  do64bit=no
     5499fi
     5500
     5501    { $as_echo "$as_me:$LINENO: result: $do64bit" >&5
     5502$as_echo "$do64bit" >&6; }
     5503
     5504    # Step 0.b: Enable Solaris 64 bit VIS support?
     5505
     5506    { $as_echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
     5507$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
     5508    # Check whether --enable-64bit-vis was given.
     5509if test "${enable_64bit_vis+set}" = set; then
     5510  enableval=$enable_64bit_vis; do64bitVIS=$enableval
     5511else
     5512  do64bitVIS=no
     5513fi
     5514
     5515    { $as_echo "$as_me:$LINENO: result: $do64bitVIS" >&5
     5516$as_echo "$do64bitVIS" >&6; }
     5517
     5518    if test "$do64bitVIS" = "yes"; then
     5519        # Force 64bit on with VIS
     5520        do64bit=yes
     5521    fi
     5522
     5523    # Step 1: set the variable "system" to hold the name and version number
     5524    # for the system.
     5525
     5526
     5527    { $as_echo "$as_me:$LINENO: checking system version" >&5
     5528$as_echo_n "checking system version... " >&6; }
     5529if test "${tcl_cv_sys_version+set}" = set; then
     5530  $as_echo_n "(cached) " >&6
     5531else
     5532
     5533        if test -f /usr/lib/NextStep/software_version; then
     5534            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
     5535        else
     5536            tcl_cv_sys_version=`uname -s`-`uname -r`
     5537            if test "$?" -ne 0 ; then
     5538                { $as_echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
     5539$as_echo "$as_me: WARNING: can't find uname command" >&2;}
     5540                tcl_cv_sys_version=unknown
     5541            else
     5542                # Special check for weird MP-RAS system (uname returns weird
     5543                # results, and the version is kept in special file).
     5544
     5545                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
     5546                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
     5547                fi
     5548                if test "`uname -s`" = "AIX" ; then
     5549                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
     5550                fi
     5551            fi
     5552        fi
     5553
     5554fi
     5555{ $as_echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
     5556$as_echo "$tcl_cv_sys_version" >&6; }
     5557    system=$tcl_cv_sys_version
     5558
     5559
     5560    # Step 2: check for existence of -ldl library.  This is needed because
     5561    # Linux can use either -ldl or -ldld for dynamic loading.
     5562
     5563    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
     5564$as_echo_n "checking for dlopen in -ldl... " >&6; }
     5565if test "${ac_cv_lib_dl_dlopen+set}" = set; then
     5566  $as_echo_n "(cached) " >&6
     5567else
     5568  ac_check_lib_save_LIBS=$LIBS
     5569LIBS="-ldl  $LIBS"
     5570cat >conftest.$ac_ext <<_ACEOF
     5571/* confdefs.h.  */
     5572_ACEOF
     5573cat confdefs.h >>conftest.$ac_ext
     5574cat >>conftest.$ac_ext <<_ACEOF
     5575/* end confdefs.h.  */
     5576
     5577/* Override any GCC internal prototype to avoid an error.
     5578   Use char because int might match the return type of a GCC
     5579   builtin and then its argument prototype would still apply.  */
     5580#ifdef __cplusplus
     5581extern "C"
     5582#endif
     5583char dlopen ();
     5584int
     5585main ()
     5586{
     5587return dlopen ();
     5588  ;
     5589  return 0;
     5590}
     5591_ACEOF
     5592rm -f conftest.$ac_objext conftest$ac_exeext
     5593if { (ac_try="$ac_link"
     5594case "(($ac_try" in
     5595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     5596  *) ac_try_echo=$ac_try;;
     5597esac
     5598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5599$as_echo "$ac_try_echo") >&5
     5600  (eval "$ac_link") 2>conftest.er1
     5601  ac_status=$?
     5602  grep -v '^ *+' conftest.er1 >conftest.err
     5603  rm -f conftest.er1
     5604  cat conftest.err >&5
     5605  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5606  (exit $ac_status); } && {
     5607         test -z "$ac_cxx_werror_flag" ||
     5608         test ! -s conftest.err
     5609       } && test -s conftest$ac_exeext && {
     5610         test "$cross_compiling" = yes ||
     5611         $as_test_x conftest$ac_exeext
     5612       }; then
     5613  ac_cv_lib_dl_dlopen=yes
     5614else
     5615  $as_echo "$as_me: failed program was:" >&5
     5616sed 's/^/| /' conftest.$ac_ext >&5
     5617
     5618        ac_cv_lib_dl_dlopen=no
     5619fi
     5620
     5621rm -rf conftest.dSYM
     5622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     5623      conftest$ac_exeext conftest.$ac_ext
     5624LIBS=$ac_check_lib_save_LIBS
     5625fi
     5626{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
     5627$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
     5628if test $ac_cv_lib_dl_dlopen = yes; then
     5629  have_dl=yes
     5630else
     5631  have_dl=no
     5632fi
     5633
     5634
     5635    # Require ranlib early so we can override it in special cases below.
     5636
     5637
     5638
     5639    # Step 3: set configuration options based on system name and version.
     5640
     5641    do64bit_ok=no
     5642    LDFLAGS_ORIG="$LDFLAGS"
     5643    TCL_EXPORT_FILE_SUFFIX=""
     5644    UNSHARED_LIB_SUFFIX=""
     5645    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
     5646    ECHO_VERSION='`echo ${VERSION}`'
     5647    TCL_LIB_VERSIONS_OK=ok
     5648    CFLAGS_DEBUG=-g
     5649    CFLAGS_OPTIMIZE=-O
     5650    if test "$GCC" = "yes" ; then
     5651        CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
     5652    else
     5653        CFLAGS_WARNING=""
     5654    fi
     5655    TCL_NEEDS_EXP_FILE=0
     5656    TCL_BUILD_EXP_FILE=""
     5657    TCL_EXP_FILE=""
     5658    # Extract the first word of "ar", so it can be a program name with args.
     5659set dummy ar; ac_word=$2
     5660{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     5661$as_echo_n "checking for $ac_word... " >&6; }
     5662if test "${ac_cv_prog_AR+set}" = set; then
     5663  $as_echo_n "(cached) " >&6
     5664else
     5665  if test -n "$AR"; then
     5666  ac_cv_prog_AR="$AR" # Let the user override the test.
     5667else
     5668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     5669for as_dir in $PATH
     5670do
     5671  IFS=$as_save_IFS
     5672  test -z "$as_dir" && as_dir=.
     5673  for ac_exec_ext in '' $ac_executable_extensions; do
     5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     5675    ac_cv_prog_AR="ar"
     5676    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     5677    break 2
     5678  fi
     5679done
     5680done
     5681IFS=$as_save_IFS
     5682
     5683fi
     5684fi
     5685AR=$ac_cv_prog_AR
     5686if test -n "$AR"; then
     5687  { $as_echo "$as_me:$LINENO: result: $AR" >&5
     5688$as_echo "$AR" >&6; }
     5689else
     5690  { $as_echo "$as_me:$LINENO: result: no" >&5
     5691$as_echo "no" >&6; }
     5692fi
     5693
     5694
     5695    if test "${AR}" = "" ; then
     5696        { { $as_echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5
     5697$as_echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;}
     5698   { (exit 1); exit 1; }; }
     5699    fi
     5700    STLIB_LD='${AR} cr'
     5701    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     5702    PLAT_OBJS=""
     5703    PLAT_SRCS=""
     5704    case $system in
     5705        AIX-*)
     5706            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
     5707                # AIX requires the _r compiler when gcc isn't being used
     5708                case "${CC}" in
     5709                    *_r)
     5710                        # ok ...
     5711                        ;;
     5712                    *)
     5713                        CC=${CC}_r
     5714                        ;;
     5715                esac
     5716                { $as_echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
     5717$as_echo "Using $CC for compiling with threads" >&6; }
     5718            fi
     5719            LIBS="$LIBS -lc"
     5720            SHLIB_CFLAGS=""
     5721            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     5722            # symbols when dynamically loaded into tclsh.
     5723            SHLIB_LD_LIBS='${LIBS}'
     5724            SHLIB_SUFFIX=".so"
     5725
     5726            DL_OBJS="tclLoadDl.o"
     5727            LD_LIBRARY_PATH_VAR="LIBPATH"
     5728
     5729            # Check to enable 64-bit flags for compiler/linker on AIX 4+
     5730            if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
     5731                if test "$GCC" = "yes" ; then
     5732                    { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     5733$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     5734                else
     5735                    do64bit_ok=yes
     5736                    CFLAGS="$CFLAGS -q64"
     5737                    LDFLAGS="$LDFLAGS -q64"
     5738                    RANLIB="${RANLIB} -X64"
     5739                    AR="${AR} -X64"
     5740                    SHLIB_LD_FLAGS="-b64"
     5741                fi
     5742            fi
     5743
     5744            if test "`uname -m`" = "ia64" ; then
     5745                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
     5746                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     5747                # AIX-5 has dl* in libc.so
     5748                DL_LIBS=""
     5749                if test "$GCC" = "yes" ; then
     5750                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     5751                else
     5752                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
     5753                fi
     5754                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     5755            else
     5756                if test "$GCC" = "yes" ; then
     5757                    SHLIB_LD="gcc -shared"
     5758                else
     5759                    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
     5760                fi
     5761                SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
     5762                DL_LIBS="-ldl"
     5763                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     5764                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5765                TCL_NEEDS_EXP_FILE=1
     5766                TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
     5767            fi
     5768
     5769            # AIX v<=4.1 has some different flags than 4.2+
     5770            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
     5771                LIBOBJS="$LIBOBJS tclLoadAix.o"
     5772                DL_LIBS="-lld"
     5773            fi
     5774
     5775            # On AIX <=v4 systems, libbsd.a has to be linked in to support
     5776            # non-blocking file IO.  This library has to be linked in after
     5777            # the MATH_LIBS or it breaks the pow() function.  The way to
     5778            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
     5779            # This library also supplies gettimeofday.
     5780            #
     5781            # AIX does not have a timezone field in struct tm. When the AIX
     5782            # bsd library is used, the timezone global and the gettimeofday
     5783            # methods are to be avoided for timezone deduction instead, we
     5784            # deduce the timezone by comparing the localtime result on a
     5785            # known GMT value.
     5786
     5787            { $as_echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
     5788$as_echo_n "checking for gettimeofday in -lbsd... " >&6; }
     5789if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
     5790  $as_echo_n "(cached) " >&6
     5791else
     5792  ac_check_lib_save_LIBS=$LIBS
     5793LIBS="-lbsd  $LIBS"
     5794cat >conftest.$ac_ext <<_ACEOF
     5795/* confdefs.h.  */
     5796_ACEOF
     5797cat confdefs.h >>conftest.$ac_ext
     5798cat >>conftest.$ac_ext <<_ACEOF
     5799/* end confdefs.h.  */
     5800
     5801/* Override any GCC internal prototype to avoid an error.
     5802   Use char because int might match the return type of a GCC
     5803   builtin and then its argument prototype would still apply.  */
     5804#ifdef __cplusplus
     5805extern "C"
     5806#endif
     5807char gettimeofday ();
     5808int
     5809main ()
     5810{
     5811return gettimeofday ();
     5812  ;
     5813  return 0;
     5814}
     5815_ACEOF
     5816rm -f conftest.$ac_objext conftest$ac_exeext
     5817if { (ac_try="$ac_link"
     5818case "(($ac_try" in
     5819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     5820  *) ac_try_echo=$ac_try;;
     5821esac
     5822eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5823$as_echo "$ac_try_echo") >&5
     5824  (eval "$ac_link") 2>conftest.er1
     5825  ac_status=$?
     5826  grep -v '^ *+' conftest.er1 >conftest.err
     5827  rm -f conftest.er1
     5828  cat conftest.err >&5
     5829  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5830  (exit $ac_status); } && {
     5831         test -z "$ac_cxx_werror_flag" ||
     5832         test ! -s conftest.err
     5833       } && test -s conftest$ac_exeext && {
     5834         test "$cross_compiling" = yes ||
     5835         $as_test_x conftest$ac_exeext
     5836       }; then
     5837  ac_cv_lib_bsd_gettimeofday=yes
     5838else
     5839  $as_echo "$as_me: failed program was:" >&5
     5840sed 's/^/| /' conftest.$ac_ext >&5
     5841
     5842        ac_cv_lib_bsd_gettimeofday=no
     5843fi
     5844
     5845rm -rf conftest.dSYM
     5846rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     5847      conftest$ac_exeext conftest.$ac_ext
     5848LIBS=$ac_check_lib_save_LIBS
     5849fi
     5850{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
     5851$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; }
     5852if test $ac_cv_lib_bsd_gettimeofday = yes; then
     5853  libbsd=yes
     5854else
     5855  libbsd=no
     5856fi
     5857
     5858            if test $libbsd = yes; then
     5859                MATH_LIBS="$MATH_LIBS -lbsd"
     5860                cat >>confdefs.h <<\_ACEOF
     5861#define USE_DELTA_FOR_TZ 1
     5862_ACEOF
     5863
     5864            fi
     5865            ;;
     5866        BeOS*)
     5867            SHLIB_CFLAGS="-fPIC"
     5868            SHLIB_LD="${CC} -nostart"
     5869            SHLIB_LD_LIBS='${LIBS}'
     5870            SHLIB_SUFFIX=".so"
     5871            DL_OBJS="tclLoadDl.o"
     5872            DL_LIBS="-ldl"
     5873
     5874            #-----------------------------------------------------------
     5875            # Check for inet_ntoa in -lbind, for BeOS (which also needs
     5876            # -lsocket, even if the network functions are in -lnet which
     5877            # is always linked to, for compatibility.
     5878            #-----------------------------------------------------------
     5879            { $as_echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
     5880$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
     5881if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
     5882  $as_echo_n "(cached) " >&6
     5883else
     5884  ac_check_lib_save_LIBS=$LIBS
     5885LIBS="-lbind  $LIBS"
     5886cat >conftest.$ac_ext <<_ACEOF
     5887/* confdefs.h.  */
     5888_ACEOF
     5889cat confdefs.h >>conftest.$ac_ext
     5890cat >>conftest.$ac_ext <<_ACEOF
     5891/* end confdefs.h.  */
     5892
     5893/* Override any GCC internal prototype to avoid an error.
     5894   Use char because int might match the return type of a GCC
     5895   builtin and then its argument prototype would still apply.  */
     5896#ifdef __cplusplus
     5897extern "C"
     5898#endif
     5899char inet_ntoa ();
     5900int
     5901main ()
     5902{
     5903return inet_ntoa ();
     5904  ;
     5905  return 0;
     5906}
     5907_ACEOF
     5908rm -f conftest.$ac_objext conftest$ac_exeext
     5909if { (ac_try="$ac_link"
     5910case "(($ac_try" in
     5911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     5912  *) ac_try_echo=$ac_try;;
     5913esac
     5914eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     5915$as_echo "$ac_try_echo") >&5
     5916  (eval "$ac_link") 2>conftest.er1
     5917  ac_status=$?
     5918  grep -v '^ *+' conftest.er1 >conftest.err
     5919  rm -f conftest.er1
     5920  cat conftest.err >&5
     5921  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5922  (exit $ac_status); } && {
     5923         test -z "$ac_cxx_werror_flag" ||
     5924         test ! -s conftest.err
     5925       } && test -s conftest$ac_exeext && {
     5926         test "$cross_compiling" = yes ||
     5927         $as_test_x conftest$ac_exeext
     5928       }; then
     5929  ac_cv_lib_bind_inet_ntoa=yes
     5930else
     5931  $as_echo "$as_me: failed program was:" >&5
     5932sed 's/^/| /' conftest.$ac_ext >&5
     5933
     5934        ac_cv_lib_bind_inet_ntoa=no
     5935fi
     5936
     5937rm -rf conftest.dSYM
     5938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     5939      conftest$ac_exeext conftest.$ac_ext
     5940LIBS=$ac_check_lib_save_LIBS
     5941fi
     5942{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
     5943$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
     5944if test $ac_cv_lib_bind_inet_ntoa = yes; then
     5945  LIBS="$LIBS -lbind -lsocket"
     5946fi
     5947
     5948            ;;
     5949        BSD/OS-2.1*|BSD/OS-3*)
     5950            SHLIB_CFLAGS=""
     5951            SHLIB_LD="shlicc -r"
     5952            SHLIB_LD_LIBS='${LIBS}'
     5953            SHLIB_SUFFIX=".so"
     5954            DL_OBJS="tclLoadDl.o"
     5955            DL_LIBS="-ldl"
     5956            CC_SEARCH_FLAGS=""
     5957            LD_SEARCH_FLAGS=""
     5958            ;;
     5959        BSD/OS-4.*)
     5960            SHLIB_CFLAGS="-export-dynamic -fPIC"
     5961            SHLIB_LD="cc -shared"
     5962            SHLIB_LD_LIBS='${LIBS}'
     5963            SHLIB_SUFFIX=".so"
     5964            DL_OBJS="tclLoadDl.o"
     5965            DL_LIBS="-ldl"
     5966            LDFLAGS="$LDFLAGS -export-dynamic"
     5967            CC_SEARCH_FLAGS=""
     5968            LD_SEARCH_FLAGS=""
     5969            ;;
     5970        dgux*)
     5971            SHLIB_CFLAGS="-K PIC"
     5972            SHLIB_LD="cc -G"
     5973            SHLIB_LD_LIBS=""
     5974            SHLIB_SUFFIX=".so"
     5975            DL_OBJS="tclLoadDl.o"
     5976            DL_LIBS="-ldl"
     5977            CC_SEARCH_FLAGS=""
     5978            LD_SEARCH_FLAGS=""
     5979            ;;
     5980        HP-UX-*.11.*)
     5981            # Use updated header definitions where possible
     5982            cat >>confdefs.h <<\_ACEOF
     5983#define _XOPEN_SOURCE 1
     5984_ACEOF
     5985          # Use the XOPEN network library
     5986            cat >>confdefs.h <<\_ACEOF
     5987#define _XOPEN_SOURCE_EXTENDED 1
     5988_ACEOF
     5989 # Use the XOPEN network library
     5990            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
     5991
     5992            if test "`uname -m`" = "ia64" ; then
     5993                SHLIB_SUFFIX=".so"
     5994            else
     5995                SHLIB_SUFFIX=".sl"
     5996            fi
     5997            { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
     5998$as_echo_n "checking for shl_load in -ldld... " >&6; }
     5999if test "${ac_cv_lib_dld_shl_load+set}" = set; then
     6000  $as_echo_n "(cached) " >&6
     6001else
     6002  ac_check_lib_save_LIBS=$LIBS
     6003LIBS="-ldld  $LIBS"
     6004cat >conftest.$ac_ext <<_ACEOF
     6005/* confdefs.h.  */
     6006_ACEOF
     6007cat confdefs.h >>conftest.$ac_ext
     6008cat >>conftest.$ac_ext <<_ACEOF
     6009/* end confdefs.h.  */
     6010
     6011/* Override any GCC internal prototype to avoid an error.
     6012   Use char because int might match the return type of a GCC
     6013   builtin and then its argument prototype would still apply.  */
     6014#ifdef __cplusplus
     6015extern "C"
     6016#endif
     6017char shl_load ();
     6018int
     6019main ()
     6020{
     6021return shl_load ();
     6022  ;
     6023  return 0;
     6024}
     6025_ACEOF
     6026rm -f conftest.$ac_objext conftest$ac_exeext
     6027if { (ac_try="$ac_link"
     6028case "(($ac_try" in
     6029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6030  *) ac_try_echo=$ac_try;;
     6031esac
     6032eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6033$as_echo "$ac_try_echo") >&5
     6034  (eval "$ac_link") 2>conftest.er1
     6035  ac_status=$?
     6036  grep -v '^ *+' conftest.er1 >conftest.err
     6037  rm -f conftest.er1
     6038  cat conftest.err >&5
     6039  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6040  (exit $ac_status); } && {
     6041         test -z "$ac_cxx_werror_flag" ||
     6042         test ! -s conftest.err
     6043       } && test -s conftest$ac_exeext && {
     6044         test "$cross_compiling" = yes ||
     6045         $as_test_x conftest$ac_exeext
     6046       }; then
     6047  ac_cv_lib_dld_shl_load=yes
     6048else
     6049  $as_echo "$as_me: failed program was:" >&5
     6050sed 's/^/| /' conftest.$ac_ext >&5
     6051
     6052        ac_cv_lib_dld_shl_load=no
     6053fi
     6054
     6055rm -rf conftest.dSYM
     6056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     6057      conftest$ac_exeext conftest.$ac_ext
     6058LIBS=$ac_check_lib_save_LIBS
     6059fi
     6060{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
     6061$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
     6062if test $ac_cv_lib_dld_shl_load = yes; then
     6063  tcl_ok=yes
     6064else
     6065  tcl_ok=no
     6066fi
     6067
     6068            if test "$tcl_ok" = yes; then
     6069                SHLIB_CFLAGS="+z"
     6070                SHLIB_LD="ld -b"
     6071                SHLIB_LD_LIBS='${LIBS}'
     6072                DL_OBJS="tclLoadShl.o"
     6073                DL_LIBS="-ldld"
     6074                LDFLAGS="$LDFLAGS -Wl,-E"
     6075                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     6076                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     6077                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     6078            fi
     6079            if test "$GCC" = "yes" ; then
     6080                SHLIB_LD="gcc -shared"
     6081                SHLIB_LD_LIBS='${LIBS}'
     6082                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6083            fi
     6084
     6085            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
     6086            #CFLAGS="$CFLAGS +DAportable"
     6087
     6088            # Check to enable 64-bit flags for compiler/linker
     6089            if test "$do64bit" = "yes" ; then
     6090                if test "$GCC" = "yes" ; then
     6091                    hpux_arch=`${CC} -dumpmachine`
     6092                    case $hpux_arch in
     6093                        hppa64*)
     6094                            # 64-bit gcc in use.  Fix flags for GNU ld.
     6095                            do64bit_ok=yes
     6096                            SHLIB_LD="${CC} -shared"
     6097                            SHLIB_LD_LIBS='${LIBS}'
     6098                            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6099                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6100                            ;;
     6101                        *)
     6102                            { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     6103$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     6104                            ;;
     6105                    esac
     6106                else
     6107                    do64bit_ok=yes
     6108                    CFLAGS="$CFLAGS +DD64"
     6109                    LDFLAGS="$LDFLAGS +DD64"
     6110                fi
     6111            fi
     6112            ;;
     6113        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
     6114            SHLIB_SUFFIX=".sl"
     6115            { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
     6116$as_echo_n "checking for shl_load in -ldld... " >&6; }
     6117if test "${ac_cv_lib_dld_shl_load+set}" = set; then
     6118  $as_echo_n "(cached) " >&6
     6119else
     6120  ac_check_lib_save_LIBS=$LIBS
     6121LIBS="-ldld  $LIBS"
     6122cat >conftest.$ac_ext <<_ACEOF
     6123/* confdefs.h.  */
     6124_ACEOF
     6125cat confdefs.h >>conftest.$ac_ext
     6126cat >>conftest.$ac_ext <<_ACEOF
     6127/* end confdefs.h.  */
     6128
     6129/* Override any GCC internal prototype to avoid an error.
     6130   Use char because int might match the return type of a GCC
     6131   builtin and then its argument prototype would still apply.  */
     6132#ifdef __cplusplus
     6133extern "C"
     6134#endif
     6135char shl_load ();
     6136int
     6137main ()
     6138{
     6139return shl_load ();
     6140  ;
     6141  return 0;
     6142}
     6143_ACEOF
     6144rm -f conftest.$ac_objext conftest$ac_exeext
     6145if { (ac_try="$ac_link"
     6146case "(($ac_try" in
     6147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6148  *) ac_try_echo=$ac_try;;
     6149esac
     6150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6151$as_echo "$ac_try_echo") >&5
     6152  (eval "$ac_link") 2>conftest.er1
     6153  ac_status=$?
     6154  grep -v '^ *+' conftest.er1 >conftest.err
     6155  rm -f conftest.er1
     6156  cat conftest.err >&5
     6157  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6158  (exit $ac_status); } && {
     6159         test -z "$ac_cxx_werror_flag" ||
     6160         test ! -s conftest.err
     6161       } && test -s conftest$ac_exeext && {
     6162         test "$cross_compiling" = yes ||
     6163         $as_test_x conftest$ac_exeext
     6164       }; then
     6165  ac_cv_lib_dld_shl_load=yes
     6166else
     6167  $as_echo "$as_me: failed program was:" >&5
     6168sed 's/^/| /' conftest.$ac_ext >&5
     6169
     6170        ac_cv_lib_dld_shl_load=no
     6171fi
     6172
     6173rm -rf conftest.dSYM
     6174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     6175      conftest$ac_exeext conftest.$ac_ext
     6176LIBS=$ac_check_lib_save_LIBS
     6177fi
     6178{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
     6179$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
     6180if test $ac_cv_lib_dld_shl_load = yes; then
     6181  tcl_ok=yes
     6182else
     6183  tcl_ok=no
     6184fi
     6185
     6186            if test "$tcl_ok" = yes; then
     6187                SHLIB_CFLAGS="+z"
     6188                SHLIB_LD="ld -b"
     6189                SHLIB_LD_LIBS=""
     6190                DL_OBJS="tclLoadShl.o"
     6191                DL_LIBS="-ldld"
     6192                LDFLAGS="$LDFLAGS -Wl,-E"
     6193                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     6194                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     6195                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     6196            fi
     6197            ;;
     6198        IRIX-4.*)
     6199            SHLIB_CFLAGS="-G 0"
     6200            SHLIB_SUFFIX=".a"
     6201            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     6202            SHLIB_LD_LIBS='${LIBS}'
     6203            DL_OBJS="tclLoadAout.o"
     6204            DL_LIBS=""
     6205            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     6206            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     6207            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6208            SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     6209            ;;
     6210        IRIX-5.*)
     6211            SHLIB_CFLAGS=""
     6212            SHLIB_LD="ld -shared -rdata_shared"
     6213            SHLIB_LD_LIBS='${LIBS}'
     6214            SHLIB_SUFFIX=".so"
     6215            DL_OBJS="tclLoadDl.o"
     6216            DL_LIBS=""
     6217            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6218            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     6219            ;;
     6220        IRIX-6.*)
     6221            SHLIB_CFLAGS=""
     6222            SHLIB_LD="ld -n32 -shared -rdata_shared"
     6223            SHLIB_LD_LIBS='${LIBS}'
     6224            SHLIB_SUFFIX=".so"
     6225            DL_OBJS="tclLoadDl.o"
     6226            DL_LIBS=""
     6227            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6228            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     6229            if test "$GCC" = "yes" ; then
     6230                CFLAGS="$CFLAGS -mabi=n32"
     6231                LDFLAGS="$LDFLAGS -mabi=n32"
     6232            else
     6233                case $system in
     6234                    IRIX-6.3)
     6235                        # Use to build 6.2 compatible binaries on 6.3.
     6236                        CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
     6237                        ;;
     6238                    *)
     6239                        CFLAGS="$CFLAGS -n32"
     6240                        ;;
     6241                esac
     6242                LDFLAGS="$LDFLAGS -n32"
     6243            fi
     6244            ;;
     6245        IRIX64-6.*)
     6246            SHLIB_CFLAGS=""
     6247            SHLIB_LD="ld -n32 -shared -rdata_shared"
     6248            SHLIB_LD_LIBS='${LIBS}'
     6249            SHLIB_SUFFIX=".so"
     6250            DL_OBJS="tclLoadDl.o"
     6251            DL_LIBS=""
     6252            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6253            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     6254
     6255            # Check to enable 64-bit flags for compiler/linker
     6256
     6257            if test "$do64bit" = "yes" ; then
     6258                if test "$GCC" = "yes" ; then
     6259                    { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
     6260$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
     6261                else
     6262                    do64bit_ok=yes
     6263                    SHLIB_LD="ld -64 -shared -rdata_shared"
     6264                    CFLAGS="$CFLAGS -64"
     6265                    LDFLAGS="$LDFLAGS -64"
     6266                fi
     6267            fi
     6268            ;;
     6269        Linux*)
     6270            SHLIB_CFLAGS="-fPIC"
     6271            SHLIB_LD_LIBS='${LIBS}'
     6272            SHLIB_SUFFIX=".so"
     6273
     6274            CFLAGS_OPTIMIZE=-O2
     6275            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
     6276            # when you inline the string and math operations.  Turn this off to
     6277            # get rid of the warnings.
     6278            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
     6279
     6280            if test "$have_dl" = yes; then
     6281                SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
     6282                DL_OBJS="tclLoadDl.o"
     6283                DL_LIBS="-ldl"
     6284                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     6285                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6286                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6287            else
     6288                if test "${ac_cv_header_dld_h+set}" = set; then
     6289  { $as_echo "$as_me:$LINENO: checking for dld.h" >&5
     6290$as_echo_n "checking for dld.h... " >&6; }
     6291if test "${ac_cv_header_dld_h+set}" = set; then
     6292  $as_echo_n "(cached) " >&6
     6293fi
     6294{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
     6295$as_echo "$ac_cv_header_dld_h" >&6; }
     6296else
     6297  # Is the header compilable?
     6298{ $as_echo "$as_me:$LINENO: checking dld.h usability" >&5
     6299$as_echo_n "checking dld.h usability... " >&6; }
     6300cat >conftest.$ac_ext <<_ACEOF
     6301/* confdefs.h.  */
     6302_ACEOF
     6303cat confdefs.h >>conftest.$ac_ext
     6304cat >>conftest.$ac_ext <<_ACEOF
     6305/* end confdefs.h.  */
     6306$ac_includes_default
     6307#include <dld.h>
     6308_ACEOF
     6309rm -f conftest.$ac_objext
     6310if { (ac_try="$ac_compile"
     6311case "(($ac_try" in
     6312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6313  *) ac_try_echo=$ac_try;;
     6314esac
     6315eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6316$as_echo "$ac_try_echo") >&5
     6317  (eval "$ac_compile") 2>conftest.er1
     6318  ac_status=$?
     6319  grep -v '^ *+' conftest.er1 >conftest.err
     6320  rm -f conftest.er1
     6321  cat conftest.err >&5
     6322  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6323  (exit $ac_status); } && {
     6324         test -z "$ac_cxx_werror_flag" ||
     6325         test ! -s conftest.err
     6326       } && test -s conftest.$ac_objext; then
     6327  ac_header_compiler=yes
     6328else
     6329  $as_echo "$as_me: failed program was:" >&5
     6330sed 's/^/| /' conftest.$ac_ext >&5
     6331
     6332        ac_header_compiler=no
     6333fi
     6334
     6335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     6336{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6337$as_echo "$ac_header_compiler" >&6; }
     6338
     6339# Is the header present?
     6340{ $as_echo "$as_me:$LINENO: checking dld.h presence" >&5
     6341$as_echo_n "checking dld.h presence... " >&6; }
     6342cat >conftest.$ac_ext <<_ACEOF
     6343/* confdefs.h.  */
     6344_ACEOF
     6345cat confdefs.h >>conftest.$ac_ext
     6346cat >>conftest.$ac_ext <<_ACEOF
     6347/* end confdefs.h.  */
     6348#include <dld.h>
     6349_ACEOF
     6350if { (ac_try="$ac_cpp conftest.$ac_ext"
     6351case "(($ac_try" in
     6352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6353  *) ac_try_echo=$ac_try;;
     6354esac
     6355eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6356$as_echo "$ac_try_echo") >&5
     6357  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     6358  ac_status=$?
     6359  grep -v '^ *+' conftest.er1 >conftest.err
     6360  rm -f conftest.er1
     6361  cat conftest.err >&5
     6362  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6363  (exit $ac_status); } >/dev/null && {
     6364         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     6365         test ! -s conftest.err
     6366       }; then
     6367  ac_header_preproc=yes
     6368else
     6369  $as_echo "$as_me: failed program was:" >&5
     6370sed 's/^/| /' conftest.$ac_ext >&5
     6371
     6372  ac_header_preproc=no
     6373fi
     6374
     6375rm -f conftest.err conftest.$ac_ext
     6376{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6377$as_echo "$ac_header_preproc" >&6; }
     6378
     6379# So?  What about this header?
     6380case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     6381  yes:no: )
     6382    { $as_echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
     6383$as_echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6384    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
     6385$as_echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
     6386    ac_header_preproc=yes
     6387    ;;
     6388  no:yes:* )
     6389    { $as_echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
     6390$as_echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
     6391    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     check for missing prerequisite headers?" >&5
     6392$as_echo "$as_me: WARNING: dld.h:     check for missing prerequisite headers?" >&2;}
     6393    { $as_echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
     6394$as_echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
     6395    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&5
     6396$as_echo "$as_me: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     6397    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
     6398$as_echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
     6399    { $as_echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
     6400$as_echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
     6401    ( cat <<\_ASBOX
     6402## ----------------------------------- ##
     6403## Report this to rappture@nanohub.org ##
     6404## ----------------------------------- ##
     6405_ASBOX
     6406     ) | sed "s/^/$as_me: WARNING:     /" >&2
     6407    ;;
     6408esac
     6409{ $as_echo "$as_me:$LINENO: checking for dld.h" >&5
     6410$as_echo_n "checking for dld.h... " >&6; }
     6411if test "${ac_cv_header_dld_h+set}" = set; then
     6412  $as_echo_n "(cached) " >&6
     6413else
     6414  ac_cv_header_dld_h=$ac_header_preproc
     6415fi
     6416{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
     6417$as_echo "$ac_cv_header_dld_h" >&6; }
     6418
     6419fi
     6420if test $ac_cv_header_dld_h = yes; then
     6421
     6422                    SHLIB_LD="ld -shared"
     6423                    DL_OBJS="tclLoadDld.o"
     6424                    DL_LIBS="-ldld"
     6425                    CC_SEARCH_FLAGS=""
     6426                    LD_SEARCH_FLAGS=""
     6427fi
     6428
     6429
     6430            fi
     6431            if test "`uname -m`" = "alpha" ; then
     6432                CFLAGS="$CFLAGS -mieee"
     6433            fi
     6434            if test $do64bit = yes; then
     6435                { $as_echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
     6436$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
     6437if test "${tcl_cv_cc_m64+set}" = set; then
     6438  $as_echo_n "(cached) " >&6
     6439else
     6440
     6441                    hold_cflags=$CFLAGS
     6442                    CFLAGS="$CFLAGS -m64"
     6443                    cat >conftest.$ac_ext <<_ACEOF
     6444/* confdefs.h.  */
     6445_ACEOF
     6446cat confdefs.h >>conftest.$ac_ext
     6447cat >>conftest.$ac_ext <<_ACEOF
     6448/* end confdefs.h.  */
     6449
     6450int
     6451main ()
     6452{
     6453
     6454  ;
     6455  return 0;
     6456}
     6457_ACEOF
     6458rm -f conftest.$ac_objext conftest$ac_exeext
     6459if { (ac_try="$ac_link"
     6460case "(($ac_try" in
     6461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6462  *) ac_try_echo=$ac_try;;
     6463esac
     6464eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6465$as_echo "$ac_try_echo") >&5
     6466  (eval "$ac_link") 2>conftest.er1
     6467  ac_status=$?
     6468  grep -v '^ *+' conftest.er1 >conftest.err
     6469  rm -f conftest.er1
     6470  cat conftest.err >&5
     6471  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6472  (exit $ac_status); } && {
     6473         test -z "$ac_cxx_werror_flag" ||
     6474         test ! -s conftest.err
     6475       } && test -s conftest$ac_exeext && {
     6476         test "$cross_compiling" = yes ||
     6477         $as_test_x conftest$ac_exeext
     6478       }; then
     6479  tcl_cv_cc_m64=yes
     6480else
     6481  $as_echo "$as_me: failed program was:" >&5
     6482sed 's/^/| /' conftest.$ac_ext >&5
     6483
     6484        tcl_cv_cc_m64=no
     6485fi
     6486
     6487rm -rf conftest.dSYM
     6488rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     6489      conftest$ac_exeext conftest.$ac_ext
     6490                    CFLAGS=$hold_cflags
     6491fi
     6492{ $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
     6493$as_echo "$tcl_cv_cc_m64" >&6; }
     6494                if test $tcl_cv_cc_m64 = yes; then
     6495                    CFLAGS="$CFLAGS -m64"
     6496                    do64bit_ok=yes
     6497                fi
     6498            fi
     6499
     6500            # The combo of gcc + glibc has a bug related
     6501            # to inlining of functions like strtod(). The
     6502            # -fno-builtin flag should address this problem
     6503            # but it does not work. The -fno-inline flag
     6504            # is kind of overkill but it works.
     6505            # Disable inlining only when one of the
     6506            # files in compat/*.c is being linked in.
     6507            if test x"${LIBOBJS}" != x ; then
     6508                CFLAGS="$CFLAGS -fno-inline"
     6509            fi
     6510
     6511            # XIM peeking works under XFree86.
     6512            cat >>confdefs.h <<\_ACEOF
     6513#define PEEK_XCLOSEIM 1
     6514_ACEOF
     6515
     6516
     6517            ;;
     6518        GNU*)
     6519            SHLIB_CFLAGS="-fPIC"
     6520            SHLIB_LD_LIBS='${LIBS}'
     6521            SHLIB_SUFFIX=".so"
     6522
     6523            if test "$have_dl" = yes; then
     6524                SHLIB_LD="${CC} -shared"
     6525                DL_OBJS=""
     6526                DL_LIBS="-ldl"
     6527                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     6528                CC_SEARCH_FLAGS=""
     6529                LD_SEARCH_FLAGS=""
     6530            else
     6531                if test "${ac_cv_header_dld_h+set}" = set; then
     6532  { $as_echo "$as_me:$LINENO: checking for dld.h" >&5
     6533$as_echo_n "checking for dld.h... " >&6; }
     6534if test "${ac_cv_header_dld_h+set}" = set; then
     6535  $as_echo_n "(cached) " >&6
     6536fi
     6537{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
     6538$as_echo "$ac_cv_header_dld_h" >&6; }
     6539else
     6540  # Is the header compilable?
     6541{ $as_echo "$as_me:$LINENO: checking dld.h usability" >&5
     6542$as_echo_n "checking dld.h usability... " >&6; }
     6543cat >conftest.$ac_ext <<_ACEOF
     6544/* confdefs.h.  */
     6545_ACEOF
     6546cat confdefs.h >>conftest.$ac_ext
     6547cat >>conftest.$ac_ext <<_ACEOF
     6548/* end confdefs.h.  */
     6549$ac_includes_default
     6550#include <dld.h>
     6551_ACEOF
     6552rm -f conftest.$ac_objext
     6553if { (ac_try="$ac_compile"
     6554case "(($ac_try" in
     6555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6556  *) ac_try_echo=$ac_try;;
     6557esac
     6558eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6559$as_echo "$ac_try_echo") >&5
     6560  (eval "$ac_compile") 2>conftest.er1
     6561  ac_status=$?
     6562  grep -v '^ *+' conftest.er1 >conftest.err
     6563  rm -f conftest.er1
     6564  cat conftest.err >&5
     6565  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6566  (exit $ac_status); } && {
     6567         test -z "$ac_cxx_werror_flag" ||
     6568         test ! -s conftest.err
     6569       } && test -s conftest.$ac_objext; then
     6570  ac_header_compiler=yes
     6571else
     6572  $as_echo "$as_me: failed program was:" >&5
     6573sed 's/^/| /' conftest.$ac_ext >&5
     6574
     6575        ac_header_compiler=no
     6576fi
     6577
     6578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     6579{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6580$as_echo "$ac_header_compiler" >&6; }
     6581
     6582# Is the header present?
     6583{ $as_echo "$as_me:$LINENO: checking dld.h presence" >&5
     6584$as_echo_n "checking dld.h presence... " >&6; }
     6585cat >conftest.$ac_ext <<_ACEOF
     6586/* confdefs.h.  */
     6587_ACEOF
     6588cat confdefs.h >>conftest.$ac_ext
     6589cat >>conftest.$ac_ext <<_ACEOF
     6590/* end confdefs.h.  */
     6591#include <dld.h>
     6592_ACEOF
     6593if { (ac_try="$ac_cpp conftest.$ac_ext"
     6594case "(($ac_try" in
     6595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6596  *) ac_try_echo=$ac_try;;
     6597esac
     6598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6599$as_echo "$ac_try_echo") >&5
     6600  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     6601  ac_status=$?
     6602  grep -v '^ *+' conftest.er1 >conftest.err
     6603  rm -f conftest.er1
     6604  cat conftest.err >&5
     6605  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6606  (exit $ac_status); } >/dev/null && {
     6607         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     6608         test ! -s conftest.err
     6609       }; then
     6610  ac_header_preproc=yes
     6611else
     6612  $as_echo "$as_me: failed program was:" >&5
     6613sed 's/^/| /' conftest.$ac_ext >&5
     6614
     6615  ac_header_preproc=no
     6616fi
     6617
     6618rm -f conftest.err conftest.$ac_ext
     6619{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6620$as_echo "$ac_header_preproc" >&6; }
     6621
     6622# So?  What about this header?
     6623case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     6624  yes:no: )
     6625    { $as_echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
     6626$as_echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6627    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
     6628$as_echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
     6629    ac_header_preproc=yes
     6630    ;;
     6631  no:yes:* )
     6632    { $as_echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
     6633$as_echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
     6634    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     check for missing prerequisite headers?" >&5
     6635$as_echo "$as_me: WARNING: dld.h:     check for missing prerequisite headers?" >&2;}
     6636    { $as_echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
     6637$as_echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
     6638    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&5
     6639$as_echo "$as_me: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     6640    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
     6641$as_echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
     6642    { $as_echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
     6643$as_echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
     6644    ( cat <<\_ASBOX
     6645## ----------------------------------- ##
     6646## Report this to rappture@nanohub.org ##
     6647## ----------------------------------- ##
     6648_ASBOX
     6649     ) | sed "s/^/$as_me: WARNING:     /" >&2
     6650    ;;
     6651esac
     6652{ $as_echo "$as_me:$LINENO: checking for dld.h" >&5
     6653$as_echo_n "checking for dld.h... " >&6; }
     6654if test "${ac_cv_header_dld_h+set}" = set; then
     6655  $as_echo_n "(cached) " >&6
     6656else
     6657  ac_cv_header_dld_h=$ac_header_preproc
     6658fi
     6659{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
     6660$as_echo "$ac_cv_header_dld_h" >&6; }
     6661
     6662fi
     6663if test $ac_cv_header_dld_h = yes; then
     6664
     6665                    SHLIB_LD="ld -shared"
     6666                    DL_OBJS=""
     6667                    DL_LIBS="-ldld"
     6668                    CC_SEARCH_FLAGS=""
     6669                    LD_SEARCH_FLAGS=""
     6670fi
     6671
     6672
     6673            fi
     6674            if test "`uname -m`" = "alpha" ; then
     6675                CFLAGS="$CFLAGS -mieee"
     6676            fi
     6677            ;;
     6678        Lynx*)
     6679            SHLIB_CFLAGS="-fPIC"
     6680            SHLIB_LD_LIBS='${LIBS}'
     6681            SHLIB_SUFFIX=".so"
     6682            CFLAGS_OPTIMIZE=-02
     6683            SHLIB_LD="${CC} -shared "
     6684            DL_OBJS="tclLoadDl.o"
     6685            DL_LIBS="-mshared -ldl"
     6686            LD_FLAGS="-Wl,--export-dynamic"
     6687            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6688            LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6689            ;;
     6690        MP-RAS-02*)
     6691            SHLIB_CFLAGS="-K PIC"
     6692            SHLIB_LD="cc -G"
     6693            SHLIB_LD_LIBS=""
     6694            SHLIB_SUFFIX=".so"
     6695            DL_OBJS="tclLoadDl.o"
     6696            DL_LIBS="-ldl"
     6697            CC_SEARCH_FLAGS=""
     6698            LD_SEARCH_FLAGS=""
     6699            ;;
     6700        MP-RAS-*)
     6701            SHLIB_CFLAGS="-K PIC"
     6702            SHLIB_LD="cc -G"
     6703            SHLIB_LD_LIBS=""
     6704            SHLIB_SUFFIX=".so"
     6705            DL_OBJS="tclLoadDl.o"
     6706            DL_LIBS="-ldl"
     6707            LDFLAGS="$LDFLAGS -Wl,-Bexport"
     6708            CC_SEARCH_FLAGS=""
     6709            LD_SEARCH_FLAGS=""
     6710            ;;
     6711        NetBSD-*|FreeBSD-[1-2].*)
     6712            # Not available on all versions:  check for include file.
     6713            if test "${ac_cv_header_dlfcn_h+set}" = set; then
     6714  { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
     6715$as_echo_n "checking for dlfcn.h... " >&6; }
     6716if test "${ac_cv_header_dlfcn_h+set}" = set; then
     6717  $as_echo_n "(cached) " >&6
     6718fi
     6719{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
     6720$as_echo "$ac_cv_header_dlfcn_h" >&6; }
     6721else
     6722  # Is the header compilable?
     6723{ $as_echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
     6724$as_echo_n "checking dlfcn.h usability... " >&6; }
     6725cat >conftest.$ac_ext <<_ACEOF
     6726/* confdefs.h.  */
     6727_ACEOF
     6728cat confdefs.h >>conftest.$ac_ext
     6729cat >>conftest.$ac_ext <<_ACEOF
     6730/* end confdefs.h.  */
     6731$ac_includes_default
     6732#include <dlfcn.h>
     6733_ACEOF
     6734rm -f conftest.$ac_objext
     6735if { (ac_try="$ac_compile"
     6736case "(($ac_try" in
     6737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6738  *) ac_try_echo=$ac_try;;
     6739esac
     6740eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6741$as_echo "$ac_try_echo") >&5
     6742  (eval "$ac_compile") 2>conftest.er1
     6743  ac_status=$?
     6744  grep -v '^ *+' conftest.er1 >conftest.err
     6745  rm -f conftest.er1
     6746  cat conftest.err >&5
     6747  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6748  (exit $ac_status); } && {
     6749         test -z "$ac_cxx_werror_flag" ||
     6750         test ! -s conftest.err
     6751       } && test -s conftest.$ac_objext; then
     6752  ac_header_compiler=yes
     6753else
     6754  $as_echo "$as_me: failed program was:" >&5
     6755sed 's/^/| /' conftest.$ac_ext >&5
     6756
     6757        ac_header_compiler=no
     6758fi
     6759
     6760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     6761{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6762$as_echo "$ac_header_compiler" >&6; }
     6763
     6764# Is the header present?
     6765{ $as_echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
     6766$as_echo_n "checking dlfcn.h presence... " >&6; }
     6767cat >conftest.$ac_ext <<_ACEOF
     6768/* confdefs.h.  */
     6769_ACEOF
     6770cat confdefs.h >>conftest.$ac_ext
     6771cat >>conftest.$ac_ext <<_ACEOF
     6772/* end confdefs.h.  */
     6773#include <dlfcn.h>
     6774_ACEOF
     6775if { (ac_try="$ac_cpp conftest.$ac_ext"
     6776case "(($ac_try" in
     6777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     6778  *) ac_try_echo=$ac_try;;
     6779esac
     6780eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     6781$as_echo "$ac_try_echo") >&5
     6782  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     6783  ac_status=$?
     6784  grep -v '^ *+' conftest.er1 >conftest.err
     6785  rm -f conftest.er1
     6786  cat conftest.err >&5
     6787  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6788  (exit $ac_status); } >/dev/null && {
     6789         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     6790         test ! -s conftest.err
     6791       }; then
     6792  ac_header_preproc=yes
     6793else
     6794  $as_echo "$as_me: failed program was:" >&5
     6795sed 's/^/| /' conftest.$ac_ext >&5
     6796
     6797  ac_header_preproc=no
     6798fi
     6799
     6800rm -f conftest.err conftest.$ac_ext
     6801{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6802$as_echo "$ac_header_preproc" >&6; }
     6803
     6804# So?  What about this header?
     6805case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     6806  yes:no: )
     6807    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
     6808$as_echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6809    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
     6810$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
     6811    ac_header_preproc=yes
     6812    ;;
     6813  no:yes:* )
     6814    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
     6815$as_echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
     6816    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
     6817$as_echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
     6818    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
     6819$as_echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
     6820    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
     6821$as_echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     6822    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
     6823$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
     6824    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
     6825$as_echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
     6826    ( cat <<\_ASBOX
     6827## ----------------------------------- ##
     6828## Report this to rappture@nanohub.org ##
     6829## ----------------------------------- ##
     6830_ASBOX
     6831     ) | sed "s/^/$as_me: WARNING:     /" >&2
     6832    ;;
     6833esac
     6834{ $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
     6835$as_echo_n "checking for dlfcn.h... " >&6; }
     6836if test "${ac_cv_header_dlfcn_h+set}" = set; then
     6837  $as_echo_n "(cached) " >&6
     6838else
     6839  ac_cv_header_dlfcn_h=$ac_header_preproc
     6840fi
     6841{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
     6842$as_echo "$ac_cv_header_dlfcn_h" >&6; }
     6843
     6844fi
     6845if test $ac_cv_header_dlfcn_h = yes; then
     6846
     6847                # NetBSD/SPARC needs -fPIC, -fpic will not do.
     6848                SHLIB_CFLAGS="-fPIC"
     6849                SHLIB_LD="ld -Bshareable -x"
     6850                SHLIB_LD_LIBS='${LIBS}'
     6851                SHLIB_SUFFIX=".so"
     6852                DL_OBJS="tclLoadDl.o"
     6853                DL_LIBS=""
     6854                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6855                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     6856                { $as_echo "$as_me:$LINENO: checking for ELF" >&5
     6857$as_echo_n "checking for ELF... " >&6; }
     6858if test "${tcl_cv_ld_elf+set}" = set; then
     6859  $as_echo_n "(cached) " >&6
     6860else
     6861
     6862                    cat >conftest.$ac_ext <<_ACEOF
     6863/* confdefs.h.  */
     6864_ACEOF
     6865cat confdefs.h >>conftest.$ac_ext
     6866cat >>conftest.$ac_ext <<_ACEOF
     6867/* end confdefs.h.  */
     6868
     6869#ifdef __ELF__
     6870        yes
     6871#endif
     6872
     6873_ACEOF
     6874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     6875  $EGREP "yes" >/dev/null 2>&1; then
     6876  tcl_cv_ld_elf=yes
     6877else
     6878  tcl_cv_ld_elf=no
     6879fi
     6880rm -f conftest*
     6881
     6882fi
     6883{ $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
     6884$as_echo "$tcl_cv_ld_elf" >&6; }
     6885                if test $tcl_cv_ld_elf = yes; then
     6886                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     6887                else
     6888                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     6889                fi
     6890
     6891else
     6892
     6893                SHLIB_CFLAGS=""
     6894                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     6895                SHLIB_LD_LIBS='${LIBS}'
     6896                SHLIB_SUFFIX=".a"
     6897                DL_OBJS="tclLoadAout.o"
     6898                DL_LIBS=""
     6899                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     6900                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6901                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     6902
     6903fi
     6904
     6905
     6906
     6907            # FreeBSD doesn't handle version numbers with dots.
     6908
     6909            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     6910            TCL_LIB_VERSIONS_OK=nodots
     6911            ;;
     6912        OpenBSD-*)
     6913            case `arch -s` in
     6914            m88k|vax)
     6915                SHLIB_CFLAGS=""
     6916                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     6917                SHLIB_LD_LIBS='${LIBS}'
     6918                SHLIB_SUFFIX=".a"
     6919                DL_OBJS="tclLoadAout.o"
     6920                DL_LIBS=""
     6921                LDFLAGS=""
     6922                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     6923                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6924                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     6925                ;;
     6926            *)
     6927                # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
     6928                case `machine` in
     6929                sparc|sparc64)
     6930                    SHLIB_CFLAGS="-fPIC";;
     6931                *)
     6932                    SHLIB_CFLAGS="-fpic";;
     6933                esac
     6934                SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
     6935                SHLIB_LD_LIBS='${LIBS}'
     6936                SHLIB_SUFFIX=".so"
     6937                DL_OBJS="tclLoadDl.o"
     6938                DL_LIBS=""
     6939                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6940                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     6941                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     6942                { $as_echo "$as_me:$LINENO: checking for ELF" >&5
     6943$as_echo_n "checking for ELF... " >&6; }
     6944if test "${tcl_cv_ld_elf+set}" = set; then
     6945  $as_echo_n "(cached) " >&6
     6946else
     6947
     6948                    cat >conftest.$ac_ext <<_ACEOF
     6949/* confdefs.h.  */
     6950_ACEOF
     6951cat confdefs.h >>conftest.$ac_ext
     6952cat >>conftest.$ac_ext <<_ACEOF
     6953/* end confdefs.h.  */
     6954
     6955#ifdef __ELF__
     6956        yes
     6957#endif
     6958
     6959_ACEOF
     6960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     6961  $EGREP "yes" >/dev/null 2>&1; then
     6962  tcl_cv_ld_elf=yes
     6963else
     6964  tcl_cv_ld_elf=no
     6965fi
     6966rm -f conftest*
     6967
     6968fi
     6969{ $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
     6970$as_echo "$tcl_cv_ld_elf" >&6; }
     6971                if test $tcl_cv_ld_elf = yes; then
     6972                    LDFLAGS=-Wl,-export-dynamic
     6973                else
     6974                    LDFLAGS=""
     6975                fi
     6976                ;;
     6977            esac
     6978
     6979            # OpenBSD doesn't do version numbers with dots.
     6980            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     6981            TCL_LIB_VERSIONS_OK=nodots
     6982            ;;
     6983        FreeBSD-*)
     6984            # FreeBSD 3.* and greater have ELF.
     6985            SHLIB_CFLAGS="-fPIC"
     6986            SHLIB_LD="ld -Bshareable -x"
     6987            SHLIB_LD_LIBS='${LIBS}'
     6988            SHLIB_SUFFIX=".so"
     6989            DL_OBJS="tclLoadDl.o"
     6990            DL_LIBS=""
     6991            LDFLAGS="$LDFLAGS -export-dynamic"
     6992            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     6993            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     6994            if test "${TCL_THREADS}" = "1" ; then
     6995                # The -pthread needs to go in the CFLAGS, not LIBS
     6996                LIBS=`echo $LIBS | sed s/-pthread//`
     6997                CFLAGS="$CFLAGS -pthread"
     6998                LDFLAGS="$LDFLAGS -pthread"
     6999            fi
     7000            case $system in
     7001            FreeBSD-3.*)
     7002                # FreeBSD-3 doesn't handle version numbers with dots.
     7003                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     7004                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     7005                TCL_LIB_VERSIONS_OK=nodots
     7006                ;;
     7007            esac
     7008            ;;
     7009        Darwin-*)
     7010            CFLAGS_OPTIMIZE="-Os"
     7011            SHLIB_CFLAGS="-fno-common"
     7012            # To avoid discrepancies between what headers configure sees during
     7013            # preprocessing tests and compiling tests, move any -isysroot and
     7014            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
     7015            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
     7016                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     7017                if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
     7018            CFLAGS="`echo " ${CFLAGS}" | \
     7019                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     7020                if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
     7021            if test $do64bit = yes; then
     7022                case `arch` in
     7023                    ppc)
     7024                        { $as_echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
     7025$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
     7026if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
     7027  $as_echo_n "(cached) " >&6
     7028else
     7029
     7030                            hold_cflags=$CFLAGS
     7031                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     7032                            cat >conftest.$ac_ext <<_ACEOF
     7033/* confdefs.h.  */
     7034_ACEOF
     7035cat confdefs.h >>conftest.$ac_ext
     7036cat >>conftest.$ac_ext <<_ACEOF
     7037/* end confdefs.h.  */
     7038
     7039int
     7040main ()
     7041{
     7042
     7043  ;
     7044  return 0;
     7045}
     7046_ACEOF
     7047rm -f conftest.$ac_objext conftest$ac_exeext
     7048if { (ac_try="$ac_link"
     7049case "(($ac_try" in
     7050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7051  *) ac_try_echo=$ac_try;;
     7052esac
     7053eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7054$as_echo "$ac_try_echo") >&5
     7055  (eval "$ac_link") 2>conftest.er1
     7056  ac_status=$?
     7057  grep -v '^ *+' conftest.er1 >conftest.err
     7058  rm -f conftest.er1
     7059  cat conftest.err >&5
     7060  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7061  (exit $ac_status); } && {
     7062         test -z "$ac_cxx_werror_flag" ||
     7063         test ! -s conftest.err
     7064       } && test -s conftest$ac_exeext && {
     7065         test "$cross_compiling" = yes ||
     7066         $as_test_x conftest$ac_exeext
     7067       }; then
     7068  tcl_cv_cc_arch_ppc64=yes
     7069else
     7070  $as_echo "$as_me: failed program was:" >&5
     7071sed 's/^/| /' conftest.$ac_ext >&5
     7072
     7073        tcl_cv_cc_arch_ppc64=no
     7074fi
     7075
     7076rm -rf conftest.dSYM
     7077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7078      conftest$ac_exeext conftest.$ac_ext
     7079                            CFLAGS=$hold_cflags
     7080fi
     7081{ $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
     7082$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
     7083                        if test $tcl_cv_cc_arch_ppc64 = yes; then
     7084                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     7085                            do64bit_ok=yes
     7086                        fi;;
     7087                    i386)
     7088                        { $as_echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
     7089$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
     7090if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
     7091  $as_echo_n "(cached) " >&6
     7092else
     7093
     7094                            hold_cflags=$CFLAGS
     7095                            CFLAGS="$CFLAGS -arch x86_64"
     7096                            cat >conftest.$ac_ext <<_ACEOF
     7097/* confdefs.h.  */
     7098_ACEOF
     7099cat confdefs.h >>conftest.$ac_ext
     7100cat >>conftest.$ac_ext <<_ACEOF
     7101/* end confdefs.h.  */
     7102
     7103int
     7104main ()
     7105{
     7106
     7107  ;
     7108  return 0;
     7109}
     7110_ACEOF
     7111rm -f conftest.$ac_objext conftest$ac_exeext
     7112if { (ac_try="$ac_link"
     7113case "(($ac_try" in
     7114  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7115  *) ac_try_echo=$ac_try;;
     7116esac
     7117eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7118$as_echo "$ac_try_echo") >&5
     7119  (eval "$ac_link") 2>conftest.er1
     7120  ac_status=$?
     7121  grep -v '^ *+' conftest.er1 >conftest.err
     7122  rm -f conftest.er1
     7123  cat conftest.err >&5
     7124  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7125  (exit $ac_status); } && {
     7126         test -z "$ac_cxx_werror_flag" ||
     7127         test ! -s conftest.err
     7128       } && test -s conftest$ac_exeext && {
     7129         test "$cross_compiling" = yes ||
     7130         $as_test_x conftest$ac_exeext
     7131       }; then
     7132  tcl_cv_cc_arch_x86_64=yes
     7133else
     7134  $as_echo "$as_me: failed program was:" >&5
     7135sed 's/^/| /' conftest.$ac_ext >&5
     7136
     7137        tcl_cv_cc_arch_x86_64=no
     7138fi
     7139
     7140rm -rf conftest.dSYM
     7141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7142      conftest$ac_exeext conftest.$ac_ext
     7143                            CFLAGS=$hold_cflags
     7144fi
     7145{ $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
     7146$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
     7147                        if test $tcl_cv_cc_arch_x86_64 = yes; then
     7148                            CFLAGS="$CFLAGS -arch x86_64"
     7149                            do64bit_ok=yes
     7150                        fi;;
     7151                    *)
     7152                        { $as_echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
     7153$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
     7154                esac
     7155            else
     7156                # Check for combined 32-bit and 64-bit fat build
     7157                echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
     7158                    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
     7159                    fat_32_64=yes
     7160            fi
     7161            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
     7162            { $as_echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
     7163$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
     7164if test "${tcl_cv_ld_single_module+set}" = set; then
     7165  $as_echo_n "(cached) " >&6
     7166else
     7167
     7168                hold_ldflags=$LDFLAGS
     7169                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
     7170                cat >conftest.$ac_ext <<_ACEOF
     7171/* confdefs.h.  */
     7172_ACEOF
     7173cat confdefs.h >>conftest.$ac_ext
     7174cat >>conftest.$ac_ext <<_ACEOF
     7175/* end confdefs.h.  */
     7176
     7177int
     7178main ()
     7179{
     7180int i;
     7181  ;
     7182  return 0;
     7183}
     7184_ACEOF
     7185rm -f conftest.$ac_objext conftest$ac_exeext
     7186if { (ac_try="$ac_link"
     7187case "(($ac_try" in
     7188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7189  *) ac_try_echo=$ac_try;;
     7190esac
     7191eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7192$as_echo "$ac_try_echo") >&5
     7193  (eval "$ac_link") 2>conftest.er1
     7194  ac_status=$?
     7195  grep -v '^ *+' conftest.er1 >conftest.err
     7196  rm -f conftest.er1
     7197  cat conftest.err >&5
     7198  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7199  (exit $ac_status); } && {
     7200         test -z "$ac_cxx_werror_flag" ||
     7201         test ! -s conftest.err
     7202       } && test -s conftest$ac_exeext && {
     7203         test "$cross_compiling" = yes ||
     7204         $as_test_x conftest$ac_exeext
     7205       }; then
     7206  tcl_cv_ld_single_module=yes
     7207else
     7208  $as_echo "$as_me: failed program was:" >&5
     7209sed 's/^/| /' conftest.$ac_ext >&5
     7210
     7211        tcl_cv_ld_single_module=no
     7212fi
     7213
     7214rm -rf conftest.dSYM
     7215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7216      conftest$ac_exeext conftest.$ac_ext
     7217                LDFLAGS=$hold_ldflags
     7218fi
     7219{ $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
     7220$as_echo "$tcl_cv_ld_single_module" >&6; }
     7221            if test $tcl_cv_ld_single_module = yes; then
     7222                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
     7223            fi
     7224            SHLIB_LD_LIBS='${LIBS}'
     7225            SHLIB_SUFFIX=".dylib"
     7226            DL_OBJS="tclLoadDyld.o"
     7227            DL_LIBS=""
     7228            # Don't use -prebind when building for Mac OS X 10.4 or later only:
     7229            test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
     7230                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
     7231                LDFLAGS="$LDFLAGS -prebind"
     7232            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
     7233            { $as_echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
     7234$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
     7235if test "${tcl_cv_ld_search_paths_first+set}" = set; then
     7236  $as_echo_n "(cached) " >&6
     7237else
     7238
     7239                hold_ldflags=$LDFLAGS
     7240                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     7241                cat >conftest.$ac_ext <<_ACEOF
     7242/* confdefs.h.  */
     7243_ACEOF
     7244cat confdefs.h >>conftest.$ac_ext
     7245cat >>conftest.$ac_ext <<_ACEOF
     7246/* end confdefs.h.  */
     7247
     7248int
     7249main ()
     7250{
     7251int i;
     7252  ;
     7253  return 0;
     7254}
     7255_ACEOF
     7256rm -f conftest.$ac_objext conftest$ac_exeext
     7257if { (ac_try="$ac_link"
     7258case "(($ac_try" in
     7259  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7260  *) ac_try_echo=$ac_try;;
     7261esac
     7262eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7263$as_echo "$ac_try_echo") >&5
     7264  (eval "$ac_link") 2>conftest.er1
     7265  ac_status=$?
     7266  grep -v '^ *+' conftest.er1 >conftest.err
     7267  rm -f conftest.er1
     7268  cat conftest.err >&5
     7269  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7270  (exit $ac_status); } && {
     7271         test -z "$ac_cxx_werror_flag" ||
     7272         test ! -s conftest.err
     7273       } && test -s conftest$ac_exeext && {
     7274         test "$cross_compiling" = yes ||
     7275         $as_test_x conftest$ac_exeext
     7276       }; then
     7277  tcl_cv_ld_search_paths_first=yes
     7278else
     7279  $as_echo "$as_me: failed program was:" >&5
     7280sed 's/^/| /' conftest.$ac_ext >&5
     7281
     7282        tcl_cv_ld_search_paths_first=no
     7283fi
     7284
     7285rm -rf conftest.dSYM
     7286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7287      conftest$ac_exeext conftest.$ac_ext
     7288                LDFLAGS=$hold_ldflags
     7289fi
     7290{ $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
     7291$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
     7292            if test $tcl_cv_ld_search_paths_first = yes; then
     7293                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     7294            fi
     7295            CC_SEARCH_FLAGS=""
     7296            LD_SEARCH_FLAGS=""
     7297            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
     7298            PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
     7299            PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
     7300            { $as_echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
     7301$as_echo_n "checking whether to use CoreFoundation... " >&6; }
     7302            # Check whether --enable-corefoundation was given.
     7303if test "${enable_corefoundation+set}" = set; then
     7304  enableval=$enable_corefoundation; tcl_corefoundation=$enableval
     7305else
     7306  tcl_corefoundation=yes
     7307fi
     7308
     7309            { $as_echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
     7310$as_echo "$tcl_corefoundation" >&6; }
     7311            if test $tcl_corefoundation = yes; then
     7312                { $as_echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
     7313$as_echo_n "checking for CoreFoundation.framework... " >&6; }
     7314if test "${tcl_cv_lib_corefoundation+set}" = set; then
     7315  $as_echo_n "(cached) " >&6
     7316else
     7317
     7318                    hold_libs=$LIBS
     7319                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     7320                        # On Tiger there is no 64-bit CF, so remove 64-bit archs
     7321                        # from CFLAGS et al. while testing for presence of CF.
     7322                        # 64-bit CF is disabled in tclUnixPort.h if necessary.
     7323                        eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
     7324                    done; fi
     7325                    LIBS="$LIBS -framework CoreFoundation"
     7326                    cat >conftest.$ac_ext <<_ACEOF
     7327/* confdefs.h.  */
     7328_ACEOF
     7329cat confdefs.h >>conftest.$ac_ext
     7330cat >>conftest.$ac_ext <<_ACEOF
     7331/* end confdefs.h.  */
     7332#include <CoreFoundation/CoreFoundation.h>
     7333int
     7334main ()
     7335{
     7336CFBundleRef b = CFBundleGetMainBundle();
     7337  ;
     7338  return 0;
     7339}
     7340_ACEOF
     7341rm -f conftest.$ac_objext conftest$ac_exeext
     7342if { (ac_try="$ac_link"
     7343case "(($ac_try" in
     7344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7345  *) ac_try_echo=$ac_try;;
     7346esac
     7347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7348$as_echo "$ac_try_echo") >&5
     7349  (eval "$ac_link") 2>conftest.er1
     7350  ac_status=$?
     7351  grep -v '^ *+' conftest.er1 >conftest.err
     7352  rm -f conftest.er1
     7353  cat conftest.err >&5
     7354  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7355  (exit $ac_status); } && {
     7356         test -z "$ac_cxx_werror_flag" ||
     7357         test ! -s conftest.err
     7358       } && test -s conftest$ac_exeext && {
     7359         test "$cross_compiling" = yes ||
     7360         $as_test_x conftest$ac_exeext
     7361       }; then
     7362  tcl_cv_lib_corefoundation=yes
     7363else
     7364  $as_echo "$as_me: failed program was:" >&5
     7365sed 's/^/| /' conftest.$ac_ext >&5
     7366
     7367        tcl_cv_lib_corefoundation=no
     7368fi
     7369
     7370rm -rf conftest.dSYM
     7371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7372      conftest$ac_exeext conftest.$ac_ext
     7373                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     7374                        eval $v'="$hold_'$v'"'
     7375                    done; fi; LIBS=$hold_libs
     7376fi
     7377{ $as_echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
     7378$as_echo "$tcl_cv_lib_corefoundation" >&6; }
     7379                if test $tcl_cv_lib_corefoundation = yes; then
     7380                    LIBS="$LIBS -framework CoreFoundation"
     7381                    cat >>confdefs.h <<\_ACEOF
     7382#define HAVE_COREFOUNDATION 1
     7383_ACEOF
     7384
     7385                else
     7386                    tcl_corefoundation=no
     7387                fi
     7388                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
     7389                    { $as_echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
     7390$as_echo_n "checking for 64-bit CoreFoundation... " >&6; }
     7391if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
     7392  $as_echo_n "(cached) " >&6
     7393else
     7394
     7395                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     7396                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
     7397                        done
     7398                        cat >conftest.$ac_ext <<_ACEOF
     7399/* confdefs.h.  */
     7400_ACEOF
     7401cat confdefs.h >>conftest.$ac_ext
     7402cat >>conftest.$ac_ext <<_ACEOF
     7403/* end confdefs.h.  */
     7404#include <CoreFoundation/CoreFoundation.h>
     7405int
     7406main ()
     7407{
     7408CFBundleRef b = CFBundleGetMainBundle();
     7409  ;
     7410  return 0;
     7411}
     7412_ACEOF
     7413rm -f conftest.$ac_objext conftest$ac_exeext
     7414if { (ac_try="$ac_link"
     7415case "(($ac_try" in
     7416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7417  *) ac_try_echo=$ac_try;;
     7418esac
     7419eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7420$as_echo "$ac_try_echo") >&5
     7421  (eval "$ac_link") 2>conftest.er1
     7422  ac_status=$?
     7423  grep -v '^ *+' conftest.er1 >conftest.err
     7424  rm -f conftest.er1
     7425  cat conftest.err >&5
     7426  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7427  (exit $ac_status); } && {
     7428         test -z "$ac_cxx_werror_flag" ||
     7429         test ! -s conftest.err
     7430       } && test -s conftest$ac_exeext && {
     7431         test "$cross_compiling" = yes ||
     7432         $as_test_x conftest$ac_exeext
     7433       }; then
     7434  tcl_cv_lib_corefoundation_64=yes
     7435else
     7436  $as_echo "$as_me: failed program was:" >&5
     7437sed 's/^/| /' conftest.$ac_ext >&5
     7438
     7439        tcl_cv_lib_corefoundation_64=no
     7440fi
     7441
     7442rm -rf conftest.dSYM
     7443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7444      conftest$ac_exeext conftest.$ac_ext
     7445                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     7446                            eval $v'="$hold_'$v'"'
     7447                        done
     7448fi
     7449{ $as_echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
     7450$as_echo "$tcl_cv_lib_corefoundation_64" >&6; }
     7451                    if test $tcl_cv_lib_corefoundation_64 = no; then
     7452                        cat >>confdefs.h <<\_ACEOF
     7453#define NO_COREFOUNDATION_64 1
     7454_ACEOF
     7455
     7456                    fi
     7457                fi
     7458            fi
     7459            cat >>confdefs.h <<\_ACEOF
     7460#define MAC_OSX_TCL 1
     7461_ACEOF
     7462
     7463            ;;
     7464        NEXTSTEP-*)
     7465            SHLIB_CFLAGS=""
     7466            SHLIB_LD="cc -nostdlib -r"
     7467            SHLIB_LD_LIBS=""
     7468            SHLIB_SUFFIX=".so"
     7469            DL_OBJS="tclLoadNext.o"
     7470            DL_LIBS=""
     7471            CC_SEARCH_FLAGS=""
     7472            LD_SEARCH_FLAGS=""
     7473            ;;
     7474        OS/390-*)
     7475            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
     7476            cat >>confdefs.h <<\_ACEOF
     7477#define _OE_SOCKETS 1
     7478_ACEOF
     7479        # needed in sys/socket.h
     7480            ;;
     7481        OSF1-1.0|OSF1-1.1|OSF1-1.2)
     7482            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
     7483            SHLIB_CFLAGS=""
     7484            # Hack: make package name same as library name
     7485            SHLIB_LD='ld -R -export :'
     7486            SHLIB_LD_LIBS=""
     7487            SHLIB_SUFFIX=".so"
     7488            DL_OBJS="tclLoadOSF.o"
     7489            DL_LIBS=""
     7490            CC_SEARCH_FLAGS=""
     7491            LD_SEARCH_FLAGS=""
     7492            ;;
     7493        OSF1-1.*)
     7494            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
     7495            SHLIB_CFLAGS="-fPIC"
     7496            if test "$SHARED_BUILD" = "1" ; then
     7497                SHLIB_LD="ld -shared"
     7498            else
     7499                SHLIB_LD="ld -non_shared"
     7500            fi
     7501            SHLIB_LD_LIBS=""
     7502            SHLIB_SUFFIX=".so"
     7503            DL_OBJS="tclLoadDl.o"
     7504            DL_LIBS=""
     7505            CC_SEARCH_FLAGS=""
     7506            LD_SEARCH_FLAGS=""
     7507            ;;
     7508        OSF1-V*)
     7509            # Digital OSF/1
     7510            SHLIB_CFLAGS=""
     7511            if test "$SHARED_BUILD" = "1" ; then
     7512                SHLIB_LD='ld -shared -expect_unresolved "*"'
     7513            else
     7514                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
     7515            fi
     7516            SHLIB_LD_LIBS=""
     7517            SHLIB_SUFFIX=".so"
     7518            DL_OBJS="tclLoadDl.o"
     7519            DL_LIBS=""
     7520            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     7521            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     7522            if test "$GCC" = "yes" ; then
     7523                CFLAGS="$CFLAGS -mieee"
     7524            else
     7525                CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
     7526            fi
     7527            # see pthread_intro(3) for pthread support on osf1, k.furukawa
     7528            if test "${TCL_THREADS}" = "1" ; then
     7529                CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
     7530                CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
     7531                LIBS=`echo $LIBS | sed s/-lpthreads//`
     7532                if test "$GCC" = "yes" ; then
     7533                    LIBS="$LIBS -lpthread -lmach -lexc"
     7534                else
     7535                    CFLAGS="$CFLAGS -pthread"
     7536                    LDFLAGS="$LDFLAGS -pthread"
     7537                fi
     7538            fi
     7539
     7540            ;;
     7541        QNX-6*)
     7542            # QNX RTP
     7543            # This may work for all QNX, but it was only reported for v6.
     7544            SHLIB_CFLAGS="-fPIC"
     7545            SHLIB_LD="ld -Bshareable -x"
     7546            SHLIB_LD_LIBS=""
     7547            SHLIB_SUFFIX=".so"
     7548            DL_OBJS="tclLoadDl.o"
     7549            # dlopen is in -lc on QNX
     7550            DL_LIBS=""
     7551            CC_SEARCH_FLAGS=""
     7552            LD_SEARCH_FLAGS=""
     7553            ;;
     7554        RISCos-*)
     7555            SHLIB_CFLAGS="-G 0"
     7556            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     7557            SHLIB_LD_LIBS='${LIBS}'
     7558            SHLIB_SUFFIX=".a"
     7559            DL_OBJS="tclLoadAout.o"
     7560            DL_LIBS=""
     7561            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     7562            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     7563            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7564            ;;
     7565        SCO_SV-3.2*)
     7566            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
     7567            # this test works, since "uname -s" was non-standard in 3.2.4 and
     7568            # below.
     7569            if test "$GCC" = "yes" ; then
     7570                SHLIB_CFLAGS="-fPIC -melf"
     7571                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
     7572            else
     7573                SHLIB_CFLAGS="-Kpic -belf"
     7574                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
     7575            fi
     7576            SHLIB_LD="ld -G"
     7577            SHLIB_LD_LIBS=""
     7578            SHLIB_SUFFIX=".so"
     7579            DL_OBJS="tclLoadDl.o"
     7580            DL_LIBS=""
     7581            CC_SEARCH_FLAGS=""
     7582            LD_SEARCH_FLAGS=""
     7583            ;;
     7584        SINIX*5.4*)
     7585            SHLIB_CFLAGS="-K PIC"
     7586            SHLIB_LD="cc -G"
     7587            SHLIB_LD_LIBS=""
     7588            SHLIB_SUFFIX=".so"
     7589            DL_OBJS="tclLoadDl.o"
     7590            DL_LIBS="-ldl"
     7591            CC_SEARCH_FLAGS=""
     7592            LD_SEARCH_FLAGS=""
     7593            ;;
     7594        SunOS-4*)
     7595            SHLIB_CFLAGS="-PIC"
     7596            SHLIB_LD="ld"
     7597            SHLIB_LD_LIBS=""
     7598            SHLIB_SUFFIX=".so"
     7599            DL_OBJS="tclLoadDl.o"
     7600            DL_LIBS="-ldl"
     7601            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     7602            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7603
     7604            # SunOS can't handle version numbers with dots in them in library
     7605            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
     7606            # requires an extra version number at the end of .so file names.
     7607            # So, the library has to have a name like libtcl75.so.1.0
     7608
     7609            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     7610            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     7611            TCL_LIB_VERSIONS_OK=nodots
     7612            ;;
     7613        SunOS-5.[0-6])
     7614            # Careful to not let 5.10+ fall into this case
     7615
     7616            # Note: If _REENTRANT isn't defined, then Solaris
     7617            # won't define thread-safe library routines.
     7618
     7619            cat >>confdefs.h <<\_ACEOF
     7620#define _REENTRANT 1
     7621_ACEOF
     7622
     7623            cat >>confdefs.h <<\_ACEOF
     7624#define _POSIX_PTHREAD_SEMANTICS 1
     7625_ACEOF
     7626
     7627
     7628            SHLIB_CFLAGS="-KPIC"
     7629
     7630            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     7631            # symbols when dynamically loaded into tclsh.
     7632
     7633            SHLIB_LD_LIBS='${LIBS}'
     7634            SHLIB_SUFFIX=".so"
     7635            DL_OBJS="tclLoadDl.o"
     7636            DL_LIBS="-ldl"
     7637            if test "$GCC" = "yes" ; then
     7638                SHLIB_LD="$CC -shared"
     7639                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     7640                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7641            else
     7642                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     7643                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     7644                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7645            fi
     7646            ;;
     7647        SunOS-5*)
     7648            # Note: If _REENTRANT isn't defined, then Solaris
     7649            # won't define thread-safe library routines.
     7650
     7651            cat >>confdefs.h <<\_ACEOF
     7652#define _REENTRANT 1
     7653_ACEOF
     7654
     7655            cat >>confdefs.h <<\_ACEOF
     7656#define _POSIX_PTHREAD_SEMANTICS 1
     7657_ACEOF
     7658
     7659
     7660            SHLIB_CFLAGS="-KPIC"
     7661
     7662            # Check to enable 64-bit flags for compiler/linker
     7663            if test "$do64bit" = "yes" ; then
     7664                arch=`isainfo`
     7665                if test "$arch" = "sparcv9 sparc" ; then
     7666                        if test "$GCC" = "yes" ; then
     7667                            if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
     7668                                { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
     7669$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
     7670                            else
     7671                                do64bit_ok=yes
     7672                                CFLAGS="$CFLAGS -m64 -mcpu=v9"
     7673                                LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
     7674                                SHLIB_CFLAGS="-fPIC"
     7675                            fi
     7676                        else
     7677                            do64bit_ok=yes
     7678                            if test "$do64bitVIS" = "yes" ; then
     7679                                CFLAGS="$CFLAGS -xarch=v9a"
     7680                                LDFLAGS="$LDFLAGS -xarch=v9a"
     7681                            else
     7682                                CFLAGS="$CFLAGS -xarch=v9"
     7683                                LDFLAGS="$LDFLAGS -xarch=v9"
     7684                            fi
     7685                            # Solaris 64 uses this as well
     7686                            #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
     7687                        fi
     7688                elif test "$arch" = "amd64 i386" ; then
     7689                    if test "$GCC" = "yes" ; then
     7690                        { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     7691$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     7692                    else
     7693                        do64bit_ok=yes
     7694                        CFLAGS="$CFLAGS -xarch=amd64"
     7695                        LDFLAGS="$LDFLAGS -xarch=amd64"
     7696                    fi
     7697                else
     7698                    { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
     7699$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
     7700                fi
     7701            fi
     7702
     7703            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     7704            # symbols when dynamically loaded into tclsh.
     7705
     7706            SHLIB_LD_LIBS='${LIBS}'
     7707            SHLIB_SUFFIX=".so"
     7708            DL_OBJS="tclLoadDl.o"
     7709            DL_LIBS="-ldl"
     7710            if test "$GCC" = "yes" ; then
     7711                SHLIB_LD="$CC -shared"
     7712                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     7713                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7714                if test "$do64bit_ok" = "yes" ; then
     7715                    # We need to specify -static-libgcc or we need to
     7716                    # add the path to the sparv9 libgcc.
     7717                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
     7718                    # for finding sparcv9 libgcc, get the regular libgcc
     7719                    # path, remove so name and append 'sparcv9'
     7720                    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
     7721                    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
     7722                fi
     7723            else
     7724                case $system in
     7725                    SunOS-5.[1-9][0-9]*)
     7726                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
     7727                    *)
     7728                        SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
     7729                esac
     7730                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     7731                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     7732            fi
     7733            ;;
     7734        ULTRIX-4.*)
     7735            SHLIB_CFLAGS="-G 0"
     7736            SHLIB_SUFFIX=".a"
     7737            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     7738            SHLIB_LD_LIBS='${LIBS}'
     7739            DL_OBJS="tclLoadAout.o"
     7740            DL_LIBS=""
     7741            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     7742            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     7743            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     7744            if test "$GCC" != "yes" ; then
     7745                CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
     7746            fi
     7747            ;;
     7748        UNIX_SV* | UnixWare-5*)
     7749            SHLIB_CFLAGS="-KPIC"
     7750            SHLIB_LD="cc -G"
     7751            SHLIB_LD_LIBS=""
     7752            SHLIB_SUFFIX=".so"
     7753            DL_OBJS="tclLoadDl.o"
     7754            DL_LIBS="-ldl"
     7755            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
     7756            # that don't grok the -Bexport option.  Test that it does.
     7757            { $as_echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
     7758$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
     7759if test "${tcl_cv_ld_Bexport+set}" = set; then
     7760  $as_echo_n "(cached) " >&6
     7761else
     7762
     7763                hold_ldflags=$LDFLAGS
     7764                LDFLAGS="$LDFLAGS -Wl,-Bexport"
     7765                cat >conftest.$ac_ext <<_ACEOF
     7766/* confdefs.h.  */
     7767_ACEOF
     7768cat confdefs.h >>conftest.$ac_ext
     7769cat >>conftest.$ac_ext <<_ACEOF
     7770/* end confdefs.h.  */
     7771
     7772int
     7773main ()
     7774{
     7775int i;
     7776  ;
     7777  return 0;
     7778}
     7779_ACEOF
     7780rm -f conftest.$ac_objext conftest$ac_exeext
     7781if { (ac_try="$ac_link"
     7782case "(($ac_try" in
     7783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7784  *) ac_try_echo=$ac_try;;
     7785esac
     7786eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7787$as_echo "$ac_try_echo") >&5
     7788  (eval "$ac_link") 2>conftest.er1
     7789  ac_status=$?
     7790  grep -v '^ *+' conftest.er1 >conftest.err
     7791  rm -f conftest.er1
     7792  cat conftest.err >&5
     7793  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7794  (exit $ac_status); } && {
     7795         test -z "$ac_cxx_werror_flag" ||
     7796         test ! -s conftest.err
     7797       } && test -s conftest$ac_exeext && {
     7798         test "$cross_compiling" = yes ||
     7799         $as_test_x conftest$ac_exeext
     7800       }; then
     7801  tcl_cv_ld_Bexport=yes
     7802else
     7803  $as_echo "$as_me: failed program was:" >&5
     7804sed 's/^/| /' conftest.$ac_ext >&5
     7805
     7806        tcl_cv_ld_Bexport=no
     7807fi
     7808
     7809rm -rf conftest.dSYM
     7810rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     7811      conftest$ac_exeext conftest.$ac_ext
     7812                LDFLAGS=$hold_ldflags
     7813fi
     7814{ $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
     7815$as_echo "$tcl_cv_ld_Bexport" >&6; }
     7816            if test $tcl_cv_ld_Bexport = yes; then
     7817                LDFLAGS="$LDFLAGS -Wl,-Bexport"
     7818            fi
     7819            CC_SEARCH_FLAGS=""
     7820            LD_SEARCH_FLAGS=""
     7821            ;;
     7822    esac
     7823
     7824    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
     7825        { $as_echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
     7826$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
     7827    fi
     7828
     7829
     7830
     7831
     7832    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
     7833    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
     7834    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
     7835    # to determine which of several header files defines the a.out file
     7836    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
     7837    # support only a file format that is more or less version-7-compatible.
     7838    # In particular,
     7839    #   - a.out files must begin with `struct exec'.
     7840    #   - the N_TXTOFF on the `struct exec' must compute the seek address
     7841    #     of the text segment
     7842    #   - The `struct exec' must contain a_magic, a_text, a_data, a_bss
     7843    #     and a_entry fields.
     7844    # The following compilation should succeed if and only if either sys/exec.h
     7845    # or a.out.h is usable for the purpose.
     7846    #
     7847    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
     7848    # `struct exec' includes a second header that contains information that
     7849    # duplicates the v7 fields that are needed.
     7850
     7851    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
     7852        { $as_echo "$as_me:$LINENO: checking sys/exec.h" >&5
     7853$as_echo_n "checking sys/exec.h... " >&6; }
     7854if test "${tcl_cv_sysexec_h+set}" = set; then
     7855  $as_echo_n "(cached) " >&6
     7856else
     7857
     7858        cat >conftest.$ac_ext <<_ACEOF
     7859/* confdefs.h.  */
     7860_ACEOF
     7861cat confdefs.h >>conftest.$ac_ext
     7862cat >>conftest.$ac_ext <<_ACEOF
     7863/* end confdefs.h.  */
     7864#include <sys/exec.h>
     7865int
     7866main ()
     7867{
     7868
     7869            struct exec foo;
     7870            unsigned long seek;
     7871            int flag;
     7872#if defined(__mips) || defined(mips)
     7873            seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     7874#else
     7875            seek = N_TXTOFF (foo);
     7876#endif
     7877            flag = (foo.a_magic == OMAGIC);
     7878            return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     7879
     7880  ;
     7881  return 0;
     7882}
     7883_ACEOF
     7884rm -f conftest.$ac_objext
     7885if { (ac_try="$ac_compile"
     7886case "(($ac_try" in
     7887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7888  *) ac_try_echo=$ac_try;;
     7889esac
     7890eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7891$as_echo "$ac_try_echo") >&5
     7892  (eval "$ac_compile") 2>conftest.er1
     7893  ac_status=$?
     7894  grep -v '^ *+' conftest.er1 >conftest.err
     7895  rm -f conftest.er1
     7896  cat conftest.err >&5
     7897  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7898  (exit $ac_status); } && {
     7899         test -z "$ac_cxx_werror_flag" ||
     7900         test ! -s conftest.err
     7901       } && test -s conftest.$ac_objext; then
     7902  tcl_cv_sysexec_h=usable
     7903else
     7904  $as_echo "$as_me: failed program was:" >&5
     7905sed 's/^/| /' conftest.$ac_ext >&5
     7906
     7907        tcl_cv_sysexec_h=unusable
     7908fi
     7909
     7910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     7911fi
     7912{ $as_echo "$as_me:$LINENO: result: $tcl_cv_sysexec_h" >&5
     7913$as_echo "$tcl_cv_sysexec_h" >&6; }
     7914        if test $tcl_cv_sysexec_h = usable; then
     7915            cat >>confdefs.h <<\_ACEOF
     7916#define USE_SYS_EXEC_H 1
     7917_ACEOF
     7918
     7919        else
     7920            { $as_echo "$as_me:$LINENO: checking a.out.h" >&5
     7921$as_echo_n "checking a.out.h... " >&6; }
     7922if test "${tcl_cv_aout_h+set}" = set; then
     7923  $as_echo_n "(cached) " >&6
     7924else
     7925
     7926            cat >conftest.$ac_ext <<_ACEOF
     7927/* confdefs.h.  */
     7928_ACEOF
     7929cat confdefs.h >>conftest.$ac_ext
     7930cat >>conftest.$ac_ext <<_ACEOF
     7931/* end confdefs.h.  */
     7932#include <a.out.h>
     7933int
     7934main ()
     7935{
     7936
     7937                struct exec foo;
     7938                unsigned long seek;
     7939                int flag;
     7940#if defined(__mips) || defined(mips)
     7941                seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     7942#else
     7943                seek = N_TXTOFF (foo);
     7944#endif
     7945                flag = (foo.a_magic == OMAGIC);
     7946                return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     7947
     7948  ;
     7949  return 0;
     7950}
     7951_ACEOF
     7952rm -f conftest.$ac_objext
     7953if { (ac_try="$ac_compile"
     7954case "(($ac_try" in
     7955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     7956  *) ac_try_echo=$ac_try;;
     7957esac
     7958eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     7959$as_echo "$ac_try_echo") >&5
     7960  (eval "$ac_compile") 2>conftest.er1
     7961  ac_status=$?
     7962  grep -v '^ *+' conftest.er1 >conftest.err
     7963  rm -f conftest.er1
     7964  cat conftest.err >&5
     7965  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7966  (exit $ac_status); } && {
     7967         test -z "$ac_cxx_werror_flag" ||
     7968         test ! -s conftest.err
     7969       } && test -s conftest.$ac_objext; then
     7970  tcl_cv_aout_h=usable
     7971else
     7972  $as_echo "$as_me: failed program was:" >&5
     7973sed 's/^/| /' conftest.$ac_ext >&5
     7974
     7975        tcl_cv_aout_h=unusable
     7976fi
     7977
     7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     7979fi
     7980{ $as_echo "$as_me:$LINENO: result: $tcl_cv_aout_h" >&5
     7981$as_echo "$tcl_cv_aout_h" >&6; }
     7982            if test $tcl_cv_aout_h = usable; then
     7983                cat >>confdefs.h <<\_ACEOF
     7984#define USE_A_OUT_H 1
     7985_ACEOF
     7986
     7987            else
     7988                { $as_echo "$as_me:$LINENO: checking sys/exec_aout.h" >&5
     7989$as_echo_n "checking sys/exec_aout.h... " >&6; }
     7990if test "${tcl_cv_sysexecaout_h+set}" = set; then
     7991  $as_echo_n "(cached) " >&6
     7992else
     7993
     7994                cat >conftest.$ac_ext <<_ACEOF
     7995/* confdefs.h.  */
     7996_ACEOF
     7997cat confdefs.h >>conftest.$ac_ext
     7998cat >>conftest.$ac_ext <<_ACEOF
     7999/* end confdefs.h.  */
     8000#include <sys/exec_aout.h>
     8001int
     8002main ()
     8003{
     8004
     8005                    struct exec foo;
     8006                    unsigned long seek;
     8007                    int flag;
     8008#if defined(__mips) || defined(mips)
     8009                    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     8010#else
     8011                    seek = N_TXTOFF (foo);
     8012#endif
     8013                    flag = (foo.a_midmag == OMAGIC);
     8014                    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     8015
     8016  ;
     8017  return 0;
     8018}
     8019_ACEOF
     8020rm -f conftest.$ac_objext
     8021if { (ac_try="$ac_compile"
     8022case "(($ac_try" in
     8023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     8024  *) ac_try_echo=$ac_try;;
     8025esac
     8026eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     8027$as_echo "$ac_try_echo") >&5
     8028  (eval "$ac_compile") 2>conftest.er1
     8029  ac_status=$?
     8030  grep -v '^ *+' conftest.er1 >conftest.err
     8031  rm -f conftest.er1
     8032  cat conftest.err >&5
     8033  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8034  (exit $ac_status); } && {
     8035         test -z "$ac_cxx_werror_flag" ||
     8036         test ! -s conftest.err
     8037       } && test -s conftest.$ac_objext; then
     8038  tcl_cv_sysexecaout_h=usable
     8039else
     8040  $as_echo "$as_me: failed program was:" >&5
     8041sed 's/^/| /' conftest.$ac_ext >&5
     8042
     8043        tcl_cv_sysexecaout_h=unusable
     8044fi
     8045
     8046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     8047fi
     8048{ $as_echo "$as_me:$LINENO: result: $tcl_cv_sysexecaout_h" >&5
     8049$as_echo "$tcl_cv_sysexecaout_h" >&6; }
     8050                if test $tcl_cv_sysexecaout_h = usable; then
     8051                    cat >>confdefs.h <<\_ACEOF
     8052#define USE_SYS_EXEC_AOUT_H 1
     8053_ACEOF
     8054
     8055                else
     8056                    DL_OBJS=""
     8057                fi
     8058            fi
     8059        fi
     8060    fi
     8061
     8062    # Step 5: disable dynamic loading if requested via a command-line switch.
     8063
     8064    # Check whether --enable-load was given.
     8065if test "${enable_load+set}" = set; then
     8066  enableval=$enable_load; tcl_ok=$enableval
     8067else
     8068  tcl_ok=yes
     8069fi
     8070
     8071    if test "$tcl_ok" = "no"; then
     8072        DL_OBJS=""
     8073    fi
     8074
     8075    if test "x$DL_OBJS" != "x" ; then
     8076        BUILD_DLTEST="\$(DLTEST_TARGETS)"
     8077    else
     8078        echo "Can't figure out how to do dynamic loading or shared libraries"
     8079        echo "on this system."
     8080        SHLIB_CFLAGS=""
     8081        SHLIB_LD=""
     8082        SHLIB_SUFFIX=""
     8083        DL_OBJS="tclLoadNone.o"
     8084        DL_LIBS=""
     8085        LDFLAGS="$LDFLAGS_ORIG"
     8086        CC_SEARCH_FLAGS=""
     8087        LD_SEARCH_FLAGS=""
     8088        BUILD_DLTEST=""
     8089    fi
     8090
     8091    # If we're running gcc, then change the C flags for compiling shared
     8092    # libraries to the right flags for gcc, instead of those for the
     8093    # standard manufacturer compiler.
     8094
     8095    if test "$DL_OBJS" != "tclLoadNone.o" ; then
     8096        if test "$GCC" = "yes" ; then
     8097            case $system in
     8098                AIX-*)
     8099                    ;;
     8100                BSD/OS*)
     8101                    ;;
     8102                IRIX*)
     8103                    ;;
     8104                NetBSD-*|FreeBSD-*|OpenBSD-*)
     8105                    ;;
     8106                Darwin-*)
     8107                    ;;
     8108                RISCos-*)
     8109                    ;;
     8110                SCO_SV-3.2*)
     8111                    ;;
     8112                ULTRIX-4.*)
     8113                    ;;
     8114                *)
     8115                    SHLIB_CFLAGS="-fPIC"
     8116                    ;;
     8117            esac
     8118        fi
     8119    fi
     8120
     8121    if test "$SHARED_LIB_SUFFIX" = "" ; then
     8122        SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
     8123    fi
     8124    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
     8125        UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     8126    fi
     8127
     8128    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
     8129        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
     8130        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
     8131        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     8132    else
     8133        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
     8134
     8135        if test "$RANLIB" = "" ; then
     8136            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
     8137            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     8138        else
     8139            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
     8140            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
     8141        fi
     8142
     8143    fi
     8144
     8145
     8146    # Stub lib does not depend on shared/static configuration
     8147    if test "$RANLIB" = "" ; then
     8148        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
     8149        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
     8150    else
     8151        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
     8152        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
     8153    fi
     8154
     8155
     8156
     8157
     8158
     8159
     8160
     8161
     8162
     8163
     8164
     8165
     8166
     8167
     8168
     8169
     8170
     8171
     8172
     8173
     8174
     8175
     8176
     8177
     8178
     8179
     8180
     8181
     8182
     8183
     8184
     8185
     8186SC_MAKE_LIB
    50888187
    50898188# Check whether --enable-gui was given.
     
    51028201
    51038202
     8203with_tclsh="check"
    51048204
    51058205# Check whether --with-tclsh was given.
     
    51138213TCLSH=
    51148214if test "$with_tclsh" != "no" ; then
    5115     { echo "$as_me:$LINENO: checking for tclsh" >&5
    5116 echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
     8215    { $as_echo "$as_me:$LINENO: checking for tclsh" >&5
     8216$as_echo_n "checking for tclsh... " >&6; }
    51178217    if test -x "$with_tclsh/bin/tclsh"
    51188218    then
     
    51278227            # Extract the first word of "tclsh", so it can be a program name with args.
    51288228set dummy tclsh; ac_word=$2
    5129 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    5130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     8229{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8230$as_echo_n "checking for $ac_word... " >&6; }
    51318231if test "${ac_cv_path_TCLSH+set}" = set; then
    5132   echo $ECHO_N "(cached) $ECHO_C" >&6
     8232  $as_echo_n "(cached) " >&6
    51338233else
    51348234  case $TCLSH in
     
    51458245  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    51468246    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
    5147     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8247    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    51488248    break 2
    51498249  fi
     
    51578257TCLSH=$ac_cv_path_TCLSH
    51588258if test -n "$TCLSH"; then
    5159   { echo "$as_me:$LINENO: result: $TCLSH" >&5
    5160 echo "${ECHO_T}$TCLSH" >&6; }
    5161 else
    5162   { echo "$as_me:$LINENO: result: no" >&5
    5163 echo "${ECHO_T}no" >&6; }
     8259  { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
     8260$as_echo "$TCLSH" >&6; }
     8261else
     8262  { $as_echo "$as_me:$LINENO: result: no" >&5
     8263$as_echo "no" >&6; }
    51648264fi
    51658265
     
    51688268    fi
    51698269fi
    5170 { echo "$as_me:$LINENO: result: ${TCLSH}" >&5
    5171 echo "${ECHO_T}${TCLSH}" >&6; }
     8270{ $as_echo "$as_me:$LINENO: result: ${TCLSH}" >&5
     8271$as_echo "${TCLSH}" >&6; }
    51728272
    51738273
     
    52058305MEXEXT=
    52068306if test "$with_matlab" != "no" ; then
    5207     { echo "$as_me:$LINENO: checking for matlab's mex" >&5
    5208 echo $ECHO_N "checking for matlab's mex... $ECHO_C" >&6; }
     8307    { $as_echo "$as_me:$LINENO: checking for matlab's mex" >&5
     8308$as_echo_n "checking for matlab's mex... " >&6; }
    52098309    if test "$with_matlab" != "no" ; then
    52108310                if test -x "$with_matlab/bin/mex"
     
    52188318                # Extract the first word of "mex", so it can be a program name with args.
    52198319set dummy mex; ac_word=$2
    5220 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    5221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     8320{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8321$as_echo_n "checking for $ac_word... " >&6; }
    52228322if test "${ac_cv_path_MEX+set}" = set; then
    5223   echo $ECHO_N "(cached) $ECHO_C" >&6
     8323  $as_echo_n "(cached) " >&6
    52248324else
    52258325  case $MEX in
     
    52368336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    52378337    ac_cv_path_MEX="$as_dir/$ac_word$ac_exec_ext"
    5238     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8338    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    52398339    break 2
    52408340  fi
     
    52488348MEX=$ac_cv_path_MEX
    52498349if test -n "$MEX"; then
    5250   { echo "$as_me:$LINENO: result: $MEX" >&5
    5251 echo "${ECHO_T}$MEX" >&6; }
    5252 else
    5253   { echo "$as_me:$LINENO: result: no" >&5
    5254 echo "${ECHO_T}no" >&6; }
     8350  { $as_echo "$as_me:$LINENO: result: $MEX" >&5
     8351$as_echo "$MEX" >&6; }
     8352else
     8353  { $as_echo "$as_me:$LINENO: result: no" >&5
     8354$as_echo "no" >&6; }
    52558355fi
    52568356
     
    52658365            MEX=
    52668366        fi
    5267         { echo "$as_me:$LINENO: result: ${MEX}" >&5
    5268 echo "${ECHO_T}${MEX}" >&6; }
     8367        { $as_echo "$as_me:$LINENO: result: ${MEX}" >&5
     8368$as_echo "${MEX}" >&6; }
    52698369        if test "$with_matlab_arch" = "check" ; then
    52708370                        with_matlab_arch=""
     
    52898389            fi
    52908390            echo "Using mex file extension \"$MEXEXT\""
    5291             { echo "$as_me:$LINENO: result: ${MEXEXT}" >&5
    5292 echo "${ECHO_T}${MEXEXT}" >&6; }
     8391            { $as_echo "$as_me:$LINENO: result: ${MEXEXT}" >&5
     8392$as_echo "${MEXEXT}" >&6; }
    52938393        else
    52948394                                    echo "can't find the matlab compiler \"mex\""
     
    53158415MKOCTFILE=
    53168416if test "$with_octave" != "no" ; then
    5317     { echo "$as_me:$LINENO: checking for mkoctfile" >&5
    5318 echo $ECHO_N "checking for mkoctfile... $ECHO_C" >&6; }
     8417    { $as_echo "$as_me:$LINENO: checking for mkoctfile" >&5
     8418$as_echo_n "checking for mkoctfile... " >&6; }
    53198419    if test "$with_octave" != "no" ; then
    53208420        if test -x "$with_octave/bin/mkoctfile"
     
    53298429                # Extract the first word of "mkoctfile", so it can be a program name with args.
    53308430set dummy mkoctfile; ac_word=$2
    5331 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    5332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     8431{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8432$as_echo_n "checking for $ac_word... " >&6; }
    53338433if test "${ac_cv_path_MKOCTFILE+set}" = set; then
    5334   echo $ECHO_N "(cached) $ECHO_C" >&6
     8434  $as_echo_n "(cached) " >&6
    53358435else
    53368436  case $MKOCTFILE in
     
    53478447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    53488448    ac_cv_path_MKOCTFILE="$as_dir/$ac_word$ac_exec_ext"
    5349     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8449    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    53508450    break 2
    53518451  fi
     
    53598459MKOCTFILE=$ac_cv_path_MKOCTFILE
    53608460if test -n "$MKOCTFILE"; then
    5361   { echo "$as_me:$LINENO: result: $MKOCTFILE" >&5
    5362 echo "${ECHO_T}$MKOCTFILE" >&6; }
    5363 else
    5364   { echo "$as_me:$LINENO: result: no" >&5
    5365 echo "${ECHO_T}no" >&6; }
     8461  { $as_echo "$as_me:$LINENO: result: $MKOCTFILE" >&5
     8462$as_echo "$MKOCTFILE" >&6; }
     8463else
     8464  { $as_echo "$as_me:$LINENO: result: no" >&5
     8465$as_echo "no" >&6; }
    53668466fi
    53678467
     
    53748474        fi
    53758475    fi
    5376     { echo "$as_me:$LINENO: result: ${MKOCTFILE}" >&5
    5377 echo "${ECHO_T}${MKOCTFILE}" >&6; }
     8476    { $as_echo "$as_me:$LINENO: result: ${MKOCTFILE}" >&5
     8477$as_echo "${MKOCTFILE}" >&6; }
    53788478fi
    53798479
     
    53968496PERL_SITE_PACKAGES=
    53978497if test "$with_perl" != "no" ; then
    5398     { echo "$as_me:$LINENO: checking for perl" >&5
    5399 echo $ECHO_N "checking for perl... $ECHO_C" >&6; }
     8498    { $as_echo "$as_me:$LINENO: checking for perl" >&5
     8499$as_echo_n "checking for perl... " >&6; }
    54008500    if test -x "$with_perl/bin/perl"
    54018501    then
     
    54108510            # Extract the first word of "perl", so it can be a program name with args.
    54118511set dummy perl; ac_word=$2
    5412 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    5413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     8512{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8513$as_echo_n "checking for $ac_word... " >&6; }
    54148514if test "${ac_cv_path_PERL+set}" = set; then
    5415   echo $ECHO_N "(cached) $ECHO_C" >&6
     8515  $as_echo_n "(cached) " >&6
    54168516else
    54178517  case $PERL in
     
    54288528  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    54298529    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    5430     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8530    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    54318531    break 2
    54328532  fi
     
    54408540PERL=$ac_cv_path_PERL
    54418541if test -n "$PERL"; then
    5442   { echo "$as_me:$LINENO: result: $PERL" >&5
    5443 echo "${ECHO_T}$PERL" >&6; }
    5444 else
    5445   { echo "$as_me:$LINENO: result: no" >&5
    5446 echo "${ECHO_T}no" >&6; }
     8542  { $as_echo "$as_me:$LINENO: result: $PERL" >&5
     8543$as_echo "$PERL" >&6; }
     8544else
     8545  { $as_echo "$as_me:$LINENO: result: no" >&5
     8546$as_echo "no" >&6; }
    54478547fi
    54488548
     
    54528552    PERL_SITE_PACKAGES='$(libdir)/perl5'
    54538553fi
    5454 { echo "$as_me:$LINENO: result: ${PERL}" >&5
    5455 echo "${ECHO_T}${PERL}" >&6; }
     8554{ $as_echo "$as_me:$LINENO: result: ${PERL}" >&5
     8555$as_echo "${PERL}" >&6; }
    54568556
    54578557
     
    54758575
    54768576if test "$with_python" != "no" ; then
    5477     { echo "$as_me:$LINENO: checking for python" >&5
    5478 echo $ECHO_N "checking for python... $ECHO_C" >&6; }
     8577    { $as_echo "$as_me:$LINENO: checking for python" >&5
     8578$as_echo_n "checking for python... " >&6; }
    54798579    if test -x "$with_python/bin/python"
    54808580    then
     
    54898589            # Extract the first word of "python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args.
    54908590set dummy python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
    5491 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    5492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     8591{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8592$as_echo_n "checking for $ac_word... " >&6; }
    54938593if test "${ac_cv_path_PYTHON+set}" = set; then
    5494   echo $ECHO_N "(cached) $ECHO_C" >&6
     8594  $as_echo_n "(cached) " >&6
    54958595else
    54968596  case $PYTHON in
     
    55078607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    55088608    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    5509     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8609    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    55108610    break 2
    55118611  fi
     
    55198619PYTHON=$ac_cv_path_PYTHON
    55208620if test -n "$PYTHON"; then
    5521   { echo "$as_me:$LINENO: result: $PYTHON" >&5
    5522 echo "${ECHO_T}$PYTHON" >&6; }
    5523 else
    5524   { echo "$as_me:$LINENO: result: no" >&5
    5525 echo "${ECHO_T}no" >&6; }
     8621  { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
     8622$as_echo "$PYTHON" >&6; }
     8623else
     8624  { $as_echo "$as_me:$LINENO: result: no" >&5
     8625$as_echo "no" >&6; }
    55268626fi
    55278627
     
    55778677
    55788678
     8679# Check whether --with-ruby was given.
     8680if test "${with_ruby+set}" = set; then
     8681  withval=$with_ruby;
     8682else
     8683  with_ruby=check
     8684fi
     8685
     8686
     8687RUBY=""
     8688if test "$with_ruby" != "no" ; then
     8689    { $as_echo "$as_me:$LINENO: checking for ruby" >&5
     8690$as_echo_n "checking for ruby... " >&6; }
     8691    if test -x "$with_ruby/bin/ruby"
     8692    then
     8693        echo Found perl in $with_ruby/bin/ruby
     8694        PERL="$with_ruby/bin/ruby"
     8695    else
     8696        if test -x "$with_ruby"
     8697        then
     8698            echo Found ruby in $with_ruby
     8699            PERL="$with_ruby"
     8700        else
     8701            # Extract the first word of "ruby", so it can be a program name with args.
     8702set dummy ruby; ac_word=$2
     8703{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     8704$as_echo_n "checking for $ac_word... " >&6; }
     8705if test "${ac_cv_path_RUBY+set}" = set; then
     8706  $as_echo_n "(cached) " >&6
     8707else
     8708  case $RUBY in
     8709  [\\/]* | ?:[\\/]*)
     8710  ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path.
     8711  ;;
     8712  *)
     8713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8714for as_dir in $PATH
     8715do
     8716  IFS=$as_save_IFS
     8717  test -z "$as_dir" && as_dir=.
     8718  for ac_exec_ext in '' $ac_executable_extensions; do
     8719  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8720    ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext"
     8721    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     8722    break 2
     8723  fi
     8724done
     8725done
     8726IFS=$as_save_IFS
     8727
     8728  ;;
     8729esac
     8730fi
     8731RUBY=$ac_cv_path_RUBY
     8732if test -n "$RUBY"; then
     8733  { $as_echo "$as_me:$LINENO: result: $RUBY" >&5
     8734$as_echo "$RUBY" >&6; }
     8735else
     8736  { $as_echo "$as_me:$LINENO: result: no" >&5
     8737$as_echo "no" >&6; }
     8738fi
     8739
     8740
     8741        fi
     8742    fi
     8743fi
     8744{ $as_echo "$as_me:$LINENO: result: ${RUBY}" >&5
     8745$as_echo "${RUBY}" >&6; }
     8746
     8747
    55798748RP_BASE=`pwd`
    55808749
    55818750
    5582 if test "$ENABLE_GUI" == "yes" ; then
    5583     subdirs="$subdirs gui"
    5584 
    5585 fi
    5586 
    5587 if test "$TCLSH" != "" ; then
    5588     subdirs="$subdirs src/tcl"
    5589 
    5590 fi
    5591 
    5592 subdirs="$subdirs optimizer/src"
    5593 
    5594 
    5595 ac_config_files="$ac_config_files Makefile examples/demo.bash examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/wrapper/cee/Makefile examples/c-example/Makefile optimizer/src/Makefile perl/Makefile.PL python/setup.py src/Makefile src/matlab/Makefile src/octave/Makefile src2/core/Makefile test/Makefile gui/apps/simsim gui/apps/rappture gui/apps/rappture.env"
     8751
     8752    { $as_echo "$as_me:$LINENO: checking how to build libraries" >&5
     8753$as_echo_n "checking how to build libraries... " >&6; }
     8754    # Check whether --enable-shared was given.
     8755if test "${enable_shared+set}" = set; then
     8756  enableval=$enable_shared; tcl_ok=$enableval
     8757else
     8758  tcl_ok=yes
     8759fi
     8760
     8761
     8762    if test "${enable_shared+set}" = set; then
     8763        enableval="$enable_shared"
     8764        tcl_ok=$enableval
     8765    else
     8766        tcl_ok=yes
     8767    fi
     8768
     8769    if test "$tcl_ok" = "yes" ; then
     8770        { $as_echo "$as_me:$LINENO: result: shared" >&5
     8771$as_echo "shared" >&6; }
     8772        SHARED_BUILD=1
     8773    else
     8774        { $as_echo "$as_me:$LINENO: result: static" >&5
     8775$as_echo "static" >&6; }
     8776        SHARED_BUILD=0
     8777        cat >>confdefs.h <<\_ACEOF
     8778#define STATIC_BUILD 1
     8779_ACEOF
     8780
     8781    fi
     8782
     8783
     8784#--------------------------------------------------------------------
     8785# This macro figures out what flags to use with the compiler/linker
     8786# when building shared/static debug/optimized objects.  This information
     8787# is all taken from the tclConfig.sh file.
     8788#--------------------------------------------------------------------
     8789
     8790
     8791
     8792
     8793
     8794
     8795
     8796
     8797
     8798#--------------------------------------------------------------------
     8799# Set the default compiler switches based on the --enable-symbols
     8800# option.
     8801#--------------------------------------------------------------------
     8802
     8803
     8804    { $as_echo "$as_me:$LINENO: checking for build with symbols" >&5
     8805$as_echo_n "checking for build with symbols... " >&6; }
     8806    # Check whether --enable-symbols was given.
     8807if test "${enable_symbols+set}" = set; then
     8808  enableval=$enable_symbols; tcl_ok=$enableval
     8809else
     8810  tcl_ok=no
     8811fi
     8812
     8813# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
     8814    if test "$tcl_ok" = "no"; then
     8815        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
     8816        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
     8817        DBGX=""
     8818        { $as_echo "$as_me:$LINENO: result: no" >&5
     8819$as_echo "no" >&6; }
     8820    else
     8821        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
     8822        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
     8823        DBGX=g
     8824        if test "$tcl_ok" = "yes"; then
     8825            { $as_echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
     8826$as_echo "yes (standard debugging)" >&6; }
     8827        fi
     8828    fi
     8829
     8830
     8831
     8832    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
     8833        cat >>confdefs.h <<\_ACEOF
     8834#define TCL_MEM_DEBUG 1
     8835_ACEOF
     8836
     8837    fi
     8838
     8839    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
     8840        cat >>confdefs.h <<\_ACEOF
     8841#define TCL_COMPILE_DEBUG 1
     8842_ACEOF
     8843
     8844        cat >>confdefs.h <<\_ACEOF
     8845#define TCL_COMPILE_STATS 1
     8846_ACEOF
     8847
     8848    fi
     8849
     8850    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
     8851        if test "$tcl_ok" = "all"; then
     8852            { $as_echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
     8853$as_echo "enabled symbols mem compile debugging" >&6; }
     8854        else
     8855            { $as_echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
     8856$as_echo "enabled $tcl_ok debugging" >&6; }
     8857        fi
     8858    fi
     8859
     8860
     8861if test "${SHARED_BUILD}" = "1" ; then
     8862    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
     8863else
     8864    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
     8865fi
     8866
     8867
     8868
     8869subdirs="$subdirs packages/optimizer/src"
     8870
     8871
     8872ac_config_files="$ac_config_files Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile gui/Makefile gui/apps/Makefile gui/apps/rappture gui/apps/rappture.env gui/apps/simsim gui/pkgIndex.tcl gui/scripts/Makefile gui/src/Makefile lang/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile examples/Makefile examples/3D/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/graph/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/group/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile test/Makefile test/src/Makefile"
    55968873
    55978874cat >confcache <<\_ACEOF
     
    56228899    *${as_nl}*)
    56238900      case $ac_var in #(
    5624       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
    5625 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
     8901      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
     8902$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
    56268903      esac
    56278904      case $ac_var in #(
    56288905      _ | IFS | as_nl) ;; #(
     8906      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
    56298907      *) $as_unset $ac_var ;;
    56308908      esac ;;
     
    56598937  if test -w "$cache_file"; then
    56608938    test "x$cache_file" != "x/dev/null" &&
    5661       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
    5662 echo "$as_me: updating cache $cache_file" >&6;}
     8939      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
     8940$as_echo "$as_me: updating cache $cache_file" >&6;}
    56638941    cat confcache >$cache_file
    56648942  else
    5665     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
    5666 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
     8943    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
     8944$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    56678945  fi
    56688946fi
     
    56818959# look for a macro that doesn't take arguments.
    56828960ac_script='
     8961:mline
     8962/\\$/{
     8963 N
     8964 s,\\\n,,
     8965 b mline
     8966}
    56838967t clear
    56848968:clear
     
    57108994  # 1. Remove the extension, and $U if already installed.
    57118995  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
    5712   ac_i=`echo "$ac_i" | sed "$ac_script"`
     8996  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
    57138997  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
    57148998  #    will be set to the directory where LIBOBJS objects are built.
     
    57239007
    57249008: ${CONFIG_STATUS=./config.status}
     9009ac_write_fail=0
    57259010ac_clean_files_save=$ac_clean_files
    57269011ac_clean_files="$ac_clean_files $CONFIG_STATUS"
    5727 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
    5728 echo "$as_me: creating $CONFIG_STATUS" >&6;}
    5729 cat >$CONFIG_STATUS <<_ACEOF
     9012{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
     9013$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
     9014cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    57309015#! $SHELL
    57319016# Generated by $as_me.
     
    57409025_ACEOF
    57419026
    5742 cat >>$CONFIG_STATUS <<\_ACEOF
     9027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    57439028## --------------------- ##
    57449029## M4sh Initialization.  ##
     
    57509035  emulate sh
    57519036  NULLCMD=:
    5752   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     9037  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
    57539038  # is contrary to our usage.  Disable this feature.
    57549039  alias -g '${1+"$@"}'='"$@"'
     
    57729057as_cr_alnum=$as_cr_Letters$as_cr_digits
    57739058
     9059as_nl='
     9060'
     9061export as_nl
     9062# Printing a long string crashes Solaris 7 /usr/bin/printf.
     9063as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
     9064as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
     9065as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
     9066if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
     9067  as_echo='printf %s\n'
     9068  as_echo_n='printf %s'
     9069else
     9070  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
     9071    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
     9072    as_echo_n='/usr/ucb/echo -n'
     9073  else
     9074    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     9075    as_echo_n_body='eval
     9076      arg=$1;
     9077      case $arg in
     9078      *"$as_nl"*)
     9079        expr "X$arg" : "X\\(.*\\)$as_nl";
     9080        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
     9081      esac;
     9082      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
     9083    '
     9084    export as_echo_n_body
     9085    as_echo_n='sh -c $as_echo_n_body as_echo'
     9086  fi
     9087  export as_echo_body
     9088  as_echo='sh -c $as_echo_body as_echo'
     9089fi
     9090
    57749091# The user is always right.
    57759092if test "${PATH_SEPARATOR+set}" != set; then
    5776   echo "#! /bin/sh" >conf$$.sh
    5777   echo  "exit 0"   >>conf$$.sh
    5778   chmod +x conf$$.sh
    5779   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    5780     PATH_SEPARATOR=';'
    5781   else
    5782     PATH_SEPARATOR=:
    5783   fi
    5784   rm -f conf$$.sh
     9093  PATH_SEPARATOR=:
     9094  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     9095    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
     9096      PATH_SEPARATOR=';'
     9097  }
    57859098fi
    57869099
     
    57989111# (If _AS_PATH_WALK were called with IFS unset, it would disable word
    57999112# splitting by setting IFS to empty value.)
    5800 as_nl='
    5801 '
    58029113IFS=" ""        $as_nl"
    58039114
     
    58229133fi
    58239134if test ! -f "$as_myself"; then
    5824   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     9135  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
    58259136  { (exit 1); exit 1; }
    58269137fi
     
    58359146
    58369147# NLS nuisances.
    5837 for as_var in \
    5838   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
    5839   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
    5840   LC_TELEPHONE LC_TIME
    5841 do
    5842   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    5843     eval $as_var=C; export $as_var
    5844   else
    5845     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
    5846   fi
    5847 done
     9148LC_ALL=C
     9149export LC_ALL
     9150LANGUAGE=C
     9151export LANGUAGE
    58489152
    58499153# Required to use basename.
     
    58679171         X"$0" : 'X\(//\)$' \| \
    58689172         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    5869 echo X/"$0" |
     9173$as_echo X/"$0" |
    58709174    sed '/^.*\/\([^/][^/]*\)\/*$/{
    58719175            s//\1/
     
    59189222    ' >$as_me.lineno &&
    59199223  chmod +x "$as_me.lineno" ||
    5920     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
     9224    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    59219225   { (exit 1); exit 1; }; }
    59229226
     
    59469250  ECHO_N='-n';;
    59479251esac
    5948 
    59499252if expr a : '\(a\)' >/dev/null 2>&1 &&
    59509253   test "X`expr 00001 : '.*\(...\)'`" = X001; then
     
    59599262else
    59609263  rm -f conf$$.dir
    5961   mkdir conf$$.dir
    5962 fi
    5963 echo >conf$$.file
    5964 if ln -s conf$$.file conf$$ 2>/dev/null; then
    5965   as_ln_s='ln -s'
    5966   # ... but there are two gotchas:
    5967   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    5968   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    5969   # In both cases, we have to default to `cp -p'.
    5970   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     9264  mkdir conf$$.dir 2>/dev/null
     9265fi
     9266if (echo >conf$$.file) 2>/dev/null; then
     9267  if ln -s conf$$.file conf$$ 2>/dev/null; then
     9268    as_ln_s='ln -s'
     9269    # ... but there are two gotchas:
     9270    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     9271    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
     9272    # In both cases, we have to default to `cp -p'.
     9273    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     9274      as_ln_s='cp -p'
     9275  elif ln conf$$.file conf$$ 2>/dev/null; then
     9276    as_ln_s=ln
     9277  else
    59719278    as_ln_s='cp -p'
    5972 elif ln conf$$.file conf$$ 2>/dev/null; then
    5973   as_ln_s=ln
     9279  fi
    59749280else
    59759281  as_ln_s='cp -p'
     
    59969302    eval sh -c '\''
    59979303      if test -d "$1"; then
    5998         test -d "$1/.";
     9304        test -d "$1/.";
    59999305      else
    60009306        case $1 in
    6001         -*)set "./$1";;
     9307        -*)set "./$1";;
    60029308        esac;
    60039309        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
     
    60219327# values after options handling.
    60229328ac_log="
    6023 This file was extended by Rappture Core and Bindings $as_me 1.1, which was
    6024 generated by GNU Autoconf 2.61.  Invocation command line was
     9329This file was extended by Rappture $as_me 1.1, which was
     9330generated by GNU Autoconf 2.62.  Invocation command line was
    60259331
    60269332  CONFIG_FILES    = $CONFIG_FILES
     
    60359341_ACEOF
    60369342
    6037 cat >>$CONFIG_STATUS <<_ACEOF
     9343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    60389344# Files that config.status was made for.
    60399345config_files="$ac_config_files"
     
    60419347_ACEOF
    60429348
    6043 cat >>$CONFIG_STATUS <<\_ACEOF
     9349cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    60449350ac_cs_usage="\
    60459351\`$as_me' instantiates files from templates according to the
     
    60549360      --recheck    update $as_me by reconfiguring in the same conditions
    60559361  --file=FILE[:TEMPLATE]
    6056                    instantiate the configuration file FILE
     9362                   instantiate the configuration file FILE
    60579363
    60589364Configuration files:
     
    60629368
    60639369_ACEOF
    6064 cat >>$CONFIG_STATUS <<_ACEOF
     9370cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    60659371ac_cs_version="\\
    6066 Rappture Core and Bindings config.status 1.1
    6067 configured by $0, generated by GNU Autoconf 2.61,
    6068   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
    6069 
    6070 Copyright (C) 2006 Free Software Foundation, Inc.
     9372Rappture config.status 1.1
     9373configured by $0, generated by GNU Autoconf 2.62,
     9374  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
     9375
     9376Copyright (C) 2008 Free Software Foundation, Inc.
    60719377This config.status script is free software; the Free Software Foundation
    60729378gives unlimited permission to copy, distribute and modify it."
     
    60759381srcdir='$srcdir'
    60769382INSTALL='$INSTALL'
    6077 _ACEOF
    6078 
    6079 cat >>$CONFIG_STATUS <<\_ACEOF
    6080 # If no file are specified by the user, then we need to provide default
    6081 # value.  By we need to know if files were specified by the user.
     9383test -n "\$AWK" || AWK=awk
     9384_ACEOF
     9385
     9386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
     9387# The default lists apply if the user does not specify any file.
    60829388ac_need_defaults=:
    60839389while test $# != 0
     
    61019407    ac_cs_recheck=: ;;
    61029408  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    6103     echo "$ac_cs_version"; exit ;;
     9409    $as_echo "$ac_cs_version"; exit ;;
    61049410  --debug | --debu | --deb | --de | --d | -d )
    61059411    debug=: ;;
    61069412  --file | --fil | --fi | --f )
    61079413    $ac_shift
    6108     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     9414    case $ac_optarg in
     9415    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     9416    esac
     9417    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
    61099418    ac_need_defaults=false;;
    61109419  --he | --h |  --help | --hel | -h )
    6111     echo "$ac_cs_usage"; exit ;;
     9420    $as_echo "$ac_cs_usage"; exit ;;
    61129421  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    61139422  | -silent | --silent | --silen | --sile | --sil | --si | --s)
     
    61159424
    61169425  # This is an error.
    6117   -*) { echo "$as_me: error: unrecognized option: $1
     9426  -*) { $as_echo "$as_me: error: unrecognized option: $1
    61189427Try \`$0 --help' for more information." >&2
    61199428   { (exit 1); exit 1; }; } ;;
     
    61349443
    61359444_ACEOF
    6136 cat >>$CONFIG_STATUS <<_ACEOF
     9445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    61379446if \$ac_cs_recheck; then
    6138   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
    6139   CONFIG_SHELL=$SHELL
     9447  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
     9448  shift
     9449  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
     9450  CONFIG_SHELL='$SHELL'
    61409451  export CONFIG_SHELL
    6141   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
    6142 fi
    6143 
    6144 _ACEOF
    6145 cat >>$CONFIG_STATUS <<\_ACEOF
     9452  exec "\$@"
     9453fi
     9454
     9455_ACEOF
     9456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    61469457exec 5>>config.log
    61479458{
     
    61509461## Running $as_me. ##
    61519462_ASBOX
    6152   echo "$ac_log"
     9463  $as_echo "$ac_log"
    61539464} >&5
    61549465
    61559466_ACEOF
    6156 cat >>$CONFIG_STATUS <<_ACEOF
    6157 _ACEOF
    6158 
    6159 cat >>$CONFIG_STATUS <<\_ACEOF
     9467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     9468_ACEOF
     9469
     9470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    61609471
    61619472# Handling of arguments.
     
    61649475  case $ac_config_target in
    61659476    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    6166     "examples/demo.bash") CONFIG_FILES="$CONFIG_FILES examples/demo.bash" ;;
     9477    "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;;
     9478    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     9479    "src/core/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/Makefile" ;;
     9480    "src/core2/Makefile") CONFIG_FILES="$CONFIG_FILES src/core2/Makefile" ;;
     9481    "src/objects/Makefile") CONFIG_FILES="$CONFIG_FILES src/objects/Makefile" ;;
     9482    "gui/Makefile") CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;;
     9483    "gui/apps/Makefile") CONFIG_FILES="$CONFIG_FILES gui/apps/Makefile" ;;
     9484    "gui/apps/rappture") CONFIG_FILES="$CONFIG_FILES gui/apps/rappture" ;;
     9485    "gui/apps/rappture.env") CONFIG_FILES="$CONFIG_FILES gui/apps/rappture.env" ;;
     9486    "gui/apps/simsim") CONFIG_FILES="$CONFIG_FILES gui/apps/simsim" ;;
     9487    "gui/pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES gui/pkgIndex.tcl" ;;
     9488    "gui/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES gui/scripts/Makefile" ;;
     9489    "gui/src/Makefile") CONFIG_FILES="$CONFIG_FILES gui/src/Makefile" ;;
     9490    "lang/Makefile") CONFIG_FILES="$CONFIG_FILES lang/Makefile" ;;
     9491    "lang/perl/Makefile") CONFIG_FILES="$CONFIG_FILES lang/perl/Makefile" ;;
     9492    "lang/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES lang/perl/Makefile.PL" ;;
     9493    "lang/python/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/Makefile" ;;
     9494    "lang/python/setup.py") CONFIG_FILES="$CONFIG_FILES lang/python/setup.py" ;;
     9495    "lang/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES lang/matlab/Makefile" ;;
     9496    "lang/octave/Makefile") CONFIG_FILES="$CONFIG_FILES lang/octave/Makefile" ;;
     9497    "lang/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES lang/ruby/Makefile" ;;
     9498    "lang/ruby/build.rb") CONFIG_FILES="$CONFIG_FILES lang/ruby/build.rb" ;;
     9499    "lang/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES lang/tcl/Makefile" ;;
     9500    "lang/tcl/pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES lang/tcl/pkgIndex.tcl" ;;
     9501    "lang/tcl/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/tcl/src/Makefile" ;;
     9502    "lang/tcl/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES lang/tcl/scripts/Makefile" ;;
     9503    "lang/tcl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/tcl/tests/Makefile" ;;
     9504    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
     9505    "examples/3D/Makefile") CONFIG_FILES="$CONFIG_FILES examples/3D/Makefile" ;;
     9506    "examples/app-fermi/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/Makefile" ;;
    61679507    "examples/app-fermi/cee/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/cee/Makefile" ;;
    61689508    "examples/app-fermi/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/fortran/Makefile" ;;
     9509    "examples/app-fermi/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/matlab/Makefile" ;;
     9510    "examples/app-fermi/octave/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/octave/Makefile" ;;
     9511    "examples/app-fermi/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/perl/Makefile" ;;
     9512    "examples/app-fermi/python/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/python/Makefile" ;;
     9513    "examples/app-fermi/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/ruby/Makefile" ;;
     9514    "examples/app-fermi/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/tcl/Makefile" ;;
     9515    "examples/app-fermi/wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/Makefile" ;;
    61699516    "examples/app-fermi/wrapper/cee/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/cee/Makefile" ;;
     9517    "examples/app-fermi/wrapper/python/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/python/Makefile" ;;
     9518    "examples/app-fermi/wrapper/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/tcl/Makefile" ;;
    61709519    "examples/c-example/Makefile") CONFIG_FILES="$CONFIG_FILES examples/c-example/Makefile" ;;
    6171     "optimizer/src/Makefile") CONFIG_FILES="$CONFIG_FILES optimizer/src/Makefile" ;;
    6172     "perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES perl/Makefile.PL" ;;
    6173     "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;;
    6174     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    6175     "src/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES src/matlab/Makefile" ;;
    6176     "src/octave/Makefile") CONFIG_FILES="$CONFIG_FILES src/octave/Makefile" ;;
    6177     "src2/core/Makefile") CONFIG_FILES="$CONFIG_FILES src2/core/Makefile" ;;
     9520    "examples/canvas/Makefile") CONFIG_FILES="$CONFIG_FILES examples/canvas/Makefile" ;;
     9521    "examples/demo.bash") CONFIG_FILES="$CONFIG_FILES examples/demo.bash" ;;
     9522    "examples/graph/Makefile") CONFIG_FILES="$CONFIG_FILES examples/graph/Makefile" ;;
     9523    "examples/zoo/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/Makefile" ;;
     9524    "examples/zoo/binary/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/binary/Makefile" ;;
     9525    "examples/zoo/boolean/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/boolean/Makefile" ;;
     9526    "examples/zoo/choice/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/choice/Makefile" ;;
     9527    "examples/zoo/cloud/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/cloud/Makefile" ;;
     9528    "examples/zoo/cloud/matlab/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/cloud/matlab/Makefile" ;;
     9529    "examples/zoo/curve/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/curve/Makefile" ;;
     9530    "examples/zoo/enable/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/enable/Makefile" ;;
     9531    "examples/zoo/field/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/field/Makefile" ;;
     9532    "examples/zoo/group/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/group/Makefile" ;;
     9533    "examples/zoo/image/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/image/Makefile" ;;
     9534    "examples/zoo/image/docs/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/image/docs/Makefile" ;;
     9535    "examples/zoo/image/examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/image/examples/Makefile" ;;
     9536    "examples/zoo/integer/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/integer/Makefile" ;;
     9537    "examples/zoo/loader/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/loader/Makefile" ;;
     9538    "examples/zoo/loader/examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/loader/examples/Makefile" ;;
     9539    "examples/zoo/log/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/log/Makefile" ;;
     9540    "examples/zoo/note/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/note/Makefile" ;;
     9541    "examples/zoo/note/docs/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/note/docs/Makefile" ;;
     9542    "examples/zoo/number/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/number/Makefile" ;;
     9543    "examples/zoo/phase/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/phase/Makefile" ;;
     9544    "examples/zoo/sequence/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/sequence/Makefile" ;;
     9545    "examples/zoo/sequence/examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/sequence/examples/Makefile" ;;
     9546    "examples/zoo/string/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/string/Makefile" ;;
     9547    "examples/zoo/structure/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/structure/Makefile" ;;
     9548    "examples/zoo/structure/examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/structure/examples/Makefile" ;;
     9549    "examples/zoo/table/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zoo/table/Makefile" ;;
    61789550    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
    6179     "gui/apps/simsim") CONFIG_FILES="$CONFIG_FILES gui/apps/simsim" ;;
    6180     "gui/apps/rappture") CONFIG_FILES="$CONFIG_FILES gui/apps/rappture" ;;
    6181     "gui/apps/rappture.env") CONFIG_FILES="$CONFIG_FILES gui/apps/rappture.env" ;;
    6182 
    6183   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
    6184 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
     9551    "test/src/Makefile") CONFIG_FILES="$CONFIG_FILES test/src/Makefile" ;;
     9552
     9553  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
     9554$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    61859555   { (exit 1); exit 1; }; };;
    61869556  esac
     
    62219591} ||
    62229592{
    6223    echo "$me: cannot create a temporary directory in ." >&2
     9593   $as_echo "$as_me: cannot create a temporary directory in ." >&2
    62249594   { (exit 1); exit 1; }
    62259595}
    62269596
    6227 #
    6228 # Set up the sed scripts for CONFIG_FILES section.
    6229 #
    6230 
    6231 # No need to generate the scripts if there are no CONFIG_FILES.
    6232 # This happens for instance when ./config.status config.h
     9597# Set up the scripts for CONFIG_FILES section.
     9598# No need to generate them if there are no CONFIG_FILES.
     9599# This happens for instance with `./config.status config.h'.
    62339600if test -n "$CONFIG_FILES"; then
    62349601
    6235 _ACEOF
    6236 
    6237 
    6238 
     9602
     9603ac_cr='
     9604'
     9605ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
     9606if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
     9607  ac_cs_awk_cr='\\r'
     9608else
     9609  ac_cs_awk_cr=$ac_cr
     9610fi
     9611
     9612echo 'BEGIN {' >"$tmp/subs1.awk" &&
     9613_ACEOF
     9614
     9615
     9616{
     9617  echo "cat >conf$$subs.awk <<_ACEOF" &&
     9618  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
     9619  echo "_ACEOF"
     9620} >conf$$subs.sh ||
     9621  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     9622$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
     9623   { (exit 1); exit 1; }; }
     9624ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
    62399625ac_delim='%!_!# '
    62409626for ac_last_try in false false false false false :; do
    6241   cat >conf$$subs.sed <<_ACEOF
    6242 SHELL!$SHELL$ac_delim
    6243 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
    6244 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
    6245 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
    6246 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
    6247 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
    6248 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
    6249 exec_prefix!$exec_prefix$ac_delim
    6250 prefix!$prefix$ac_delim
    6251 program_transform_name!$program_transform_name$ac_delim
    6252 bindir!$bindir$ac_delim
    6253 sbindir!$sbindir$ac_delim
    6254 libexecdir!$libexecdir$ac_delim
    6255 datarootdir!$datarootdir$ac_delim
    6256 datadir!$datadir$ac_delim
    6257 sysconfdir!$sysconfdir$ac_delim
    6258 sharedstatedir!$sharedstatedir$ac_delim
    6259 localstatedir!$localstatedir$ac_delim
    6260 includedir!$includedir$ac_delim
    6261 oldincludedir!$oldincludedir$ac_delim
    6262 docdir!$docdir$ac_delim
    6263 infodir!$infodir$ac_delim
    6264 htmldir!$htmldir$ac_delim
    6265 dvidir!$dvidir$ac_delim
    6266 pdfdir!$pdfdir$ac_delim
    6267 psdir!$psdir$ac_delim
    6268 libdir!$libdir$ac_delim
    6269 localedir!$localedir$ac_delim
    6270 mandir!$mandir$ac_delim
    6271 DEFS!$DEFS$ac_delim
    6272 ECHO_C!$ECHO_C$ac_delim
    6273 ECHO_N!$ECHO_N$ac_delim
    6274 ECHO_T!$ECHO_T$ac_delim
    6275 LIBS!$LIBS$ac_delim
    6276 build_alias!$build_alias$ac_delim
    6277 host_alias!$host_alias$ac_delim
    6278 target_alias!$target_alias$ac_delim
    6279 VERSION!$VERSION$ac_delim
    6280 LIB_SEARCH_DIRS!$LIB_SEARCH_DIRS$ac_delim
    6281 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
    6282 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
    6283 INSTALL_DATA!$INSTALL_DATA$ac_delim
    6284 SET_MAKE!$SET_MAKE$ac_delim
    6285 CC!$CC$ac_delim
    6286 CFLAGS!$CFLAGS$ac_delim
    6287 LDFLAGS!$LDFLAGS$ac_delim
    6288 CPPFLAGS!$CPPFLAGS$ac_delim
    6289 ac_ct_CC!$ac_ct_CC$ac_delim
    6290 EXEEXT!$EXEEXT$ac_delim
    6291 OBJEXT!$OBJEXT$ac_delim
    6292 CPP!$CPP$ac_delim
    6293 GREP!$GREP$ac_delim
    6294 EGREP!$EGREP$ac_delim
    6295 CXX!$CXX$ac_delim
    6296 CXXFLAGS!$CXXFLAGS$ac_delim
    6297 ac_ct_CXX!$ac_ct_CXX$ac_delim
    6298 CXXCPP!$CXXCPP$ac_delim
    6299 F77!$F77$ac_delim
    6300 FFLAGS!$FFLAGS$ac_delim
    6301 ac_ct_F77!$ac_ct_F77$ac_delim
    6302 ENABLE_GUI!$ENABLE_GUI$ac_delim
    6303 TCLSH!$TCLSH$ac_delim
    6304 MEX!$MEX$ac_delim
    6305 MEX_ARCH!$MEX_ARCH$ac_delim
    6306 MEXEXT!$MEXEXT$ac_delim
    6307 MKOCTFILE!$MKOCTFILE$ac_delim
    6308 PERL!$PERL$ac_delim
    6309 PERL_INCLUDES!$PERL_INCLUDES$ac_delim
    6310 PERL_SITE_PACKAGES!$PERL_SITE_PACKAGES$ac_delim
    6311 PYTHON!$PYTHON$ac_delim
    6312 pythondir!$pythondir$ac_delim
    6313 PYTHON_VERSION!$PYTHON_VERSION$ac_delim
    6314 PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim
    6315 PYTHON_SITE_PACKAGES!$PYTHON_SITE_PACKAGES$ac_delim
    6316 RP_BASE!$RP_BASE$ac_delim
    6317 subdirs!$subdirs$ac_delim
    6318 LIBOBJS!$LIBOBJS$ac_delim
    6319 LTLIBOBJS!$LTLIBOBJS$ac_delim
    6320 _ACEOF
    6321 
    6322   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then
     9627  . ./conf$$subs.sh ||
     9628    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     9629$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
     9630   { (exit 1); exit 1; }; }
     9631
     9632  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
    63239633    break
    63249634  elif $ac_last_try; then
    6325     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
    6326 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
     9635    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     9636$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
    63279637   { (exit 1); exit 1; }; }
    63289638  else
     
    63309640  fi
    63319641done
    6332 
    6333 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
    6334 if test -n "$ac_eof"; then
    6335   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
    6336   ac_eof=`expr $ac_eof + 1`
    6337 fi
    6338 
    6339 cat >>$CONFIG_STATUS <<_ACEOF
    6340 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
    6341 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
    6342 _ACEOF
    6343 sed '
    6344 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
    6345 s/^/s,@/; s/!/@,|#_!!_#|/
    6346 :n
    6347 t n
    6348 s/'"$ac_delim"'$/,g/; t
    6349 s/$/\\/; p
    6350 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
    6351 ' >>$CONFIG_STATUS <conf$$subs.sed
    6352 rm -f conf$$subs.sed
    6353 cat >>$CONFIG_STATUS <<_ACEOF
    6354 :end
    6355 s/|#_!!_#|//g
    6356 CEOF$ac_eof
    6357 _ACEOF
    6358 
     9642rm -f conf$$subs.sh
     9643
     9644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     9645cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
     9646_ACEOF
     9647sed -n '
     9648h
     9649s/^/S["/; s/!.*/"]=/
     9650p
     9651g
     9652s/^[^!]*!//
     9653:repl
     9654t repl
     9655s/'"$ac_delim"'$//
     9656t delim
     9657:nl
     9658h
     9659s/\(.\{148\}\).*/\1/
     9660t more1
     9661s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
     9662p
     9663n
     9664b repl
     9665:more1
     9666s/["\\]/\\&/g; s/^/"/; s/$/"\\/
     9667p
     9668g
     9669s/.\{148\}//
     9670t nl
     9671:delim
     9672h
     9673s/\(.\{148\}\).*/\1/
     9674t more2
     9675s/["\\]/\\&/g; s/^/"/; s/$/"/
     9676p
     9677b
     9678:more2
     9679s/["\\]/\\&/g; s/^/"/; s/$/"\\/
     9680p
     9681g
     9682s/.\{148\}//
     9683t delim
     9684' <conf$$subs.awk | sed '
     9685/^[^""]/{
     9686  N
     9687  s/\n//
     9688}
     9689' >>$CONFIG_STATUS || ac_write_fail=1
     9690rm -f conf$$subs.awk
     9691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     9692_ACAWK
     9693cat >>"\$tmp/subs1.awk" <<_ACAWK &&
     9694  for (key in S) S_is_set[key] = 1
     9695  FS = ""
     9696
     9697}
     9698{
     9699  line = $ 0
     9700  nfields = split(line, field, "@")
     9701  substed = 0
     9702  len = length(field[1])
     9703  for (i = 2; i < nfields; i++) {
     9704    key = field[i]
     9705    keylen = length(key)
     9706    if (S_is_set[key]) {
     9707      value = S[key]
     9708      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
     9709      len += length(value) + length(field[++i])
     9710      substed = 1
     9711    } else
     9712      len += 1 + keylen
     9713  }
     9714
     9715  print line
     9716}
     9717
     9718_ACAWK
     9719_ACEOF
     9720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
     9721if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
     9722  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
     9723else
     9724  cat
     9725fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
     9726  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
     9727$as_echo "$as_me: error: could not setup config files machinery" >&2;}
     9728   { (exit 1); exit 1; }; }
     9729_ACEOF
    63599730
    63609731# VPATH may cause trouble with some makes, so we remove $(srcdir),
     
    63739744fi
    63749745
    6375 cat >>$CONFIG_STATUS <<\_ACEOF
     9746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    63769747fi # test -n "$CONFIG_FILES"
    63779748
    63789749
    6379 for ac_tag in  :F $CONFIG_FILES
     9750eval set X "  :F $CONFIG_FILES      "
     9751shift
     9752for ac_tag
    63809753do
    63819754  case $ac_tag in
     
    63849757  case $ac_mode$ac_tag in
    63859758  :[FHL]*:*);;
    6386   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
    6387 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     9759  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
     9760$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
    63889761   { (exit 1); exit 1; }; };;
    63899762  :[FH]-) ac_tag=-:-;;
     
    64149787           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
    64159788           esac ||
    6416            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
    6417 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
     9789           { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
     9790$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
    64189791   { (exit 1); exit 1; }; };;
    64199792      esac
    6420       ac_file_inputs="$ac_file_inputs $ac_f"
     9793      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     9794      ac_file_inputs="$ac_file_inputs '$ac_f'"
    64219795    done
    64229796
     
    64249798    # use $as_me), people would be surprised to read:
    64259799    #    /* config.h.  Generated by config.status.  */
    6426     configure_input="Generated from "`IFS=:
    6427           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
     9800    configure_input='Generated from '`
     9801          $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
     9802        `' by configure.'
    64289803    if test x"$ac_file" != x-; then
    64299804      configure_input="$ac_file.  $configure_input"
    6430       { echo "$as_me:$LINENO: creating $ac_file" >&5
    6431 echo "$as_me: creating $ac_file" >&6;}
     9805      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
     9806$as_echo "$as_me: creating $ac_file" >&6;}
    64329807    fi
     9808    # Neutralize special characters interpreted by sed in replacement strings.
     9809    case $configure_input in #(
     9810    *\&* | *\|* | *\\* )
     9811       ac_sed_conf_input=`$as_echo "$configure_input" |
     9812       sed 's/[\\\\&|]/\\\\&/g'`;; #(
     9813    *) ac_sed_conf_input=$configure_input;;
     9814    esac
    64339815
    64349816    case $ac_tag in
    6435     *:-:* | *:-) cat >"$tmp/stdin";;
     9817    *:-:* | *:-) cat >"$tmp/stdin" \
     9818      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
     9819$as_echo "$as_me: error: could not create $ac_file" >&2;}
     9820   { (exit 1); exit 1; }; } ;;
    64369821    esac
    64379822    ;;
     
    64439828         X"$ac_file" : 'X\(//\)$' \| \
    64449829         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
    6445 echo X"$ac_file" |
     9830$as_echo X"$ac_file" |
    64469831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    64479832            s//\1/
     
    64699854    while :; do
    64709855      case $as_dir in #(
    6471       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
     9856      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
    64729857      *) as_qdir=$as_dir;;
    64739858      esac
     
    64789863         X"$as_dir" : 'X\(//\)$' \| \
    64799864         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    6480 echo X"$as_dir" |
     9865$as_echo X"$as_dir" |
    64819866    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    64829867            s//\1/
     
    64999884    done
    65009885    test -z "$as_dirs" || eval "mkdir $as_dirs"
    6501   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
    6502 echo "$as_me: error: cannot create directory $as_dir" >&2;}
     9886  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
     9887$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
    65039888   { (exit 1); exit 1; }; }; }
    65049889  ac_builddir=.
     
    65079892.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
    65089893*)
    6509   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
     9894  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
    65109895  # A ".." for each directory in $ac_dir_suffix.
    6511   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
     9896  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
    65129897  case $ac_top_builddir_sub in
    65139898  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     
    65499934_ACEOF
    65509935
    6551 cat >>$CONFIG_STATUS <<\_ACEOF
     9936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    65529937# If the template does not know about datarootdir, expand it.
    65539938# FIXME: This hack should be removed a few years after 2.60.
    65549939ac_datarootdir_hack=; ac_datarootdir_seen=
    65559940
    6556 case `sed -n '/datarootdir/ {
     9941ac_sed_dataroot='
     9942/datarootdir/ {
    65579943  p
    65589944  q
     
    65639949/@localedir@/p
    65649950/@mandir@/p
    6565 ' $ac_file_inputs` in
     9951'
     9952case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
    65669953*datarootdir*) ac_datarootdir_seen=yes;;
    65679954*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
    6568   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
    6569 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
    6570 _ACEOF
    6571 cat >>$CONFIG_STATUS <<_ACEOF
     9955  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
     9956$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
     9957_ACEOF
     9958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    65729959  ac_datarootdir_hack='
    65739960  s&@datadir@&$datadir&g
     
    65839970# Shell code in configure.ac might set extrasub.
    65849971# FIXME: do we really want to maintain this feature?
    6585 cat >>$CONFIG_STATUS <<_ACEOF
    6586   sed "$ac_vpsub
     9972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     9973ac_sed_extra="$ac_vpsub
    65879974$extrasub
    65889975_ACEOF
    6589 cat >>$CONFIG_STATUS <<\_ACEOF
     9976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    65909977:t
    65919978/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
    6592 s&@configure_input@&$configure_input&;t t
     9979s|@configure_input@|$ac_sed_conf_input|;t t
    65939980s&@top_builddir@&$ac_top_builddir_sub&;t t
     9981s&@top_build_prefix@&$ac_top_build_prefix&;t t
    65949982s&@srcdir@&$ac_srcdir&;t t
    65959983s&@abs_srcdir@&$ac_abs_srcdir&;t t
     
    66019989s&@INSTALL@&$ac_INSTALL&;t t
    66029990$ac_datarootdir_hack
    6603 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
     9991"
     9992eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
     9993  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
     9994$as_echo "$as_me: error: could not create $ac_file" >&2;}
     9995   { (exit 1); exit 1; }; }
    66049996
    66059997test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
    66069998  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
    66079999  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
    6608   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     10000  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    660910001which seems to be undefined.  Please make sure it is defined." >&5
    6610 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     10002$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    661110003which seems to be undefined.  Please make sure it is defined." >&2;}
    661210004
    661310005  rm -f "$tmp/stdin"
    661410006  case $ac_file in
    6615   -) cat "$tmp/out"; rm -f "$tmp/out";;
    6616   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
    6617   esac
     10007  -) cat "$tmp/out" && rm -f "$tmp/out";;
     10008  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
     10009  esac \
     10010  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
     10011$as_echo "$as_me: error: could not create $ac_file" >&2;}
     10012   { (exit 1); exit 1; }; }
    661810013 ;;
    661910014
     
    662910024chmod +x $CONFIG_STATUS
    663010025ac_clean_files=$ac_clean_files_save
     10026
     10027test $ac_write_fail = 0 ||
     10028  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
     10029$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
     10030   { (exit 1); exit 1; }; }
    663110031
    663210032
     
    665710057if test "$no_recursion" != yes; then
    665810058
    6659   # Remove --cache-file and --srcdir arguments so they do not pile up.
     10059  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
     10060  # so they do not pile up.
    666010061  ac_sub_configure_args=
    666110062  ac_prev=
     
    668610087    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    668710088      ;;
     10089    --disable-option-checking)
     10090      ;;
    668810091    *)
    668910092      case $ac_arg in
    6690       *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     10093      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    669110094      esac
    669210095      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
     
    669810101  ac_arg="--prefix=$prefix"
    669910102  case $ac_arg in
    6700   *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     10103  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    670110104  esac
    670210105  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
     
    670710110  fi
    670810111
     10112  # Always prepend --disable-option-checking to silence warnings, since
     10113  # different subdirs can have different --enable and --with options.
     10114  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
     10115
    670910116  ac_popdir=`pwd`
    671010117  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
     
    671510122
    671610123    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
    6717     echo "$as_me:$LINENO: $ac_msg" >&5
    6718     echo "$ac_msg" >&6
     10124    $as_echo "$as_me:$LINENO: $ac_msg" >&5
     10125    $as_echo "$ac_msg" >&6
    671910126    { as_dir="$ac_dir"
    672010127  case $as_dir in #(
     
    672510132    while :; do
    672610133      case $as_dir in #(
    6727       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
     10134      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
    672810135      *) as_qdir=$as_dir;;
    672910136      esac
     
    673410141         X"$as_dir" : 'X\(//\)$' \| \
    673510142         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    6736 echo X"$as_dir" |
     10143$as_echo X"$as_dir" |
    673710144    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    673810145            s//\1/
     
    675510162    done
    675610163    test -z "$as_dirs" || eval "mkdir $as_dirs"
    6757   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
    6758 echo "$as_me: error: cannot create directory $as_dir" >&2;}
     10164  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
     10165$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
    675910166   { (exit 1); exit 1; }; }; }
    676010167    ac_builddir=.
     
    676310170.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
    676410171*)
    6765   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
     10172  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
    676610173  # A ".." for each directory in $ac_dir_suffix.
    6767   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
     10174  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
    676810175  case $ac_top_builddir_sub in
    676910176  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     
    680410211      ac_sub_configure=$ac_aux_dir/configure
    680510212    else
    6806       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
    6807 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
     10213      { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
     10214$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
    680810215      ac_sub_configure=
    680910216    fi
     
    681810225      esac
    681910226
    6820       { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
    6821 echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
     10227      { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
     10228$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
    682210229      # The eval makes quoting arguments work.
    682310230      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
    682410231           --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
    6825         { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
    6826 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
     10232        { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
     10233$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
    682710234   { (exit 1); exit 1; }; }
    682810235    fi
     
    683110238  done
    683210239fi
    6833 
     10240if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
     10241  { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
     10242$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
     10243fi
     10244
  • trunk/configure.in

    r942 r1018  
    1 AC_INIT(Rappture Core and Bindings, 1.1, rappture@nanohub.org)
    2 
    3 VERSION=0.0.1
    4 AC_SUBST(VERSION)
     1AC_INIT([Rappture], [1.1], [rappture@nanohub.org])
    52
    63#------------------------------------------------------------------------
     
    2926AC_PROG_CC
    3027AC_LANG_C
     28
     29AC_PROG_INSTALL
     30AC_PROG_RANLIB
     31AC_PROG_LN_S
    3132
    3233AC_HEADER_STDC
     
    4243AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
    4344
    44 AC_PROG_F77([g77 f77 fort77 f90 xlf xlf90 fl32])
    45 
    46 
    47 
     45AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
     46
     47SC_CONFIG_GCC
     48SC_CONFIG_CFLAGS
     49SC_MAKE_LIB
    4850
    4951AC_ARG_ENABLE(
     
    6870dnl AC_SUBST(BUILD_TCL)
    6971
     72with_tclsh="check"
    7073AC_ARG_WITH(
    7174    [tclsh],
     
    377380AC_SUBST(PYTHON_SITE_PACKAGES)
    378381
     382AC_ARG_WITH(
     383    [ruby],
     384    [AS_HELP_STRING([--with-ruby[=DIR]], [location of ruby @<:@default=check@:>@])],
     385    [],
     386    [with_ruby=check])
     387
     388RUBY=""
     389if test "$with_ruby" != "no" ; then
     390    AC_MSG_CHECKING([for ruby])
     391    if test -x "$with_ruby/bin/ruby"
     392    then
     393        echo Found perl in $with_ruby/bin/ruby
     394        PERL="$with_ruby/bin/ruby"
     395    else
     396        if test -x "$with_ruby"
     397        then
     398            echo Found ruby in $with_ruby
     399            PERL="$with_ruby"
     400        else
     401            AC_PATH_PROG(RUBY, ruby)
     402        fi
     403    fi
     404fi
     405AC_MSG_RESULT([${RUBY}])
     406AC_SUBST(RUBY)
    379407
    380408RP_BASE=`pwd`
    381409AC_SUBST(RP_BASE)
    382410
    383 if test "$ENABLE_GUI" == "yes" ; then
    384     AC_CONFIG_SUBDIRS( gui )
    385 fi
    386 
    387 if test "$TCLSH" != "" ; then
    388     AC_CONFIG_SUBDIRS( src/tcl )
    389 fi
    390 
    391 ls
    392 AC_CONFIG_SUBDIRS( [optimizer/src] )
     411SC_ENABLE_SHARED
     412
     413#--------------------------------------------------------------------
     414# This macro figures out what flags to use with the compiler/linker
     415# when building shared/static debug/optimized objects.  This information
     416# is all taken from the tclConfig.sh file.
     417#--------------------------------------------------------------------
     418
     419AC_SUBST(CFLAGS_DEBUG)
     420AC_SUBST(CFLAGS_OPTIMIZE)
     421AC_SUBST(STLIB_LD)
     422AC_SUBST(SHLIB_LD)
     423AC_SUBST(SHLIB_CFLAGS)
     424AC_SUBST(SHLIB_LDFLAGS)
     425AC_SUBST(SHLIB_SUFFIX)
     426
     427#--------------------------------------------------------------------
     428# Set the default compiler switches based on the --enable-symbols
     429# option.
     430#--------------------------------------------------------------------
     431
     432SC_ENABLE_SYMBOLS
     433
     434if test "${SHARED_BUILD}" = "1" ; then
     435    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
     436else
     437    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
     438fi
     439
     440AC_CONFIG_SUBDIRS( [packages/optimizer/src] )
    393441
    394442dnl read Makefile.in and write Makefile
    395 AC_OUTPUT(  Makefile \
    396             examples/demo.bash
    397             examples/app-fermi/cee/Makefile \
    398             examples/app-fermi/fortran/Makefile \
    399             examples/app-fermi/wrapper/cee/Makefile \
    400             examples/c-example/Makefile \
    401             optimizer/src/Makefile \
    402             perl/Makefile.PL \
    403             python/setup.py \
    404             src/Makefile \
    405             src/matlab/Makefile \
    406             src/octave/Makefile \
    407             src2/core/Makefile \
    408             test/Makefile \
    409             gui/apps/simsim \
    410             gui/apps/rappture \
    411             gui/apps/rappture.env   )
     443AC_OUTPUT( [
     444        Makefile
     445        packages/Makefile
     446        src/Makefile
     447        src/core/Makefile
     448        src/core2/Makefile
     449        src/objects/Makefile
     450        gui/Makefile
     451        gui/apps/Makefile
     452        gui/apps/rappture
     453        gui/apps/rappture.env
     454        gui/apps/simsim
     455        gui/pkgIndex.tcl
     456        gui/scripts/Makefile
     457        gui/src/Makefile
     458        lang/Makefile
     459        lang/perl/Makefile
     460        lang/perl/Makefile.PL
     461        lang/python/Makefile
     462        lang/python/setup.py
     463        lang/matlab/Makefile
     464        lang/octave/Makefile
     465        lang/ruby/Makefile
     466        lang/ruby/build.rb
     467        lang/tcl/Makefile
     468        lang/tcl/pkgIndex.tcl
     469        lang/tcl/src/Makefile
     470        lang/tcl/scripts/Makefile
     471        lang/tcl/tests/Makefile
     472        examples/Makefile
     473        examples/3D/Makefile
     474        examples/app-fermi/Makefile
     475        examples/app-fermi/cee/Makefile
     476        examples/app-fermi/fortran/Makefile
     477        examples/app-fermi/matlab/Makefile
     478        examples/app-fermi/octave/Makefile
     479        examples/app-fermi/perl/Makefile
     480        examples/app-fermi/python/Makefile
     481        examples/app-fermi/ruby/Makefile
     482        examples/app-fermi/tcl/Makefile
     483        examples/app-fermi/wrapper/Makefile
     484        examples/app-fermi/wrapper/cee/Makefile
     485        examples/app-fermi/wrapper/python/Makefile
     486        examples/app-fermi/wrapper/tcl/Makefile
     487        examples/c-example/Makefile
     488        examples/canvas/Makefile
     489        examples/demo.bash
     490        examples/graph/Makefile
     491        examples/zoo/Makefile
     492        examples/zoo/binary/Makefile
     493        examples/zoo/boolean/Makefile
     494        examples/zoo/choice/Makefile
     495        examples/zoo/cloud/Makefile
     496        examples/zoo/cloud/matlab/Makefile
     497        examples/zoo/curve/Makefile
     498        examples/zoo/enable/Makefile
     499        examples/zoo/field/Makefile
     500        examples/zoo/group/Makefile
     501        examples/zoo/image/Makefile
     502        examples/zoo/image/docs/Makefile
     503        examples/zoo/image/examples/Makefile 
     504        examples/zoo/integer/Makefile
     505        examples/zoo/loader/Makefile
     506        examples/zoo/loader/examples/Makefile
     507        examples/zoo/log/Makefile
     508        examples/zoo/note/Makefile
     509        examples/zoo/note/docs/Makefile
     510        examples/zoo/number/Makefile
     511        examples/zoo/phase/Makefile
     512        examples/zoo/sequence/Makefile
     513        examples/zoo/sequence/examples/Makefile
     514        examples/zoo/string/Makefile
     515        examples/zoo/structure/Makefile
     516        examples/zoo/structure/examples/Makefile
     517        examples/zoo/table/Makefile
     518        test/Makefile
     519        test/src/Makefile
     520])
  • trunk/examples/app-fermi/cee/Makefile.in

    r833 r1018  
    1 # define rappture src directory
    2 ifndef RP_BASE
    3 RP_BASE         = @prefix@
    4 endif
    51
    6 PROGS           = fermi
     2bindir          = @bindir@
     3datadir         = @datadir@
     4datarootdir     = @datarootdir@
     5exec_prefix     = @exec_prefix@
     6includedir      = @includedir@
     7libdir          = @libdir@
     8mandir          = @mandir@
     9prefix          = @prefix@
     10srcdir          = @srcdir@
    711
    8 # define our compiling environment
    9 #
     12destdir         = $(prefix)/examples/app-fermi/cee
     13
     14INSTALL         = @INSTALL@
     15
    1016CC              = @CC@
    11 CXX             = @CXX@
    12 DEBUG           = -g -Wall
    13 DEBUG_PLUS      = -g -DDEBUG
     17CFLAGS          = @CFLAGS@
     18CDEBUGFLAGS     = -g -Wall
     19VPATH           = $(srcdir)
    1420
    15 # define our directories
    16 #
    17 INCLUDES_DIR    = $(RP_BASE)/include
    18 INCL_CEE        = -I $(INCLUDES_DIR)/cee
    19 INCL_CORE       = -I $(INCLUDES_DIR)/core
    20 INCL_RP_DEPS    = -I $(RP_BASE)/include
     21INCLUDES        = -I$(srcdir)/../../../src/core
     22LIBS            = -L../../../src/core -lrappture \
     23                  -L$(libdir) -lexpat -lb64 -lz
    2124
    22 INCL_FILES      = $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS)
     25CC_SWITCHES     = $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES)
    2326
    24 LIB_DIR         = $(RP_BASE)/lib
    25 LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
     27FILES           = \
     28                $(srcdir)/tool.xml \
     29                $(srcdir)/fermi.c
    2630
    27 all: $(PROGS)
     31all: fermi
    2832
    2933fermi: fermi.c
    30         @if test "`uname`" == "Darwin"; then \
    31                 $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< -L$(LIB_DIR) -lrappture -lscew; \
    32         else \
    33                 $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE) -lm; \
    34         fi
     34        $(CC) $(CC_SWITCHES) $< -o $@ $(LIBS)
    3535
    36 #### CLEAN UP ############################################################
     36install: fermi
     37        $(INSTALL) -d $(destdir)
     38        for i in $(FILES) ; do \
     39          $(INSTALL) -m 444 $$i $(destdir) ; \
     40        done
     41        $(INSTALL) -m 555 fermi $(destdir)
     42
    3743clean:
    38         rm -f $(PROGS) run*.xml
     44        $(RM) fermi run*.xml
    3945
    4046distclean: clean
    41         rm Makefile
     47        $(RM) Makefile
  • trunk/examples/app-fermi/fortran/Makefile.in

    r833 r1018  
    1 # Makefile for app-fermi/fortran example
    2 #
    3 # Replace this with the location of your rappture installation:
    4 ifndef RP_BASE
    5 RP_BASE = @prefix@
    6 endif
    71
    8 # no need to edit the rest...
    9 PROGS = fermi
     2bindir          = @bindir@
     3datadir         = @datadir@
     4datarootdir     = @datarootdir@
     5exec_prefix     = @exec_prefix@
     6includedir      = @includedir@
     7libdir          = @libdir@
     8mandir          = @mandir@
     9prefix          = @prefix@
     10srcdir          = @srcdir@
    1011
    11 F77 = @F77@
     12destdir         = $(prefix)/examples/app-fermi/fortran
    1213
    13 LIB_DIR = $(RP_BASE)/lib
    14 LIB_RAPPTURE = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
     14INSTALL         = @INSTALL@
    1515
    16 all: $(PROGS)
     16FC              = @F77@
     17FCFLAGS         = @CFLAGS@
     18FCDEBUGFLAGS    = -Wall -g
     19VPATH           = $(srcdir)
    1720
    18 fermi: fermi.f
    19         @if test "`uname`" == "Darwin"; then \
    20                 $(F77) -g -L$(LIB_DIR) -lrappture -lscew -o $@ $< ;\
    21         else \
    22                 $(F77) -g -Wall $(LIB_RAPPTURE) -o $@ $< ;\
    23         fi
     21INCLUDES        = -I$(srcdir)/../../../src/core
     22LIBS            = -L../../../src/core -lrappture \
     23                  -L$(libdir) -lexpat -lb64 -lz
     24
     25FC_SWITCHES     = $(FCFLAGS) $(FCDEBUGFLAGS) $(DEFINES) $(INCLUDES)
     26
     27FILES           = \
     28                $(srcdir)/fermi.f \
     29                $(srcdir)/tool.xml
     30
     31all: fermi
     32
     33fermi: $(srcdir)/fermi.f
     34        $(FC) $(FC_SWITCHES) $< -o $@ $(LIBS)
     35
     36install: fermi
     37        $(INSTALL) -d $(destdir)
     38        for i in $(FILES) ; do \
     39          $(INSTALL) -m 444 $$i $(destdir) ; \
     40        done
     41        $(INSTALL) -m 555 fermi $(destdir)
    2442
    2543
    2644clean:
    27         rm -f *.o $(PROGS) run*.xml
     45        $(RM) fermi run*.xml
    2846
    2947distclean: clean
    30         rm Makefile
     48        $(RM) Makefile
  • trunk/examples/app-fermi/wrapper/cee/Makefile.in

    r833 r1018  
    1 # define rappture src directory
    2 ifndef RP_BASE
    3 RP_BASE         = @prefix@
    4 endif
    51
    6 PROGS           = fermi
     2bindir          = @bindir@
     3datadir         = @datadir@
     4datarootdir     = @datarootdir@
     5exec_prefix     = @exec_prefix@
     6includedir      = @includedir@
     7libdir          = @libdir@
     8mandir          = @mandir@
     9prefix          = @prefix@
     10srcdir          = @srcdir@
    711
    8 # define our compiling environment
    9 #
     12destdir         = $(prefix)/examples/app-fermi/wrapper/cee
     13
     14INSTALL         = @INSTALL@
     15
    1016CC              = @CC@
    11 CXX             = @CXX@
    12 DEBUG           = -g -Wall
    13 DEBUG_PLUS      = -g -DDEBUG
     17CFLAGS          = @CFLAGS@
     18CDEBUGFLAGS     = -g -Wall
     19VPATH           = $(srcdir)
    1420
    15 # define our directories
    16 #
    17 INCLUDES_DIR    = $(RP_BASE)/include
    18 INCL_CEE        = -I $(INCLUDES_DIR)/cee
    19 INCL_CORE       = -I $(INCLUDES_DIR)/core
    20 INCL_RP_DEPS    = -I $(RP_BASE)/include
     21INCLUDES        = -I$(srcdir)/../../../../src/core
     22LIBS            = -L../../../../src/core -lrappture \
     23                  -L$(libdir) -lexpat -lb64 -lz
    2124
    22 INCL_FILES      = $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS)
     25CC_SWITCHES     = $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES)
    2326
    24 LIB_DIR         = $(RP_BASE)/lib
    25 LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
     27FILES           = \
     28                $(srcdir)/fermi.m \
     29                $(srcdir)/fermi.c \
     30                $(srcdir)/tool.xml
    2631
    27 all: $(PROGS)
     32all: fermi
    2833
    2934fermi: fermi.c
    30         @if test "`uname`" == "Darwin"; then \
    31                 $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< -L$(LIB_DIR) -lrappture -lscew; \
    32         else \
    33                 $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE) -lm; \
    34         fi
     35        $(CC) $(CC_SWITCHES) $< -o $@ $(LIBS)
    3536
    36 #### CLEAN UP ############################################################
     37install: fermi
     38        $(INSTALL) -d $(destdir)
     39        for i in $(FILES) ; do \
     40          $(INSTALL) -m 444 $$i $(destdir) ; \
     41        done
     42        $(INSTALL) -m 555 fermi $(destdir)
     43
    3744clean:
    38         rm -f $(PROGS) run*.xml
     45        $(RM) fermi run*.xml
    3946
    4047distclean: clean
    41         rm Makefile
     48        $(RM) Makefile
  • trunk/examples/demo.bash.in

    r512 r1018  
    77#
    88
     9PYTHONPATH=@prefix@/lib/python2.5/site-packages
     10export PYTHONPATH
    911rpdir=@prefix@
    1012
  • trunk/gui/Makefile.in

    r951 r1018  
    1 # Makefile.in --
    2 #
    3 #       This file is a Makefile for Sample TEA Extension.  If it has the name
    4 #       "Makefile.in" then it is a template for a Makefile;  to generate the
    5 #       actual Makefile, run "./configure", which is a configuration script
    6 #       generated by the "autoconf" program (constructs like "@foo@" will get
    7 #       replaced in the actual Makefile.
    8 #
    9 # Copyright (c) 1999 Scriptics Corporation.
    10 # Copyright (c) 2002-2005 ActiveState Corporation.
    11 #
    12 # See the file "license.terms" for information on usage and redistribution
    13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14 #
    15 # RCS: @(#) $Id: Makefile.in,v 1.60 2005/09/13 22:06:37 hobbs Exp $
    16 
    17 #========================================================================
    18 # Add additional lines to handle any additional AC_SUBST cases that
    19 # have been added in a customized configure script.
    20 #========================================================================
    21 
    22 #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
    23 BLT_SRC_DIR = @BLT_SRC_DIR@
    24 
    25 
    26 #========================================================================
    27 # Nothing of the variables below this line should need to be changed.
    28 # Please check the TARGETS section below to make sure the make targets
    29 # are correct.
    30 #========================================================================
    31 
    32 #========================================================================
    33 # The names of the source files is defined in the configure script.
    34 # The object files are used for linking into the final library.
    35 # This will be used when a dist target is added to the Makefile.
    36 # It is not important to specify the directory, as long as it is the
    37 # $(srcdir) or in the generic, win or unix subdirectory.
    38 #========================================================================
    39 
    40 PKG_SOURCES     = @PKG_SOURCES@
    41 PKG_OBJECTS     = @PKG_OBJECTS@
    42 
    43 PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
    44 PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
    45 
    46 #========================================================================
    47 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
    48 # this package that need to be installed, if any.
    49 #========================================================================
    50 
    51 PKG_TCL_SOURCES = `ls scripts/*.tcl`
    52 
    53 #========================================================================
    54 # This is a list of public header files to be installed, if any.
    55 #========================================================================
    56 
    57 PKG_HEADERS     = @PKG_HEADERS@
    58 
    59 #========================================================================
    60 # "PKG_LIB_FILE" refers to the library (dynamic or static as per
    61 # configuration options) composed of the named objects.
    62 #========================================================================
    63 
    64 PKG_LIB_FILE    = @PKG_LIB_FILE@
    65 PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
    66 
    67 lib_BINARIES    = $(PKG_LIB_FILE)
    68 BINARIES        = $(lib_BINARIES)
    69 
    70 SHELL           = @SHELL@
    711
    722srcdir          = @srcdir@
    733prefix          = @prefix@
    744exec_prefix     = @exec_prefix@
    75 
    765bindir          = @bindir@
    776libdir          = @libdir@
     
    8110includedir      = @includedir@
    8211
    83 DESTDIR         =
     12SHELL           = @SHELL@
     13INSTALL         = @INSTALL@
     14VPATH           = $(srcdir)
     15TCLSH           = @TCLSH@
    8416
    85 PKG_DIR         = $(PACKAGE_NAME)$(PACKAGE_VERSION)
    86 pkgdatadir      = $(datadir)/$(PKG_DIR)
    87 pkglibdir       = $(libdir)/$(PKG_DIR)
    88 pkgincludedir   = $(includedir)/$(PKG_DIR)
     17PACKAGE_VERSION = @PACKAGE_VERSION@
    8918
    90 top_builddir    = .
     19version         = $(PACKAGE_VERSION)
     20name            = RapptureGUI$(version)
    9121
    92 INSTALL         = @INSTALL@
    93 INSTALL_PROGRAM = @INSTALL_PROGRAM@
    94 INSTALL_DATA    = @INSTALL_DATA@
    95 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
     22destdir         = $(libdir)/$(name)
    9623
    97 PACKAGE_NAME    = @PACKAGE_NAME@
    98 PACKAGE_VERSION = @PACKAGE_VERSION@
    99 CC              = @CC@
    100 CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    101 CFLAGS_WARNING  = @CFLAGS_WARNING@
    102 CLEANFILES      = @CLEANFILES@
    103 EXEEXT          = @EXEEXT@
    104 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
    105 MAKE_LIB        = @MAKE_LIB@
    106 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
    107 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
    108 MAKE_STUB_LIB   = @MAKE_STUB_LIB@
    109 OBJEXT          = @OBJEXT@
    110 RANLIB          = @RANLIB@
    111 RANLIB_STUB     = @RANLIB_STUB@
    112 SHLIB_CFLAGS    = @SHLIB_CFLAGS@
    113 SHLIB_LD        = @SHLIB_LD@
    114 SHLIB_LD_LIBS   = @SHLIB_LD_LIBS@
    115 STLIB_LD        = @STLIB_LD@
    116 #TCL_DEFS       = @TCL_DEFS@
    117 TCL_BIN_DIR     = @TCL_BIN_DIR@
    118 TCL_SRC_DIR     = @TCL_SRC_DIR@
    119 #TK_BIN_DIR     = @TK_BIN_DIR@
    120 #TK_SRC_DIR     = @TK_SRC_DIR@
     24FILES           = \
     25                pkgIndex.tcl
    12126
    122 # Not used, but retained for reference of what libs Tcl required
    123 #TCL_LIBS       = @TCL_LIBS@
     27.PHONY: src scripts apps
    12428
    125 #========================================================================
    126 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
    127 # package without installing.  The other environment variables allow us
    128 # to test against an uninstalled Tcl.  Add special env vars that you
    129 # require for testing here (like TCLX_LIBRARY).
    130 #========================================================================
     29all: scripts apps
    13130
    132 EXTRA_PATH      = $(top_builddir):$(TCL_BIN_DIR)
    133 #EXTRA_PATH     = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
    134 TCLLIBPATH      = $(top_builddir)
    135 TCLSH_ENV       = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
    136                   @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
    137                   PATH="$(EXTRA_PATH):$(PATH)" \
    138                   TCLLIBPATH="$(TCLLIBPATH)"
    139 #                 TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
     31scripts:
     32        $(MAKE) -C scripts all
     33src:
     34        $(MAKE) -C all
     35apps:
     36        $(MAKE) -C apps all
    14037
    141 TCLSH_PROG      = @TCLSH_PROG@
    142 TCLSH   = $(TCLSH_ENV) $(TCLSH_PROG)
     38install: install_scripts install_apps
     39        $(INSTALL) -d $(destdir)
     40        @for i in $(FILES); do \
     41            echo "Installing $$i" ; \
     42            $(INSTALL) -m 444 $$i $(destdir) ; \
     43        done
     44        $(INSTALL) -m 444 pkgIndex.tcl $(destdir)
    14345
    144 #WISH_PROG      = @WISH_PROG@
    145 #WISH   = $(TCLSH_ENV) $(WISH_PROG)
     46install_scripts: scripts
     47        $(MAKE) -C scripts install
     48install_apps: apps
     49        $(MAKE) -C apps install
    14650
    147 
    148 SHARED_BUILD    = @SHARED_BUILD@
    149 
    150 INCLUDES        = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ -I$(BLT_SRC_DIR)
    151 #INCLUDES       = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
    152 
    153 PKG_CFLAGS      = @PKG_CFLAGS@
    154 
    155 # TCL_DEFS is not strictly need here, but if you remove it, then you
    156 # must make sure that configure.in checks for the necessary components
    157 # that your library may use.  TCL_DEFS can actually be a problem if
    158 # you do not compile with a similar machine setup as the Tcl core was
    159 # compiled with.
    160 #DEFS           = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
    161 DEFS            = @DEFS@ $(PKG_CFLAGS)
    162 
    163 CONFIG_CLEAN_FILES = Makefile
    164 
    165 CPPFLAGS        = @CPPFLAGS@
    166 LIBS            = @PKG_LIBS@ @LIBS@
    167 AR              = @AR@
    168 CFLAGS          = @CFLAGS@
    169 COMPILE         = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    170 
    171 #========================================================================
    172 # Start of user-definable TARGETS section
    173 #========================================================================
    174 
    175 #========================================================================
    176 # TEA TARGETS.  Please note that the "libraries:" target refers to platform
    177 # independent files, and the "binaries:" target inclues executable programs and
    178 # platform-dependent libraries.  Modify these targets so that they install
    179 # the various pieces of your package.  The make and install rules
    180 # for the BINARIES that you specified above have already been done.
    181 #========================================================================
    182 
    183 all: binaries libraries doc
    184 
    185 #========================================================================
    186 # The binaries target builds executable programs, Windows .dll's, unix
    187 # shared/static libraries, and any other platform-dependent files.
    188 # The list of targets to build for "binaries:" is specified at the top
    189 # of the Makefile, in the "BINARIES" variable.
    190 #========================================================================
    191 
    192 binaries: $(BINARIES)
    193 
    194 libraries:
    195 
    196 #========================================================================
    197 # Your doc target should differentiate from doc builds (by the developer)
    198 # and doc installs (see install-doc), which just install the docs on the
    199 # end user machine when building from source.
    200 #========================================================================
    201 
    202 doc:
    203 #       @echo "If you have documentation to create, place the commands to"
    204 #       @echo "build the docs in the 'doc:' target.  For example:"
    205 #       @echo "        xml2nroff sample.xml > sample.n"
    206 #       @echo "        xml2html sample.xml > sample.html"
    207 
    208 install: all install-binaries install-libraries install-doc
    209 
    210 install-binaries: binaries install-lib-binaries install-bin-binaries
    211 
    212 #========================================================================
    213 # This rule installs platform-independent files, such as header files.
    214 # The list=...; for p in $$list handles the empty list case x-platform.
    215 #========================================================================
    216 
    217 install-libraries: libraries
    218         @mkdir -p $(DESTDIR)$(includedir)
    219         @echo "Installing header files in $(DESTDIR)$(includedir)"
    220         @list='$(PKG_HEADERS)'; for i in $$list; do \
    221             echo "Installing $(srcdir)/$$i" ; \
    222             $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
    223         done;
    224 
    225 #========================================================================
    226 # Install documentation.  Unix manpages should go in the $(mandir)
    227 # directory.
    228 #========================================================================
    229 
    230 install-doc: doc
    231 #       @mkdir -p $(DESTDIR)$(mandir)/mann
    232 #       @echo "Installing documentation in $(DESTDIR)$(mandir)"
    233 #       @list='$(srcdir)/doc/*.n'; for i in $$list; do \
    234 #           echo "Installing $$i"; \
    235 #           rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
    236 #           $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
    237 #       done
    238 
    239 test: binaries libraries
    240         $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
    241 
    242 shell: binaries libraries
    243         @$(TCLSH) $(SCRIPT)
    244 
    245 gdb:
    246         $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
    247 
    248 depend:
    249 
    250 #========================================================================
    251 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
    252 # mentioned above.  That will ensure that this target is built when you
    253 # run "make binaries".
    254 #
    255 # The $(PKG_OBJECTS) objects are created and linked into the final
    256 # library.  In most cases these object files will correspond to the
    257 # source files above.
    258 #========================================================================
    259 
    260 $(PKG_LIB_FILE): $(PKG_OBJECTS)
    261         -rm -f $(PKG_LIB_FILE)
    262         ${MAKE_LIB}
    263         $(RANLIB) $(PKG_LIB_FILE)
    264 
    265 $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
    266         -rm -f $(PKG_STUB_LIB_FILE)
    267         ${MAKE_STUB_LIB}
    268         $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
    269 
    270 #========================================================================
    271 # We need to enumerate the list of .c to .o lines here.
    272 #
    273 # In the following lines, $(srcdir) refers to the toplevel directory
    274 # containing your extension.  If your sources are in a subdirectory,
    275 # you will have to modify the paths to reflect this:
    276 #
    277 # sample.$(OBJEXT): $(srcdir)/generic/sample.c
    278 #       $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
    279 #
    280 # Setting the VPATH variable to a list of paths will cause the makefile
    281 # to look into these paths when resolving .c to .obj dependencies.
    282 # As necessary, add $(srcdir):$(srcdir)/compat:....
    283 #========================================================================
    284 
    285 VPATH = $(srcdir):$(srcdir)/src:$(srcdir)/unix:$(srcdir)/win
    286 
    287 .c.@OBJEXT@:
    288         $(COMPILE) -c `@CYGPATH@ $<` -o $@
    289 
    290 #========================================================================
    291 # Distribution creation
    292 # You may need to tweak this target to make it work correctly.
    293 #========================================================================
    294 
    295 #COMPRESS       = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
    296 COMPRESS        = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
    297 DIST_ROOT       = /tmp/dist
    298 DIST_DIR        = $(DIST_ROOT)/$(PKG_DIR)
    299 
    300 dist-clean:
    301         rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
    302 
    303 dist: dist-clean
    304         mkdir -p $(DIST_DIR)
    305         cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
    306                 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
    307                 $(DIST_DIR)/
    308         chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
    309         chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
    310 
    311         for i in $(srcdir)/*.[ch]; do \
    312             if [ -f $$i ]; then \
    313                 cp -p $$i $(DIST_DIR)/ ; \
    314             fi; \
    315         done;
    316 
    317         mkdir $(DIST_DIR)/tclconfig
    318         cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
    319                 $(DIST_DIR)/tclconfig/
    320         chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
    321         chmod +x $(DIST_DIR)/tclconfig/install-sh
    322 
    323         list='demos doc generic library mac tests unix win'; \
    324         for p in $$list; do \
    325             if test -d $(srcdir)/$$p ; then \
    326                 mkdir $(DIST_DIR)/$$p; \
    327                 cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
    328             fi; \
    329         done
    330 
    331         (cd $(DIST_ROOT); $(COMPRESS);)
    332 
    333 #========================================================================
    334 # End of user-definable section
    335 #========================================================================
    336 
    337 #========================================================================
    338 # Don't modify the file to clean here.  Instead, set the "CLEANFILES"
    339 # variable in configure.in
    340 #========================================================================
     51test:
     52        #$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
    34153
    34254clean:
    343         -test -z "$(BINARIES)" || rm -f $(BINARIES)
    344         -rm -f *.$(OBJEXT) core *.core
    345         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
     55        $(MAKE) -C scripts clean
     56        $(MAKE) -C apps clean
    34657
    347 distclean: clean
    348         -rm -f *.tab.c
    349         -rm -f $(CONFIG_CLEAN_FILES)
    350         -rm -f config.cache config.log config.status
     58distclean:
     59        $(MAKE) -C scripts distclean
     60        $(MAKE) -C apps distclean
     61        $(RM) Makefile pkgIndex.tcl
     62        $(RM) config.cache config.log config.status
    35163
    352 #========================================================================
    353 # Install binary object libraries.  On Windows this includes both .dll and
    354 # .lib files.  Because the .lib files are not explicitly listed anywhere,
    355 # we need to deduce their existence from the .dll file of the same name.
    356 # Library files go into the lib directory.
    357 # In addition, this will generate the pkgIndex.tcl
    358 # file in the install location (assuming it can find a usable tclsh shell)
    359 #
    360 # You should not have to modify this target.
    361 #========================================================================
    362 
    363 install-lib-binaries: binaries
    364         @mkdir -p $(DESTDIR)$(pkglibdir)
    365         @list='$(lib_BINARIES)'; for p in $$list; do \
    366           if test -f $$p; then \
    367             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
    368             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
    369             stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
    370             if test "x$$stub" = "xstub"; then \
    371                 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
    372                 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
    373             else \
    374                 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
    375                 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
    376             fi; \
    377             ext=`echo $$p|sed -e "s/.*\.//"`; \
    378             if test "x$$ext" = "xdll"; then \
    379                 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
    380                 if test -f $$lib; then \
    381                     echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
    382                     $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
    383                 fi; \
    384             fi; \
    385           fi; \
    386         done
    387         @mkdir -p $(DESTDIR)$(pkglibdir)/scripts
    388         @for p in $(PKG_TCL_SOURCES); do \
    389           if test -f $(srcdir)/$$p; then \
    390             destp=`basename $$p`; \
    391             echo " Install $$destp $(DESTDIR)$(pkglibdir)/scripts/$$destp"; \
    392             $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/scripts/$$destp; \
    393           fi; \
    394         done
    395         $(TCLSH_PROG) $(srcdir)/tclconfig/mkindex.tcl $(DESTDIR)$(pkglibdir)/scripts
    396         @mkdir -p $(DESTDIR)$(pkglibdir)/scripts/images
    397         @for i in $(srcdir)/scripts/images/*.gif \
    398                 $(srcdir)/scripts/images/*.xbm; do \
    399                 destp=`basename $$i`;\
    400                 echo " Install $$destp $(DESTDIR)$(pkglibdir)/scripts/images/$$destp" ;\
    401                 $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/scripts/images ; \
    402                 done;
    403         $(INSTALL_DATA) init.tcl $(DESTDIR)$(pkglibdir)/init.tcl
    404 
    405         @if test "x$(SHARED_BUILD)" = "x1"; then \
    406             echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
    407             $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
    408         fi
    409 
    410 #========================================================================
    411 # Install binary executables (e.g. .exe files and dependent .dll files)
    412 # This is for files that must go in the bin directory (located next to
    413 # wish and tclsh), like dependent .dll files on Windows.
    414 #
    415 # You should not have to modify this target, except to define bin_BINARIES
    416 # above if necessary.
    417 #========================================================================
    418 
    419 install-bin-binaries: binaries
    420         @mkdir -p $(DESTDIR)$(bindir)
    421         @list='$(bin_BINARIES)'; for p in $$list; do \
    422           if test -f $$p; then \
    423             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
    424             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
    425           fi; \
    426         done
    427 
    428 .SUFFIXES: .c .$(OBJEXT)
    429 
    430 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    431         cd $(top_builddir) \
    432           && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
    433 
    434 uninstall-binaries:
    435         list='$(lib_BINARIES)'; for p in $$list; do \
    436           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
    437         done
    438         list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
    439           p=`basename $$p`; \
    440           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
    441         done
    442         list='$(bin_BINARIES)'; for p in $$list; do \
    443           rm -f $(DESTDIR)$(bindir)/$$p; \
    444         done
    445 
    446 .PHONY: all binaries clean depend distclean doc install libraries test
    447 
    448 # Tell versions [3.59,3.63) of GNU make to not export all variables.
    449 # Otherwise a system limit (for SysV at least) may be exceeded.
    450 .NOEXPORT:
  • trunk/gui/pkgIndex.tcl.in

    r158 r1018  
    1 # this file identifies RapptureGUI as a Tcl package
    2 package ifneeded RapptureGUI @VERSION@ [list source [file join $dir init.tcl]]
     1
     2package ifneeded RapptureGUI @PACKAGE_VERSION@ [format {
     3    set dir [file normalize "%s"]
     4    set version @PACKAGE_VERSION@
     5    lappend auto_path [file join $dir scripts]
     6    namespace eval RapptureGUI {
     7        variable version $version
     8        variable library $dir
     9    }
     10    package provide RapptureGUI $version
     11} $dir]
     12
  • trunk/gui/tclconfig/mkindex.tcl

    r158 r1018  
    1414package require Itcl  ;# include itcl constructs in the index
    1515
    16 foreach dir $argv {
    17     auto_mkindex $dir *.tcl *.itcl
     16proc auto_mkindex { srcdir outfile patterns } {
     17    global errorCode errorInfo
     18
     19    if {[interp issafe]} {
     20        error "can't generate index within safe interpreter"
     21    }
     22
     23    set fid [open $outfile w]
     24
     25    set oldDir [pwd]
     26    cd $srcdir
     27    set srcdir [pwd]
     28
     29    append index "# Tcl autoload index file, version 2.0\n"
     30    append index "# This file is generated by the \"auto_mkindex\" command\n"
     31    append index "# and sourced to set up indexing information for one or\n"
     32    append index "# more commands.  Typically each line is a command that\n"
     33    append index "# sets an element in the auto_index array, where the\n"
     34    append index "# element name is the name of a command and the value is\n"
     35    append index "# a script that loads the command.\n\n"
     36    if {$patterns == ""} {
     37        set patterns *.tcl
     38    }
     39    auto_mkindex_parser::init
     40    foreach file [eval glob $patterns] {
     41        if {[catch {auto_mkindex_parser::mkindex $file} msg] == 0} {
     42            append index $msg
     43        } else {
     44            set code $errorCode
     45            set info $errorInfo
     46            cd $oldDir
     47            error $msg $info $code
     48        }
     49    }
     50    auto_mkindex_parser::cleanup
     51    puts -nonewline $fid $index
     52    close $fid
     53    cd $oldDir
    1854}
     55
     56set outfile "tclIndex"
     57set srcdir  "."
     58set args {}
     59for {set i 0} { $i < [llength $argv] } { incr i } {
     60    set arg [lindex $argv $i]
     61    if { $arg == "--outfile" } {
     62        incr i
     63        set outfile [lindex $argv $i]
     64        continue
     65    } elseif { $arg == "--srcdir" } {
     66        incr i
     67        set srcdir [lindex $argv $i]
     68        continue
     69    }
     70    lappend args $arg
     71}
     72
     73auto_mkindex $srcdir $outfile $args
     74if { ![file exists $outfile] } {
     75    exit 1
     76}
     77exit 0
  • trunk/gui/tclconfig/tcl.m4

    r505 r1018  
    1 # tcl.m4 --
    2 #
    3 #       This file provides a set of autoconf macros to help TEA-enable
    4 #       a Tcl extension.
    5 #
    6 # Copyright (c) 1999-2000 Ajuba Solutions.
    7 # Copyright (c) 2002-2005 ActiveState Corporation.
    8 #
    9 # See the file "license.terms" for information on usage and redistribution
    10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    11 #
    12 # RCS: @(#) $Id: tcl.m4,v 1.92 2006/05/26 19:15:38 das Exp $
    13 
    14 AC_PREREQ(2.50)
    15 
    16 dnl TEA extensions pass this us the version of TEA they think they
    17 dnl are compatible with (must be set in TEA_INIT below)
    18 dnl TEA_VERSION="3.5"
    19 
    20 # Possible values for key variables defined:
    21 #
    22 # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
    23 # TEA_PLATFORM        - windows unix
    24 #
    25 
    261#------------------------------------------------------------------------
    27 # TEA_PATH_TCLCONFIG --
     2# SC_PATH_TCLCONFIG --
    283#
    294#       Locate the tclConfig.sh file and perform a sanity check on
     
    4318#------------------------------------------------------------------------
    4419
    45 AC_DEFUN([TEA_PATH_TCLCONFIG], [
    46     dnl Make sure we are initialized
    47     AC_REQUIRE([TEA_INIT])
     20AC_DEFUN([SC_PATH_TCLCONFIG], [
    4821    #
    4922    # Ok, lets find the tcl configuration
     
    5528        # we reset no_tcl in case something fails here
    5629        no_tcl=true
    57         AC_ARG_WITH(tcl,
    58             AC_HELP_STRING([--with-tcl],
    59                 [directory containing tcl configuration (tclConfig.sh)]),
    60             with_tclconfig=${withval})
     30        AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
    6131        AC_MSG_CHECKING([for Tcl configuration])
    6232        AC_CACHE_VAL(ac_cv_c_tclconfig,[
     
    6434            # First check to see if --with-tcl was specified.
    6535            if test x"${with_tclconfig}" != x ; then
    66                 case ${with_tclconfig} in
    67                     */tclConfig.sh )
    68                         if test -f ${with_tclconfig}; then
    69                             AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
    70                             with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
    71                         fi ;;
    72                 esac
    7336                if test -f "${with_tclconfig}/tclConfig.sh" ; then
    7437                    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
     
    11477            fi
    11578
    116             # on Windows, check in common installation locations
    117             if test "${TEA_PLATFORM}" = "windows" \
    118                 -a x"${ac_cv_c_tclconfig}" = x ; then
    119                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
    120                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
    121                         ; do
    122                     if test -f "$i/tclConfig.sh" ; then
    123                         ac_cv_c_tclconfig=`(cd $i; pwd)`
    124                         break
    125                     fi
    126                 done
    127             fi
    128 
    12979            # check in a few common install locations
    13080            if test x"${ac_cv_c_tclconfig}" = x ; then
     
    171121
    172122#------------------------------------------------------------------------
    173 # TEA_PATH_TKCONFIG --
     123# SC_PATH_TKCONFIG --
    174124#
    175125#       Locate the tkConfig.sh file
     
    188138#------------------------------------------------------------------------
    189139
    190 AC_DEFUN([TEA_PATH_TKCONFIG], [
     140AC_DEFUN([SC_PATH_TKCONFIG], [
    191141    #
    192142    # Ok, lets find the tk configuration
     
    198148        # we reset no_tk in case something fails here
    199149        no_tk=true
    200         AC_ARG_WITH(tk,
    201             AC_HELP_STRING([--with-tk],
    202                 [directory containing tk configuration (tkConfig.sh)]),
    203             with_tkconfig=${withval})
     150        AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
    204151        AC_MSG_CHECKING([for Tk configuration])
    205152        AC_CACHE_VAL(ac_cv_c_tkconfig,[
     
    207154            # First check to see if --with-tkconfig was specified.
    208155            if test x"${with_tkconfig}" != x ; then
    209                 case ${with_tkconfig} in
    210                     */tkConfig.sh )
    211                         if test -f ${with_tkconfig}; then
    212                             AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
    213                             with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
    214                         fi ;;
    215                 esac
    216156                if test -f "${with_tkconfig}/tkConfig.sh" ; then
    217157                    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
     
    272212                done
    273213            fi
    274 
    275             # on Windows, check in common installation locations
    276             if test "${TEA_PLATFORM}" = "windows" \
    277                 -a x"${ac_cv_c_tkconfig}" = x ; then
    278                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
    279                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
    280                         ; do
    281                     if test -f "$i/tkConfig.sh" ; then
    282                         ac_cv_c_tkconfig=`(cd $i; pwd)`
    283                         break
    284                     fi
    285                 done
    286             fi
    287 
    288214            # check in a few other private locations
    289215            if test x"${ac_cv_c_tkconfig}" = x ; then
     
    314240
    315241#------------------------------------------------------------------------
    316 # TEA_LOAD_TCLCONFIG --
     242# SC_LOAD_TCLCONFIG --
    317243#
    318244#       Load the tclConfig.sh file
     
    332258#------------------------------------------------------------------------
    333259
    334 AC_DEFUN([TEA_LOAD_TCLCONFIG], [
     260AC_DEFUN([SC_LOAD_TCLCONFIG], [
    335261    AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])
    336262
     
    386312
    387313    AC_SUBST(TCL_VERSION)
     314    AC_SUBST(TCL_PATCH_LEVEL)
    388315    AC_SUBST(TCL_BIN_DIR)
    389316    AC_SUBST(TCL_SRC_DIR)
     
    396323    AC_SUBST(TCL_STUB_LIB_FLAG)
    397324    AC_SUBST(TCL_STUB_LIB_SPEC)
    398 
    399     AC_SUBST(TCL_LIBS)
    400     AC_SUBST(TCL_DEFS)
    401     AC_SUBST(TCL_EXTRA_CFLAGS)
    402     AC_SUBST(TCL_LD_FLAGS)
    403     AC_SUBST(TCL_SHLIB_LD_LIBS)
    404325])
    405326
    406327#------------------------------------------------------------------------
    407 # TEA_LOAD_TKCONFIG --
     328# SC_LOAD_TKCONFIG --
    408329#
    409330#       Load the tkConfig.sh file
     
    420341#------------------------------------------------------------------------
    421342
    422 AC_DEFUN([TEA_LOAD_TKCONFIG], [
     343AC_DEFUN([SC_LOAD_TKCONFIG], [
    423344    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
    424345
     
    473394    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
    474395
    475     # Ensure windowingsystem is defined
    476     if test "${TEA_PLATFORM}" = "unix" ; then
    477         case ${TK_DEFS} in
    478             *MAC_OSX_TK*)
    479                 AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
    480                 TEA_WINDOWINGSYSTEM="aqua"
    481                 ;;
    482             *)
    483                 TEA_WINDOWINGSYSTEM="x11"
    484                 ;;
    485         esac
    486     elif test "${TEA_PLATFORM}" = "windows" ; then
    487         TEA_WINDOWINGSYSTEM="win32"
    488     fi
    489 
    490396    AC_SUBST(TK_VERSION)
    491397    AC_SUBST(TK_BIN_DIR)
     
    499405    AC_SUBST(TK_STUB_LIB_FLAG)
    500406    AC_SUBST(TK_STUB_LIB_SPEC)
    501 
    502     AC_SUBST(TK_LIBS)
    503     AC_SUBST(TK_XINCLUDES)
    504407])
    505408
    506409#------------------------------------------------------------------------
    507 # TEA_ENABLE_SHARED --
     410# SC_PROG_TCLSH
     411#       Locate a tclsh shell installed on the system path. This macro
     412#       will only find a Tcl shell that already exists on the system.
     413#       It will not find a Tcl shell in the Tcl build directory or
     414#       a Tcl shell that has been installed from the Tcl build directory.
     415#       If a Tcl shell can't be located on the PATH, then TCLSH_PROG will
     416#       be set to "". Extensions should take care not to create Makefile
     417#       rules that are run by default and depend on TCLSH_PROG. An
     418#       extension can't assume that an executable Tcl shell exists at
     419#       build time.
     420#
     421# Arguments
     422#       none
     423#
     424# Results
     425#       Subst's the following values:
     426#               TCLSH_PROG
     427#------------------------------------------------------------------------
     428
     429AC_DEFUN([SC_PROG_TCLSH], [
     430    AC_MSG_CHECKING([for tclsh])
     431    AC_CACHE_VAL(ac_cv_path_tclsh, [
     432        search_path=`echo ${PATH} | sed -e 's/:/ /g'`
     433        for dir in $search_path ; do
     434            for j in `ls -r $dir/tclsh[[8-9]]* 2> /dev/null` \
     435                    `ls -r $dir/tclsh* 2> /dev/null` ; do
     436                if test x"$ac_cv_path_tclsh" = x ; then
     437                    if test -f "$j" ; then
     438                        ac_cv_path_tclsh=$j
     439                        break
     440                    fi
     441                fi
     442            done
     443        done
     444    ])
     445
     446    if test -f "$ac_cv_path_tclsh" ; then
     447        TCLSH_PROG="$ac_cv_path_tclsh"
     448        AC_MSG_RESULT([$TCLSH_PROG])
     449    else
     450        # It is not an error if an installed version of Tcl can't be located.
     451        TCLSH_PROG=""
     452        AC_MSG_RESULT([No tclsh found on PATH])
     453    fi
     454    AC_SUBST(TCLSH_PROG)
     455])
     456
     457#------------------------------------------------------------------------
     458# SC_BUILD_TCLSH
     459#       Determine the fully qualified path name of the tclsh executable
     460#       in the Tcl build directory. This macro will correctly determine
     461#       the name of the tclsh executable even if tclsh has not yet
     462#       been built in the build directory. The build tclsh must be used
     463#       when running tests from an extension build directory. It is not
     464#       correct to use the TCLSH_PROG in cases like this.
     465#
     466# Arguments
     467#       none
     468#
     469# Results
     470#       Subst's the following values:
     471#               BUILD_TCLSH
     472#------------------------------------------------------------------------
     473
     474AC_DEFUN([SC_BUILD_TCLSH], [
     475    AC_MSG_CHECKING([for tclsh in Tcl build directory])
     476    BUILD_TCLSH=${TCL_BIN_DIR}/tclsh
     477    AC_MSG_RESULT([$BUILD_TCLSH])
     478    AC_SUBST(BUILD_TCLSH)
     479])
     480
     481#------------------------------------------------------------------------
     482# SC_ENABLE_SHARED --
    508483#
    509484#       Allows the building of shared libraries
     
    525500#------------------------------------------------------------------------
    526501
    527 AC_DEFUN([TEA_ENABLE_SHARED], [
     502AC_DEFUN([SC_ENABLE_SHARED], [
    528503    AC_MSG_CHECKING([how to build libraries])
    529504    AC_ARG_ENABLE(shared,
    530         AC_HELP_STRING([--enable-shared],
    531             [build and link with shared libraries (default: on)]),
     505        [  --enable-shared         build and link with shared libraries [--enable-shared]],
    532506        [tcl_ok=$enableval], [tcl_ok=yes])
    533507
     
    545519        AC_MSG_RESULT([static])
    546520        SHARED_BUILD=0
    547         AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
    548     fi
    549     AC_SUBST(SHARED_BUILD)
     521        AC_DEFINE(STATIC_BUILD)
     522    fi
    550523])
    551524
    552525#------------------------------------------------------------------------
    553 # TEA_ENABLE_THREADS --
    554 #
    555 #       Specify if thread support should be enabled.  If "yes" is specified
    556 #       as an arg (optional), threads are enabled by default, "no" means
    557 #       threads are disabled.  "yes" is the default.
    558 #
    559 #       TCL_THREADS is checked so that if you are compiling an extension
    560 #       against a threaded core, your extension must be compiled threaded
    561 #       as well.
    562 #
    563 #       Note that it is legal to have a thread enabled extension run in a
    564 #       threaded or non-threaded Tcl core, but a non-threaded extension may
    565 #       only run in a non-threaded Tcl core.
     526# SC_ENABLE_FRAMEWORK --
     527#
     528#       Allows the building of shared libraries into frameworks
    566529#
    567530# Arguments:
     
    571534#
    572535#       Adds the following arguments to configure:
     536#               --enable-framework=yes|no
     537#
     538#       Sets the following vars:
     539#               FRAMEWORK_BUILD Value of 1 or 0
     540#------------------------------------------------------------------------
     541
     542AC_DEFUN([SC_ENABLE_FRAMEWORK], [
     543    if test "`uname -s`" = "Darwin" ; then
     544        AC_MSG_CHECKING([how to package libraries])
     545        AC_ARG_ENABLE(framework,
     546            [  --enable-framework      package shared libraries in MacOSX frameworks [--disable-framework]],
     547            [enable_framework=$enableval], [enable_framework=no])
     548        if test $enable_framework = yes; then
     549            if test $SHARED_BUILD = 0; then
     550                AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes])
     551                enable_framework=no
     552            fi
     553            if test $tcl_corefoundation = no; then
     554                AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available])
     555                enable_framework=no
     556            fi
     557        fi
     558        if test $enable_framework = yes; then
     559            AC_MSG_RESULT([framework])
     560            FRAMEWORK_BUILD=1
     561        else
     562            if test $SHARED_BUILD = 1; then
     563                AC_MSG_RESULT([shared library])
     564            else
     565                AC_MSG_RESULT([static library])
     566            fi
     567            FRAMEWORK_BUILD=0
     568        fi
     569    fi
     570])
     571
     572#------------------------------------------------------------------------
     573# SC_ENABLE_THREADS --
     574#
     575#       Specify if thread support should be enabled.  TCL_THREADS is
     576#       checked so that if you are compiling an extension against a
     577#       threaded core, your extension must be compiled threaded as well.
     578#
     579# Arguments:
     580#       none
     581#       
     582# Results:
     583#
     584#       Adds the following arguments to configure:
    573585#               --enable-threads
    574586#
     
    583595#------------------------------------------------------------------------
    584596
    585 AC_DEFUN([TEA_ENABLE_THREADS], [
    586     AC_ARG_ENABLE(threads,
    587         AC_HELP_STRING([--enable-threads],
    588             [build with threads]),
    589         [tcl_ok=$enableval], [tcl_ok=yes])
    590 
    591     if test "${enable_threads+set}" = set; then
    592         enableval="$enable_threads"
    593         tcl_ok=$enableval
    594     else
    595         tcl_ok=yes
     597AC_DEFUN([SC_ENABLE_THREADS], [
     598    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
     599        [tcl_ok=$enableval], [tcl_ok=no])
     600
     601    if test "${TCL_THREADS}" = 1; then
     602        tcl_threaded_core=1;
    596603    fi
    597604
    598605    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
    599606        TCL_THREADS=1
    600 
    601         if test "${TEA_PLATFORM}" != "windows" ; then
    602             # We are always OK on Windows, so check what this platform wants:
    603    
    604             # USE_THREAD_ALLOC tells us to try the special thread-based
    605             # allocator that significantly reduces lock contention
    606             AC_DEFINE(USE_THREAD_ALLOC, 1,
    607                 [Do we want to use the threaded memory allocator?])
    608             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    609             if test "`uname -s`" = "SunOS" ; then
    610                 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    611                         [Do we really want to follow the standard? Yes we do!])
    612             fi
    613             AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
    614             AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
    615             if test "$tcl_ok" = "no"; then
    616                 # Check a little harder for __pthread_mutex_init in the same
    617                 # library, as some systems hide it there until pthread.h is
    618                 # defined.  We could alternatively do an AC_TRY_COMPILE with
    619                 # pthread.h, but that will work with libpthread really doesn't
    620                 # exist, like AIX 4.2.  [Bug: 4359]
    621                 AC_CHECK_LIB(pthread, __pthread_mutex_init,
    622                     tcl_ok=yes, tcl_ok=no)
    623             fi
    624 
     607        # USE_THREAD_ALLOC tells us to try the special thread-based
     608        # allocator that significantly reduces lock contention
     609        AC_DEFINE(USE_THREAD_ALLOC)
     610        AC_DEFINE(_REENTRANT)
     611        if test "`uname -s`" = "SunOS" ; then
     612            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
     613        fi
     614        AC_DEFINE(_THREAD_SAFE)
     615        AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
     616        if test "$tcl_ok" = "no"; then
     617            # Check a little harder for __pthread_mutex_init in the same
     618            # library, as some systems hide it there until pthread.h is
     619            # defined.  We could alternatively do an AC_TRY_COMPILE with
     620            # pthread.h, but that will work with libpthread really doesn't
     621            # exist, like AIX 4.2.  [Bug: 4359]
     622            AC_CHECK_LIB(pthread, __pthread_mutex_init,
     623                tcl_ok=yes, tcl_ok=no)
     624        fi
     625
     626        if test "$tcl_ok" = "yes"; then
     627            # The space is needed
     628            THREADS_LIBS=" -lpthread"
     629        else
     630            AC_CHECK_LIB(pthreads, pthread_mutex_init,
     631                tcl_ok=yes, tcl_ok=no)
    625632            if test "$tcl_ok" = "yes"; then
    626633                # The space is needed
    627                 THREADS_LIBS=" -lpthread"
     634                THREADS_LIBS=" -lpthreads"
    628635            else
    629                 AC_CHECK_LIB(pthreads, pthread_mutex_init,
     636                AC_CHECK_LIB(c, pthread_mutex_init,
    630637                    tcl_ok=yes, tcl_ok=no)
    631                 if test "$tcl_ok" = "yes"; then
    632                     # The space is needed
    633                     THREADS_LIBS=" -lpthreads"
    634                 else
    635                     AC_CHECK_LIB(c, pthread_mutex_init,
     638                if test "$tcl_ok" = "no"; then
     639                    AC_CHECK_LIB(c_r, pthread_mutex_init,
    636640                        tcl_ok=yes, tcl_ok=no)
    637                     if test "$tcl_ok" = "no"; then
    638                         AC_CHECK_LIB(c_r, pthread_mutex_init,
    639                             tcl_ok=yes, tcl_ok=no)
    640                         if test "$tcl_ok" = "yes"; then
    641                             # The space is needed
    642                             THREADS_LIBS=" -pthread"
    643                         else
    644                             TCL_THREADS=0
    645                             AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled])
    646                         fi
     641                    if test "$tcl_ok" = "yes"; then
     642                        # The space is needed
     643                        THREADS_LIBS=" -pthread"
     644                    else
     645                        TCL_THREADS=0
     646                        AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
    647647                    fi
    648648                fi
    649649            fi
    650650        fi
     651
     652        # Does the pthread-implementation provide
     653        # 'pthread_attr_setstacksize' ?
     654
     655        ac_saved_libs=$LIBS
     656        LIBS="$LIBS $THREADS_LIBS"
     657        AC_CHECK_FUNCS(pthread_attr_setstacksize)
     658        AC_CHECK_FUNCS(pthread_atfork)
     659        LIBS=$ac_saved_libs
    651660    else
    652661        TCL_THREADS=0
     
    656665    if test "${TCL_THREADS}" = 1; then
    657666        AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
    658         AC_MSG_RESULT([yes (default)])
     667        if test "${tcl_threaded_core}" = 1; then
     668            AC_MSG_RESULT([yes (threaded core)])
     669        else
     670            AC_MSG_RESULT([yes])
     671        fi
    659672    else
    660         AC_MSG_RESULT([no])
    661     fi
    662     # TCL_THREADS sanity checking.  See if our request for building with
    663     # threads is the same as the way Tcl was built.  If not, warn the user.
    664     case ${TCL_DEFS} in
    665         *THREADS=1*)
    666             if test "${TCL_THREADS}" = "0"; then
    667                 AC_MSG_WARN([
    668     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
    669     that IS thread-enabled.  It is recommended to use --enable-threads.])
    670             fi
    671             ;;
    672         *)
    673             if test "${TCL_THREADS}" = "1"; then
    674                 AC_MSG_WARN([
    675     --enable-threads requested, but building against a Tcl that is NOT
    676     thread-enabled.  This is an OK configuration that will also run in
    677     a thread-enabled core.])
    678             fi
    679             ;;
    680     esac
     673        AC_MSG_RESULT([no (default)])
     674    fi
     675
    681676    AC_SUBST(TCL_THREADS)
    682677])
    683678
    684679#------------------------------------------------------------------------
    685 # TEA_ENABLE_SYMBOLS --
     680# SC_ENABLE_SYMBOLS --
    686681#
    687682#       Specify if debugging symbols should be used.
    688 #       Memory (TCL_MEM_DEBUG) debugging can also be enabled.
     683#       Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
     684#       can also be enabled.
    689685#
    690686# Arguments:
    691687#       none
    692688#       
    693 #       TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
    694 #       the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
    695689#       Requires the following vars to be set in the Makefile:
    696 #               CFLAGS_DEFAULT
    697 #               LDFLAGS_DEFAULT
     690#               CFLAGS_DEBUG
     691#               CFLAGS_OPTIMIZE
     692#               LDFLAGS_DEBUG
     693#               LDFLAGS_OPTIMIZE
    698694#       
    699695# Results:
     
    707703#               LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
    708704#                               Sets to $(LDFLAGS_OPTIMIZE) if false
    709 #               DBGX            Formerly used as debug library extension;
    710 #                               always blank now.
     705#               DBGX            Debug library extension
    711706#
    712707#------------------------------------------------------------------------
    713708
    714 AC_DEFUN([TEA_ENABLE_SYMBOLS], [
    715     dnl Make sure we are initialized
    716     AC_REQUIRE([TEA_CONFIG_CFLAGS])
     709AC_DEFUN([SC_ENABLE_SYMBOLS], [
    717710    AC_MSG_CHECKING([for build with symbols])
    718     AC_ARG_ENABLE(symbols,
    719         AC_HELP_STRING([--enable-symbols],
    720             [build with debugging symbols (default: off)]),
    721         [tcl_ok=$enableval], [tcl_ok=no])
    722     DBGX=""
     711    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
     712# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
    723713    if test "$tcl_ok" = "no"; then
    724         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
    725         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
     714        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
     715        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
     716        DBGX=""
    726717        AC_MSG_RESULT([no])
    727718    else
    728         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
    729         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
     719        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
     720        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
     721        DBGX=g
    730722        if test "$tcl_ok" = "yes"; then
    731723            AC_MSG_RESULT([yes (standard debugging)])
    732724        fi
    733725    fi
    734     if test "${TEA_PLATFORM}" != "windows" ; then
    735         LDFLAGS_DEFAULT="${LDFLAGS}"
    736     fi
    737 
    738     AC_SUBST(TCL_DBGX)
    739726    AC_SUBST(CFLAGS_DEFAULT)
    740727    AC_SUBST(LDFLAGS_DEFAULT)
    741728
    742729    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
    743         AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
     730        AC_DEFINE(TCL_MEM_DEBUG)
     731    fi
     732
     733    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
     734        AC_DEFINE(TCL_COMPILE_DEBUG)
     735        AC_DEFINE(TCL_COMPILE_STATS)
    744736    fi
    745737
    746738    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
    747739        if test "$tcl_ok" = "all"; then
    748             AC_MSG_RESULT([enabled symbols mem debugging])
     740            AC_MSG_RESULT([enabled symbols mem compile debugging])
    749741        else
    750742            AC_MSG_RESULT([enabled $tcl_ok debugging])
     
    754746
    755747#------------------------------------------------------------------------
    756 # TEA_ENABLE_LANGINFO --
     748# SC_ENABLE_LANGINFO --
    757749#
    758750#       Allows use of modern nl_langinfo check for better l10n.
     
    772764#------------------------------------------------------------------------
    773765
    774 AC_DEFUN([TEA_ENABLE_LANGINFO], [
     766AC_DEFUN([SC_ENABLE_LANGINFO], [
    775767    AC_ARG_ENABLE(langinfo,
    776         AC_HELP_STRING([--enable-langinfo],
    777             [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
     768        [  --enable-langinfo      use nl_langinfo if possible to determine
     769                          encoding at startup, otherwise use old heuristic],
    778770        [langinfo_ok=$enableval], [langinfo_ok=yes])
    779771
     
    784776    AC_MSG_CHECKING([whether to use nl_langinfo])
    785777    if test "$langinfo_ok" = "yes"; then
    786         AC_CACHE_VAL(tcl_cv_langinfo_h,
     778        AC_CACHE_VAL(tcl_cv_langinfo_h, [
    787779            AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
    788                     [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no]))
     780                    [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
    789781        AC_MSG_RESULT([$tcl_cv_langinfo_h])
    790782        if test $tcl_cv_langinfo_h = yes; then
    791             AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
     783            AC_DEFINE(HAVE_LANGINFO)
    792784        fi
    793785    else
     
    797789
    798790#--------------------------------------------------------------------
    799 # TEA_CONFIG_SYSTEM
     791# SC_CONFIG_MANPAGES
     792#       
     793#       Decide whether to use symlinks for linking the manpages,
     794#       whether to compress the manpages after installation, and
     795#       whether to add a package name suffix to the installed
     796#       manpages to avoidfile name clashes.
     797#       If compression is enabled also find out what file name suffix
     798#       the given compression program is using.
     799#
     800# Arguments:
     801#       none
     802#
     803# Results:
     804#
     805#       Adds the following arguments to configure:
     806#               --enable-man-symlinks
     807#               --enable-man-compression=PROG
     808#               --enable-man-suffix[=STRING]
     809#
     810#       Defines the following variable:
     811#
     812#       MAN_FLAGS -     The apropriate flags for installManPage
     813#                       according to the user's selection.
     814#
     815#--------------------------------------------------------------------
     816
     817AC_DEFUN([SC_CONFIG_MANPAGES], [
     818    AC_MSG_CHECKING([whether to use symlinks for manpages])
     819    AC_ARG_ENABLE(man-symlinks,
     820            [  --enable-man-symlinks   use symlinks for the manpages],
     821        test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
     822        enableval="no")
     823    AC_MSG_RESULT([$enableval])
     824
     825    AC_MSG_CHECKING([whether to compress the manpages])
     826    AC_ARG_ENABLE(man-compression,
     827            [  --enable-man-compression=PROG
     828                      compress the manpages with PROG],
     829        [case $enableval in
     830            yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);;
     831            no)  ;;
     832            *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
     833        esac],
     834        enableval="no")
     835    AC_MSG_RESULT([$enableval])
     836    if test "$enableval" != "no"; then
     837        AC_MSG_CHECKING([for compressed file suffix])
     838        touch TeST
     839        $enableval TeST
     840        Z=`ls TeST* | sed 's/^....//'`
     841        rm -f TeST*
     842        MAN_FLAGS="$MAN_FLAGS --extension $Z"
     843        AC_MSG_RESULT([$Z])
     844    fi
     845
     846    AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
     847    AC_ARG_ENABLE(man-suffix,
     848            [  --enable-man-suffix=STRING
     849                      use STRING as a suffix to manpage file names
     850                      (default: $1)],
     851        [case $enableval in
     852            yes) enableval="$1" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
     853            no)  ;;
     854            *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
     855        esac],
     856        enableval="no")
     857    AC_MSG_RESULT([$enableval])
     858
     859    AC_SUBST(MAN_FLAGS)
     860])
     861
     862#--------------------------------------------------------------------
     863# SC_CONFIG_SYSTEM
    800864#
    801865#       Determine what the system is (some things cannot be easily checked
     
    814878#--------------------------------------------------------------------
    815879
    816 AC_DEFUN([TEA_CONFIG_SYSTEM], [
     880AC_DEFUN([SC_CONFIG_SYSTEM], [
    817881    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
    818         if test "${TEA_PLATFORM}" = "windows" ; then
    819             tcl_cv_sys_version=windows
    820         elif test -f /usr/lib/NextStep/software_version; then
     882        if test -f /usr/lib/NextStep/software_version; then
    821883            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
    822884        else
     
    830892
    831893                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
    832                     tcl_cv_sys_version=MP-RAS-`awk '{print [$]3}' /etc/.relid`
     894                    tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid`
    833895                fi
    834896                if test "`uname -s`" = "AIX" ; then
     
    842904
    843905#--------------------------------------------------------------------
    844 # TEA_CONFIG_CFLAGS
     906# SC_CONFIG_CFLAGS
    845907#
    846908#       Try to determine the proper flags to pass to the compiler
     
    870932#                       for shared libraries such as libtcl.so.  Depends on
    871933#                       the variable LIB_RUNTIME_DIR in the Makefile.
     934#       MAKE_LIB -      Command to execute to build the a library;
     935#                       differs when building shared or static.
     936#       MAKE_STUB_LIB -
     937#                       Command to execute to build a stub library.
     938#       INSTALL_LIB -   Command to execute to install a library;
     939#                       differs when building shared or static.
     940#       INSTALL_STUB_LIB -
     941#                       Command to execute to install a stub library.
     942#       STLIB_LD -      Base command to use for combining object files
     943#                       into a static library.
    872944#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
    873945#                       of a shared library (may request position-independent
     
    889961#                       extensions.  An empty string means we don't know how
    890962#                       to use shared libraries on this platform.
     963# TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
     964#  TK_SHLIB_LD_EXTRAS   for the build of Tcl and Tk, but not recorded in the
     965#                       tclConfig.sh, since they are only used for the build
     966#                       of Tcl and Tk.
     967#                       Examples: MacOS X records the library version and
     968#                       compatibility version in the shared library.  But
     969#                       of course the Tcl version of this is only used for Tcl.
    891970#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
    892971#                       in a static or shared library name, using the $VERSION variable
     
    917996#--------------------------------------------------------------------
    918997
    919 AC_DEFUN([TEA_CONFIG_CFLAGS], [
    920     dnl Make sure we are initialized
    921     AC_REQUIRE([TEA_INIT])
     998AC_DEFUN([SC_CONFIG_CFLAGS], [
    922999
    9231000    # Step 0.a: Enable 64 bit support?
    9241001
    9251002    AC_MSG_CHECKING([if 64bit support is requested])
    926     AC_ARG_ENABLE(64bit,
    927         AC_HELP_STRING([--enable-64bit],
    928             [enable 64bit support (default: off)]),
     1003    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)],
    9291004        [do64bit=$enableval], [do64bit=no])
    9301005    AC_MSG_RESULT([$do64bit])
     
    9331008
    9341009    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
    935     AC_ARG_ENABLE(64bit-vis,
    936         AC_HELP_STRING([--enable-64bit-vis],
    937             [enable 64bit Sparc VIS support (default: off)]),
     1010    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support],
    9381011        [do64bitVIS=$enableval], [do64bitVIS=no])
    9391012    AC_MSG_RESULT([$do64bitVIS])
     
    9441017    fi
    9451018
    946     # Step 0.c: Cross-compiling options for Windows/CE builds?
    947 
    948     if test "${TEA_PLATFORM}" = "windows" ; then
    949         AC_MSG_CHECKING([if Windows/CE build is requested])
    950         AC_ARG_ENABLE(wince,[  --enable-wince          enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
    951         AC_MSG_RESULT([$doWince])
    952     fi
    953 
    9541019    # Step 1: set the variable "system" to hold the name and version number
    9551020    # for the system.
    9561021
    957     TEA_CONFIG_SYSTEM
     1022    SC_CONFIG_SYSTEM
    9581023
    9591024    # Step 2: check for existence of -ldl library.  This is needed because
     
    9671032
    9681033    # Step 3: set configuration options based on system name and version.
    969     # This is similar to Tcl's unix/tcl.m4 except that we've added a
    970     # "windows" case.
    9711034
    9721035    do64bit_ok=no
    9731036    LDFLAGS_ORIG="$LDFLAGS"
    974     # When ld needs options to work in 64-bit mode, put them in
    975     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
    976     # is disabled by the user. [Bug 1016796]
    977     LDFLAGS_ARCH=""
    9781037    TCL_EXPORT_FILE_SUFFIX=""
    9791038    UNSHARED_LIB_SUFFIX=""
    980     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
    981     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
     1039    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
     1040    ECHO_VERSION='`echo ${VERSION}`'
    9821041    TCL_LIB_VERSIONS_OK=ok
    9831042    CFLAGS_DEBUG=-g
    9841043    CFLAGS_OPTIMIZE=-O
    9851044    if test "$GCC" = "yes" ; then
    986         CFLAGS_OPTIMIZE=-O2
    987         CFLAGS_WARNING="-Wall -Wno-implicit-int"
     1045        CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
    9881046    else
    9891047        CFLAGS_WARNING=""
     
    9951053dnl AC_CHECK_TOOL(AR, ar)
    9961054    AC_CHECK_PROG(AR, ar, ar)
     1055    if test "${AR}" = "" ; then
     1056        AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
     1057    fi
    9971058    STLIB_LD='${AR} cr'
    9981059    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     1060    PLAT_OBJS=""
     1061    PLAT_SRCS=""
    9991062    case $system in
    1000         windows)
    1001             # This is a 2-stage check to make sure we have the 64-bit SDK
    1002             # We have to know where the SDK is installed.
    1003             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
    1004             # MACHINE is IX86 for LINK, but this is used by the manifest,
    1005             # which requires x86|amd64|ia64.
    1006             MACHINE="X86"
    1007             if test "$do64bit" != "no" ; then
    1008                 if test "x${MSSDK}x" = "xx" ; then
    1009                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
    1010                 fi
    1011                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
    1012                 PATH64=""
    1013                 case "$do64bit" in
    1014                     amd64|x64|yes)
    1015                         MACHINE="AMD64" ; # default to AMD64 64-bit build
    1016                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
    1017                         ;;
    1018                     ia64)
    1019                         MACHINE="IA64"
    1020                         PATH64="${MSSDK}/Bin/Win64"
    1021                         ;;
    1022                 esac
    1023                 if test ! -d "${PATH64}" ; then
    1024                     AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
    1025                     AC_MSG_WARN([Ensure latest Platform SDK is installed])
    1026                     do64bit="no"
    1027                 else
    1028                     AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
    1029                     do64bit_ok="yes"
    1030                 fi
    1031             fi
    1032 
    1033             if test "$doWince" != "no" ; then
    1034                 if test "$do64bit" != "no" ; then
    1035                     AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
    1036                 fi
    1037                 if test "$GCC" = "yes" ; then
    1038                     AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
    1039                 fi
    1040                 TEA_PATH_CELIB
    1041                 # Set defaults for common evc4/PPC2003 setup
    1042                 # Currently Tcl requires 300+, possibly 420+ for sockets
    1043                 CEVERSION=420;          # could be 211 300 301 400 420 ...
    1044                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
    1045                 ARCH=ARM;               # could be ARM MIPS X86EM ...
    1046                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
    1047                 if test "$doWince" != "yes"; then
    1048                     # If !yes then the user specified something
    1049                     # Reset ARCH to allow user to skip specifying it
    1050                     ARCH=
    1051                     eval `echo $doWince | awk -F, '{ \
    1052             if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
    1053             if ([$]1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
    1054             if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
    1055             if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
    1056             if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
    1057                     }'`
    1058                     if test "x${ARCH}" = "x" ; then
    1059                         ARCH=$TARGETCPU;
    1060                     fi
    1061                 fi
    1062                 OSVERSION=WCE$CEVERSION;
    1063                 if test "x${WCEROOT}" = "x" ; then
    1064                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
    1065                     if test ! -d "${WCEROOT}" ; then
    1066                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
    1067                     fi
    1068                 fi
    1069                 if test "x${SDKROOT}" = "x" ; then
    1070                     SDKROOT="C:/Program Files/Windows CE Tools"
    1071                     if test ! -d "${SDKROOT}" ; then
    1072                         SDKROOT="C:/Windows CE Tools"
    1073                     fi
    1074                 fi
    1075                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
    1076                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
    1077                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
    1078                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
    1079                     AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
    1080                     doWince="no"
    1081                 else
    1082                     # We could PATH_NOSPACE these, but that's not important,
    1083                     # as long as we quote them when used.
    1084                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
    1085                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
    1086                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
    1087                     fi
    1088                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
    1089                 fi
    1090             fi
    1091 
    1092             if test "$GCC" != "yes" ; then
    1093                 if test "${SHARED_BUILD}" = "0" ; then
    1094                     runtime=-MT
    1095                 else
    1096                     runtime=-MD
    1097                 fi
    1098 
    1099                 if test "$do64bit" != "no" ; then
    1100                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
    1101                     CC="\"${PATH64}/cl.exe\""
    1102                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
    1103                     RC="\"${MSSDK}/bin/rc.exe\""
    1104                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
    1105                     LINKBIN="\"${PATH64}/link.exe\""
    1106                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
    1107                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
    1108                     # Avoid 'unresolved external symbol __security_cookie'
    1109                     # errors, c.f. http://support.microsoft.com/?id=894573
    1110                     TEA_ADD_LIBS([bufferoverflowU.lib])
    1111                 elif test "$doWince" != "no" ; then
    1112                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
    1113                     if test "${TARGETCPU}" = "X86"; then
    1114                         CC="\"${CEBINROOT}/cl.exe\""
    1115                     else
    1116                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
    1117                     fi
    1118                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
    1119                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
    1120                     arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
    1121                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
    1122                     if test "${SHARED_BUILD}" = "1" ; then
    1123                         # Static CE builds require static celib as well
    1124                         defs="${defs} _DLL"
    1125                     fi
    1126                     for i in $defs ; do
    1127                         AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i)
    1128                     done
    1129                     AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
    1130                     AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
    1131                     CFLAGS_DEBUG="-nologo -Zi -Od"
    1132                     CFLAGS_OPTIMIZE="-nologo -Ox"
    1133                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
    1134                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
    1135                     LINKBIN="\"${CEBINROOT}/link.exe\""
    1136                     AC_SUBST(CELIB_DIR)
    1137                 else
    1138                     RC="rc"
    1139                     lflags="-nologo"
    1140                     LINKBIN="link"
    1141                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
    1142                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
    1143                 fi
    1144             fi
    1145 
    1146             if test "$GCC" = "yes"; then
    1147                 # mingw gcc mode
    1148                 RC="windres"
    1149                 CFLAGS_DEBUG="-g"
    1150                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
    1151                 SHLIB_LD="$CC -shared"
    1152                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
    1153                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
    1154                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
    1155             else
    1156                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
    1157                 # link -lib only works when -lib is the first arg
    1158                 STLIB_LD="${LINKBIN} -lib ${lflags}"
    1159                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
    1160                 PATHTYPE=-w
    1161                 # For information on what debugtype is most useful, see:
    1162                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
    1163                 # This essentially turns it all on.
    1164                 LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
    1165                 LDFLAGS_OPTIMIZE="-release"
    1166                 if test "$doWince" != "no" ; then
    1167                     LDFLAGS_CONSOLE="-link ${lflags}"
    1168                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
    1169                 else
    1170                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
    1171                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
    1172                 fi
    1173             fi
    1174 
    1175             SHLIB_LD_LIBS='${LIBS}'
    1176             SHLIB_SUFFIX=".dll"
    1177             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
    1178 
    1179             TCL_LIB_VERSIONS_OK=nodots
    1180             # Bogus to avoid getting this turned off
    1181             DL_OBJS="tclLoadNone.obj"
    1182             ;;
    11831063        AIX-*)
    11841064            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
     
    11961076            LIBS="$LIBS -lc"
    11971077            SHLIB_CFLAGS=""
     1078            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     1079            # symbols when dynamically loaded into tclsh.
    11981080            SHLIB_LD_LIBS='${LIBS}'
    11991081            SHLIB_SUFFIX=".so"
     
    12091091                    do64bit_ok=yes
    12101092                    CFLAGS="$CFLAGS -q64"
    1211                     LDFLAGS_ARCH="-q64"
     1093                    LDFLAGS="$LDFLAGS -q64"
    12121094                    RANLIB="${RANLIB} -X64"
    12131095                    AR="${AR} -X64"
     
    12381120                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
    12391121                TCL_NEEDS_EXP_FILE=1
    1240                 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
     1122                TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
    12411123            fi
    12421124
    12431125            # AIX v<=4.1 has some different flags than 4.2+
    12441126            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
    1245                 AC_LIBOBJ([tclLoadAix])
     1127                LIBOBJS="$LIBOBJS tclLoadAix.o"
    12461128                DL_LIBS="-lld"
    12471129            fi
     
    12621144            if test $libbsd = yes; then
    12631145                MATH_LIBS="$MATH_LIBS -lbsd"
    1264                 AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?])
     1146                AC_DEFINE(USE_DELTA_FOR_TZ)
    12651147            fi
    12661148            ;;
     
    13131195        HP-UX-*.11.*)
    13141196            # Use updated header definitions where possible
    1315             AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
    1316             # Needed by Tcl, but not most extensions
    1317             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
    1318             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
    1319 
    1320             SHLIB_SUFFIX=".sl"
     1197            AC_DEFINE(_XOPEN_SOURCE)          # Use the XOPEN network library
     1198            AC_DEFINE(_XOPEN_SOURCE_EXTENDED) # Use the XOPEN network library
     1199            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
     1200
     1201            if test "`uname -m`" = "ia64" ; then
     1202                SHLIB_SUFFIX=".so"
     1203            else
     1204                SHLIB_SUFFIX=".sl"
     1205            fi
    13211206            AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
    13221207            if test "$tcl_ok" = yes; then
     
    13601245                    do64bit_ok=yes
    13611246                    CFLAGS="$CFLAGS +DD64"
    1362                     LDFLAGS_ARCH="+DD64"
     1247                    LDFLAGS="$LDFLAGS +DD64"
    13631248                fi
    13641249            fi
     
    13781263                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
    13791264            fi
     1265            ;;
     1266        IRIX-4.*)
     1267            SHLIB_CFLAGS="-G 0"
     1268            SHLIB_SUFFIX=".a"
     1269            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1270            SHLIB_LD_LIBS='${LIBS}'
     1271            DL_OBJS="tclLoadAout.o"
     1272            DL_LIBS=""
     1273            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1274            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1275            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1276            SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
    13801277            ;;
    13811278        IRIX-5.*)
     
    14331330                    SHLIB_LD="ld -64 -shared -rdata_shared"
    14341331                    CFLAGS="$CFLAGS -64"
    1435                     LDFLAGS_ARCH="-64"
     1332                    LDFLAGS="$LDFLAGS -64"
    14361333                fi
    14371334            fi
     
    14421339            SHLIB_SUFFIX=".so"
    14431340
    1444             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
     1341            CFLAGS_OPTIMIZE=-O2
    14451342            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
    14461343            # when you inline the string and math operations.  Turn this off to
     
    14481345            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
    14491346
    1450             SHLIB_LD="${CC} -shared"
    1451             DL_OBJS="tclLoadDl.o"
    1452             DL_LIBS="-ldl"
    1453             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
    1454             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1455             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1347            if test "$have_dl" = yes; then
     1348                SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
     1349                DL_OBJS="tclLoadDl.o"
     1350                DL_LIBS="-ldl"
     1351                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     1352                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1353                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1354            else
     1355                AC_CHECK_HEADER(dld.h, [
     1356                    SHLIB_LD="ld -shared"
     1357                    DL_OBJS="tclLoadDld.o"
     1358                    DL_LIBS="-ldld"
     1359                    CC_SEARCH_FLAGS=""
     1360                    LD_SEARCH_FLAGS=""])
     1361            fi
    14561362            if test "`uname -m`" = "alpha" ; then
    14571363                CFLAGS="$CFLAGS -mieee"
     1364            fi
     1365            if test $do64bit = yes; then
     1366                AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
     1367                    hold_cflags=$CFLAGS
     1368                    CFLAGS="$CFLAGS -m64"
     1369                    AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
     1370                    CFLAGS=$hold_cflags])
     1371                if test $tcl_cv_cc_m64 = yes; then
     1372                    CFLAGS="$CFLAGS -m64"
     1373                    do64bit_ok=yes
     1374                fi
    14581375            fi
    14591376
     
    14651382            # Disable inlining only when one of the
    14661383            # files in compat/*.c is being linked in.
    1467             if test x"${USE_COMPAT}" != x ; then
     1384            if test x"${LIBOBJS}" != x ; then
    14681385                CFLAGS="$CFLAGS -fno-inline"
    14691386            fi
     1387
     1388            # XIM peeking works under XFree86.
     1389            AC_DEFINE(PEEK_XCLOSEIM)
    14701390
    14711391            ;;
     
    14751395            SHLIB_SUFFIX=".so"
    14761396
    1477             SHLIB_LD="${CC} -shared"
    1478             DL_OBJS=""
    1479             DL_LIBS="-ldl"
    1480             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
    1481             CC_SEARCH_FLAGS=""
    1482             LD_SEARCH_FLAGS=""
     1397            if test "$have_dl" = yes; then
     1398                SHLIB_LD="${CC} -shared"
     1399                DL_OBJS=""
     1400                DL_LIBS="-ldl"
     1401                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     1402                CC_SEARCH_FLAGS=""
     1403                LD_SEARCH_FLAGS=""
     1404            else
     1405                AC_CHECK_HEADER(dld.h, [
     1406                    SHLIB_LD="ld -shared"
     1407                    DL_OBJS=""
     1408                    DL_LIBS="-ldld"
     1409                    CC_SEARCH_FLAGS=""
     1410                    LD_SEARCH_FLAGS=""])
     1411            fi
    14831412            if test "`uname -m`" = "alpha" ; then
    14841413                CFLAGS="$CFLAGS -mieee"
     
    15191448            ;;
    15201449        NetBSD-*|FreeBSD-[[1-2]].*)
    1521             # NetBSD/SPARC needs -fPIC, -fpic will not do.
    1522             SHLIB_CFLAGS="-fPIC"
    1523             SHLIB_LD="ld -Bshareable -x"
    1524             SHLIB_LD_LIBS='${LIBS}'
    1525             SHLIB_SUFFIX=".so"
    1526             DL_OBJS="tclLoadDl.o"
    1527             DL_LIBS=""
    1528             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1529             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
    1530             AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
    1531                 AC_EGREP_CPP(yes, [
     1450            # Not available on all versions:  check for include file.
     1451            AC_CHECK_HEADER(dlfcn.h, [
     1452                # NetBSD/SPARC needs -fPIC, -fpic will not do.
     1453                SHLIB_CFLAGS="-fPIC"
     1454                SHLIB_LD="ld -Bshareable -x"
     1455                SHLIB_LD_LIBS='${LIBS}'
     1456                SHLIB_SUFFIX=".so"
     1457                DL_OBJS="tclLoadDl.o"
     1458                DL_LIBS=""
     1459                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1460                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     1461                AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
     1462                    AC_EGREP_CPP(yes, [
    15321463#ifdef __ELF__
    15331464        yes
    15341465#endif
    1535                 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
    1536             if test $tcl_cv_ld_elf = yes; then
    1537                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
    1538             else
    1539                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1540             fi
    1541 
    1542             # Ancient FreeBSD doesn't handle version numbers with dots.
    1543 
    1544             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1466                    ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
     1467                if test $tcl_cv_ld_elf = yes; then
     1468                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     1469                else
     1470                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1471                fi
     1472            ], [
     1473                SHLIB_CFLAGS=""
     1474                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     1475                SHLIB_LD_LIBS='${LIBS}'
     1476                SHLIB_SUFFIX=".a"
     1477                DL_OBJS="tclLoadAout.o"
     1478                DL_LIBS=""
     1479                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1480                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1481                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1482            ])
     1483
     1484            # FreeBSD doesn't handle version numbers with dots.
     1485
     1486            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    15451487            TCL_LIB_VERSIONS_OK=nodots
    15461488            ;;
    15471489        OpenBSD-*)
    1548             # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
    1549             case `machine` in
    1550             sparc|sparc64)
    1551                 SHLIB_CFLAGS="-fPIC";;
     1490            case `arch -s` in
     1491            m88k|vax)
     1492                SHLIB_CFLAGS=""
     1493                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     1494                SHLIB_LD_LIBS='${LIBS}'
     1495                SHLIB_SUFFIX=".a"
     1496                DL_OBJS="tclLoadAout.o"
     1497                DL_LIBS=""
     1498                LDFLAGS=""
     1499                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1500                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1501                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1502                ;;
    15521503            *)
    1553                 SHLIB_CFLAGS="-fpic";;
    1554             esac
    1555             SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
    1556             SHLIB_LD_LIBS='${LIBS}'
    1557             SHLIB_SUFFIX=".so"
    1558             DL_OBJS="tclLoadDl.o"
    1559             DL_LIBS=""
    1560             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1561             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
    1562             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1563             AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
    1564                 AC_EGREP_CPP(yes, [
     1504                # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
     1505                case `machine` in
     1506                sparc|sparc64)
     1507                    SHLIB_CFLAGS="-fPIC";;
     1508                *)
     1509                    SHLIB_CFLAGS="-fpic";;
     1510                esac
     1511                SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
     1512                SHLIB_LD_LIBS='${LIBS}'
     1513                SHLIB_SUFFIX=".so"
     1514                DL_OBJS="tclLoadDl.o"
     1515                DL_LIBS=""
     1516                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1517                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1518                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1519                AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
     1520                    AC_EGREP_CPP(yes, [
    15651521#ifdef __ELF__
    15661522        yes
    15671523#endif
    1568                 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
    1569             if test $tcl_cv_ld_elf = yes; then
    1570                 LDFLAGS=-Wl,-export-dynamic
    1571             else
    1572                 LDFLAGS=""
    1573             fi
     1524                    ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
     1525                if test $tcl_cv_ld_elf = yes; then
     1526                    LDFLAGS=-Wl,-export-dynamic
     1527                else
     1528                    LDFLAGS=""
     1529                fi
     1530                ;;
     1531            esac
    15741532
    15751533            # OpenBSD doesn't do version numbers with dots.
    1576             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1534            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    15771535            TCL_LIB_VERSIONS_OK=nodots
    15781536            ;;
     
    15971555            FreeBSD-3.*)
    15981556                # FreeBSD-3 doesn't handle version numbers with dots.
    1599                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
    1600                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
     1557                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1558                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
    16011559                TCL_LIB_VERSIONS_OK=nodots
    16021560                ;;
     
    16061564            CFLAGS_OPTIMIZE="-Os"
    16071565            SHLIB_CFLAGS="-fno-common"
     1566            # To avoid discrepancies between what headers configure sees during
     1567            # preprocessing tests and compiling tests, move any -isysroot and
     1568            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
     1569            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
     1570                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     1571                if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
     1572            CFLAGS="`echo " ${CFLAGS}" | \
     1573                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     1574                if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
    16081575            if test $do64bit = yes; then
    1609                 do64bit_ok=yes
    1610                 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
    1611             fi
    1612             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
    1613             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
     1576                case `arch` in
     1577                    ppc)
     1578                        AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
     1579                                tcl_cv_cc_arch_ppc64, [
     1580                            hold_cflags=$CFLAGS
     1581                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     1582                            AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
     1583                                    tcl_cv_cc_arch_ppc64=no)
     1584                            CFLAGS=$hold_cflags])
     1585                        if test $tcl_cv_cc_arch_ppc64 = yes; then
     1586                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     1587                            do64bit_ok=yes
     1588                        fi;;
     1589                    i386)
     1590                        AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
     1591                                tcl_cv_cc_arch_x86_64, [
     1592                            hold_cflags=$CFLAGS
     1593                            CFLAGS="$CFLAGS -arch x86_64"
     1594                            AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
     1595                                    tcl_cv_cc_arch_x86_64=no)
     1596                            CFLAGS=$hold_cflags])
     1597                        if test $tcl_cv_cc_arch_x86_64 = yes; then
     1598                            CFLAGS="$CFLAGS -arch x86_64"
     1599                            do64bit_ok=yes
     1600                        fi;;
     1601                    *)
     1602                        AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
     1603                esac
     1604            else
     1605                # Check for combined 32-bit and 64-bit fat build
     1606                echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
     1607                    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
     1608                    fat_32_64=yes
     1609            fi
     1610            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
    16141611            AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
    1615                 hold_ldflags=$LDFLAGS
    1616                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
    1617                 AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
    1618                 LDFLAGS=$hold_ldflags])
     1612                hold_ldflags=$LDFLAGS
     1613                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
     1614                AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
     1615                LDFLAGS=$hold_ldflags])
    16191616            if test $tcl_cv_ld_single_module = yes; then
    1620                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
     1617                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
    16211618            fi
    16221619            SHLIB_LD_LIBS='${LIBS}'
     
    16251622            DL_LIBS=""
    16261623            # Don't use -prebind when building for Mac OS X 10.4 or later only:
    1627             test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
    1628                 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \
     1624            test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
     1625                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \
    16291626                LDFLAGS="$LDFLAGS -prebind"
    16301627            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
    16311628            AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
    1632                 hold_ldflags=$LDFLAGS
    1633                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    1634                 AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
    1635                 LDFLAGS=$hold_ldflags])
     1629                hold_ldflags=$LDFLAGS
     1630                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     1631                AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
     1632                LDFLAGS=$hold_ldflags])
    16361633            if test $tcl_cv_ld_search_paths_first = yes; then
    1637                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     1634                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    16381635            fi
    16391636            CC_SEARCH_FLAGS=""
    16401637            LD_SEARCH_FLAGS=""
    16411638            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
    1642 
    1643             # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS
    1644             # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit
    1645             # at present (no 64bit GUI libraries).
    1646             test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \
    1647                 CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
     1639            PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
     1640            PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
     1641            AC_MSG_CHECKING([whether to use CoreFoundation])
     1642            AC_ARG_ENABLE(corefoundation, [  --enable-corefoundation use CoreFoundation API [--enable-corefoundation]],
     1643                [tcl_corefoundation=$enableval], [tcl_corefoundation=yes])
     1644            AC_MSG_RESULT([$tcl_corefoundation])
     1645            if test $tcl_corefoundation = yes; then
     1646                AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [
     1647                    hold_libs=$LIBS
     1648                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     1649                        # On Tiger there is no 64-bit CF, so remove 64-bit archs
     1650                        # from CFLAGS et al. while testing for presence of CF.
     1651                        # 64-bit CF is disabled in tclUnixPort.h if necessary.
     1652                        eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
     1653                    done; fi
     1654                    LIBS="$LIBS -framework CoreFoundation"
     1655                    AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
     1656                        [CFBundleRef b = CFBundleGetMainBundle();],
     1657                        tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
     1658                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     1659                        eval $v'="$hold_'$v'"'
     1660                    done; fi; LIBS=$hold_libs])
     1661                if test $tcl_cv_lib_corefoundation = yes; then
     1662                    LIBS="$LIBS -framework CoreFoundation"
     1663                    AC_DEFINE(HAVE_COREFOUNDATION)
     1664                else
     1665                    tcl_corefoundation=no
     1666                fi
     1667                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
     1668                    AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [
     1669                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     1670                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
     1671                        done
     1672                        AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
     1673                            [CFBundleRef b = CFBundleGetMainBundle();],
     1674                            tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no)
     1675                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     1676                            eval $v'="$hold_'$v'"'
     1677                        done])
     1678                    if test $tcl_cv_lib_corefoundation_64 = no; then
     1679                        AC_DEFINE(NO_COREFOUNDATION_64)
     1680                    fi
     1681                fi
     1682            fi
     1683            AC_DEFINE(MAC_OSX_TCL)
    16481684            ;;
    16491685        NEXTSTEP-*)
     
    16591695        OS/390-*)
    16601696            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
    1661             AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
    1662                 [Should OS/390 do the right thing with sockets?])
     1697            AC_DEFINE(_OE_SOCKETS)      # needed in sys/socket.h
    16631698            ;;     
    16641699        OSF1-1.0|OSF1-1.1|OSF1-1.2)
     
    17351770            LD_SEARCH_FLAGS=""
    17361771            ;;
     1772        RISCos-*)
     1773            SHLIB_CFLAGS="-G 0"
     1774            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1775            SHLIB_LD_LIBS='${LIBS}'
     1776            SHLIB_SUFFIX=".a"
     1777            DL_OBJS="tclLoadAout.o"
     1778            DL_LIBS=""
     1779            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1780            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1781            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1782            ;;
    17371783        SCO_SV-3.2*)
    17381784            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
     
    17791825            # So, the library has to have a name like libtcl75.so.1.0
    17801826
    1781             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1782             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1827            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1828            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    17831829            TCL_LIB_VERSIONS_OK=nodots
    17841830            ;;
     
    17891835            # won't define thread-safe library routines.
    17901836
    1791             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    1792             AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    1793                 [Do we really want to follow the standard? Yes we do!])
     1837            AC_DEFINE(_REENTRANT)
     1838            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
    17941839
    17951840            SHLIB_CFLAGS="-KPIC"
     
    18161861            # won't define thread-safe library routines.
    18171862
    1818             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    1819             AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    1820                 [Do we really want to follow the standard? Yes we do!])
     1863            AC_DEFINE(_REENTRANT)
     1864            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
    18211865
    18221866            SHLIB_CFLAGS="-KPIC"
     
    18391883                            if test "$do64bitVIS" = "yes" ; then
    18401884                                CFLAGS="$CFLAGS -xarch=v9a"
    1841                                 LDFLAGS_ARCH="-xarch=v9a"
     1885                                LDFLAGS="$LDFLAGS -xarch=v9a"
    18421886                            else
    18431887                                CFLAGS="$CFLAGS -xarch=v9"
    1844                                 LDFLAGS_ARCH="-xarch=v9"
     1888                                LDFLAGS="$LDFLAGS -xarch=v9"
    18451889                            fi
    18461890                            # Solaris 64 uses this as well
     
    18741918                    # We need to specify -static-libgcc or we need to
    18751919                    # add the path to the sparv9 libgcc.
    1876                     # JH: static-libgcc is necessary for core Tcl, but may
    1877                     # not be necessary for extensions.
    18781920                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
    18791921                    # for finding sparcv9 libgcc, get the regular libgcc
     
    18831925                fi
    18841926            else
    1885                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     1927                case $system in
     1928                    SunOS-5.[[1-9]][[0-9]]*)
     1929                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
     1930                    *)
     1931                        SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
     1932                esac
    18861933                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
    18871934                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     1935            fi
     1936            ;;
     1937        ULTRIX-4.*)
     1938            SHLIB_CFLAGS="-G 0"
     1939            SHLIB_SUFFIX=".a"
     1940            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1941            SHLIB_LD_LIBS='${LIBS}'
     1942            DL_OBJS="tclLoadAout.o"
     1943            DL_LIBS=""
     1944            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1945            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1946            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1947            if test "$GCC" != "yes" ; then
     1948                CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
    18881949            fi
    18891950            ;;
     
    19141975    fi
    19151976
    1916     # Step 4: disable dynamic loading if requested via a command-line switch.
    1917 
    1918     AC_ARG_ENABLE(load,
    1919         AC_HELP_STRING([--disable-load],
    1920             [disallow dynamic loading and "load" command (default: enabled)]),
     1977dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
     1978dnl # until the end of configure, as configure's compile and link tests use
     1979dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
     1980dnl # preprocessing tests use only CPPFLAGS.
     1981    SC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
     1982
     1983    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
     1984    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
     1985    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
     1986    # to determine which of several header files defines the a.out file
     1987    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
     1988    # support only a file format that is more or less version-7-compatible.
     1989    # In particular,
     1990    #   - a.out files must begin with `struct exec'.
     1991    #   - the N_TXTOFF on the `struct exec' must compute the seek address
     1992    #     of the text segment
     1993    #   - The `struct exec' must contain a_magic, a_text, a_data, a_bss
     1994    #     and a_entry fields.
     1995    # The following compilation should succeed if and only if either sys/exec.h
     1996    # or a.out.h is usable for the purpose.
     1997    #
     1998    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
     1999    # `struct exec' includes a second header that contains information that
     2000    # duplicates the v7 fields that are needed.
     2001
     2002    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
     2003        AC_CACHE_CHECK([sys/exec.h], tcl_cv_sysexec_h, [
     2004        AC_TRY_COMPILE([#include <sys/exec.h>],[
     2005            struct exec foo;
     2006            unsigned long seek;
     2007            int flag;
     2008#if defined(__mips) || defined(mips)
     2009            seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2010#else
     2011            seek = N_TXTOFF (foo);
     2012#endif
     2013            flag = (foo.a_magic == OMAGIC);
     2014            return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2015    ], tcl_cv_sysexec_h=usable, tcl_cv_sysexec_h=unusable)])
     2016        if test $tcl_cv_sysexec_h = usable; then
     2017            AC_DEFINE(USE_SYS_EXEC_H)
     2018        else
     2019            AC_CACHE_CHECK([a.out.h], tcl_cv_aout_h, [
     2020            AC_TRY_COMPILE([#include <a.out.h>],[
     2021                struct exec foo;
     2022                unsigned long seek;
     2023                int flag;
     2024#if defined(__mips) || defined(mips)
     2025                seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2026#else
     2027                seek = N_TXTOFF (foo);
     2028#endif
     2029                flag = (foo.a_magic == OMAGIC);
     2030                return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2031            ], tcl_cv_aout_h=usable, tcl_cv_aout_h=unusable)])
     2032            if test $tcl_cv_aout_h = usable; then
     2033                AC_DEFINE(USE_A_OUT_H)
     2034            else
     2035                AC_CACHE_CHECK([sys/exec_aout.h], tcl_cv_sysexecaout_h, [
     2036                AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
     2037                    struct exec foo;
     2038                    unsigned long seek;
     2039                    int flag;
     2040#if defined(__mips) || defined(mips)
     2041                    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2042#else
     2043                    seek = N_TXTOFF (foo);
     2044#endif
     2045                    flag = (foo.a_midmag == OMAGIC);
     2046                    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2047                ], tcl_cv_sysexecaout_h=usable, tcl_cv_sysexecaout_h=unusable)])
     2048                if test $tcl_cv_sysexecaout_h = usable; then
     2049                    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
     2050                else
     2051                    DL_OBJS=""
     2052                fi
     2053            fi
     2054        fi
     2055    fi
     2056
     2057    # Step 5: disable dynamic loading if requested via a command-line switch.
     2058
     2059    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
    19212060        [tcl_ok=$enableval], [tcl_ok=yes])
    19222061    if test "$tcl_ok" = "no"; then
     
    19392078        BUILD_DLTEST=""
    19402079    fi
    1941     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
    19422080
    19432081    # If we're running gcc, then change the C flags for compiling shared
     
    19542092                IRIX*)
    19552093                    ;;
    1956                 NetBSD-*|FreeBSD-*)
     2094                NetBSD-*|FreeBSD-*|OpenBSD-*)
    19572095                    ;;
    19582096                Darwin-*)
    19592097                    ;;
     2098                RISCos-*)
     2099                    ;;
    19602100                SCO_SV-3.2*)
    19612101                    ;;
    1962                 windows)
     2102                ULTRIX-4.*)
    19632103                    ;;
    19642104                *)
     
    19702110
    19712111    if test "$SHARED_LIB_SUFFIX" = "" ; then
    1972         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
     2112        SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    19732113    fi
    19742114    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
    1975         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
    1976     fi
     2115        UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     2116    fi
     2117
     2118    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
     2119        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
     2120        MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
     2121        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     2122    else
     2123        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
     2124
     2125        if test "$RANLIB" = "" ; then
     2126            MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
     2127            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     2128        else
     2129            MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
     2130            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
     2131        fi
     2132
     2133dnl        Not at all clear what this was doing in Tcl's configure.in
     2134dnl        or why it was needed was needed. In any event, this sort of
     2135dnl        things needs to be done in the big loop above.
     2136dnl        REMOVE THIS BLOCK LATER! (mdejong)
     2137dnl        case $system in
     2138dnl            BSD/OS*)
     2139dnl                ;;
     2140dnl            AIX-[[1-4]].*)
     2141dnl                ;;
     2142dnl            *)
     2143dnl                SHLIB_LD_LIBS=""
     2144dnl                ;;
     2145dnl        esac
     2146    fi
     2147
     2148
     2149    # Stub lib does not depend on shared/static configuration
     2150    if test "$RANLIB" = "" ; then
     2151        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
     2152        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
     2153    else
     2154        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
     2155        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
     2156    fi
     2157
    19772158
    19782159    AC_SUBST(DL_LIBS)
    19792160
     2161    AC_SUBST(DL_OBJS)
     2162    AC_SUBST(PLAT_OBJS)
     2163    AC_SUBST(PLAT_SRCS)
     2164    AC_SUBST(CFLAGS)
    19802165    AC_SUBST(CFLAGS_DEBUG)
    19812166    AC_SUBST(CFLAGS_OPTIMIZE)
    19822167    AC_SUBST(CFLAGS_WARNING)
    19832168
     2169    AC_SUBST(LDFLAGS)
     2170    AC_SUBST(LDFLAGS_DEBUG)
     2171    AC_SUBST(LDFLAGS_OPTIMIZE)
     2172    AC_SUBST(CC_SEARCH_FLAGS)
     2173    AC_SUBST(LD_SEARCH_FLAGS)
     2174
    19842175    AC_SUBST(STLIB_LD)
    19852176    AC_SUBST(SHLIB_LD)
    1986 
     2177    AC_SUBST(TCL_SHLIB_LD_EXTRAS)
     2178    AC_SUBST(TK_SHLIB_LD_EXTRAS)
    19872179    AC_SUBST(SHLIB_LD_LIBS)
    19882180    AC_SUBST(SHLIB_CFLAGS)
    1989 
    1990     AC_SUBST(LD_LIBRARY_PATH_VAR)
    1991 
    1992     # These must be called after we do the basic CFLAGS checks and
    1993     # verify any possible 64-bit or similar switches are necessary
    1994     TEA_TCL_EARLY_FLAGS
    1995     TEA_TCL_64BIT_FLAGS
     2181    AC_SUBST(SHLIB_SUFFIX)
     2182
     2183    AC_SUBST(MAKE_LIB)
     2184    AC_SUBST(MAKE_STUB_LIB)
     2185    AC_SUBST(INSTALL_LIB)
     2186    AC_SUBST(INSTALL_STUB_LIB)
     2187    AC_SUBST(RANLIB)
    19962188])
    19972189
    19982190#--------------------------------------------------------------------
    1999 # TEA_SERIAL_PORT
     2191# SC_SERIAL_PORT
    20002192#
    20012193#       Determine which interface to use to talk to the serial port.
     
    20182210#--------------------------------------------------------------------
    20192211
    2020 AC_DEFUN([TEA_SERIAL_PORT], [
     2212AC_DEFUN([SC_SERIAL_PORT], [
    20212213    AC_CHECK_HEADERS(sys/modem.h)
    20222214    AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
     
    21082300    fi])
    21092301    case $tcl_cv_api_serial in
    2110         termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
    2111         termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
    2112         sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
     2302        termios) AC_DEFINE(USE_TERMIOS);;
     2303        termio)  AC_DEFINE(USE_TERMIO);;
     2304        sgtty)   AC_DEFINE(USE_SGTTY);;
    21132305    esac
    21142306])
    21152307
    21162308#--------------------------------------------------------------------
    2117 # TEA_MISSING_POSIX_HEADERS
     2309# SC_MISSING_POSIX_HEADERS
    21182310#
    21192311#       Supply substitutes for missing POSIX header files.  Special
     
    21382330#               NO_SYS_WAIT_H
    21392331#               NO_DLFCN_H
     2332#               HAVE_UNISTD_H
    21402333#               HAVE_SYS_PARAM_H
    21412334#
    21422335#               HAVE_STRING_H ?
    21432336#
    2144 # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
    2145 # CHECK on limits.h
    2146 #--------------------------------------------------------------------
    2147 
    2148 AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
    2149     AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h,
     2337#--------------------------------------------------------------------
     2338
     2339AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
     2340    AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
    21502341    AC_TRY_LINK([#include <sys/types.h>
    21512342#include <dirent.h>], [
     
    21672358p = entryPtr->d_name;
    21682359closedir(d);
    2169 ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no))
     2360], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
    21702361
    21712362    if test $tcl_cv_dirent_h = no; then
    2172         AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
    2173     fi
    2174 
    2175     AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
    2176     AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
    2177     AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
     2363        AC_DEFINE(NO_DIRENT_H)
     2364    fi
     2365
     2366    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
     2367    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
     2368    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
    21782369    AC_CHECK_HEADER(limits.h,
    2179         [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
    2180         [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
     2370        [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
    21812371    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
    21822372    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
     
    21842374    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
    21852375    if test $tcl_ok = 0; then
    2186         AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
     2376        AC_DEFINE(NO_STDLIB_H)
    21872377    fi
    21882378    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
     
    21942384
    21952385    if test $tcl_ok = 0; then
    2196         AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
    2197     fi
    2198 
    2199     AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
    2200     AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
     2386        AC_DEFINE(NO_STRING_H)
     2387    fi
     2388
     2389    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
     2390    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
    22012391
    22022392    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
    2203     AC_HAVE_HEADERS(sys/param.h)
     2393    AC_HAVE_HEADERS(unistd.h sys/param.h)
    22042394])
    22052395
    22062396#--------------------------------------------------------------------
    2207 # TEA_PATH_X
     2397# SC_PATH_X
    22082398#
    22092399#       Locate the X11 header files and the X11 library archive.  Try
     
    22142404#       no include files, so double-check its result just to be safe.
    22152405#
    2216 #       This should be called after TEA_CONFIG_CFLAGS as setting the
    2217 #       LIBS line can confuse some configure macro magic.
    2218 #
    22192406# Arguments:
    22202407#       none
     
    22222409# Results:
    22232410#
    2224 #       Sets the following vars:
     2411#       Sets the the following vars:
    22252412#               XINCLUDES
    22262413#               XLIBSW
    2227 #               PKG_LIBS (appends to)
    2228 #
    2229 #--------------------------------------------------------------------
    2230 
    2231 AC_DEFUN([TEA_PATH_X], [
    2232     if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
    2233         TEA_PATH_UNIX_X
    2234     fi
    2235 ])
    2236 
    2237 AC_DEFUN([TEA_PATH_UNIX_X], [
     2414#
     2415#--------------------------------------------------------------------
     2416
     2417AC_DEFUN([SC_PATH_X], [
    22382418    AC_PATH_X
    22392419    not_really_there=""
     
    22982478        XLIBSW=-lX11
    22992479    fi
    2300     if test x"${XLIBSW}" != x ; then
    2301         PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
    2302     fi
    23032480])
    23042481
    23052482#--------------------------------------------------------------------
    2306 # TEA_BLOCKING_STYLE
     2483# SC_BLOCKING_STYLE
    23072484#
    23082485#       The statements below check for systems where POSIX-style
     
    23242501#--------------------------------------------------------------------
    23252502
    2326 AC_DEFUN([TEA_BLOCKING_STYLE], [
     2503AC_DEFUN([SC_BLOCKING_STYLE], [
    23272504    AC_CHECK_HEADERS(sys/ioctl.h)
    23282505    AC_CHECK_HEADERS(sys/filio.h)
    2329     TEA_CONFIG_SYSTEM
     2506    SC_CONFIG_SYSTEM
    23302507    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
    23312508    case $system in
     
    23362513
    23372514        OSF*)
    2338             AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
     2515            AC_DEFINE(USE_FIONBIO)
    23392516            AC_MSG_RESULT([FIONBIO])
    23402517            ;;
    23412518        SunOS-4*)
    2342             AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
     2519            AC_DEFINE(USE_FIONBIO)
     2520            AC_MSG_RESULT([FIONBIO])
     2521            ;;
     2522        ULTRIX-4.*)
     2523            AC_DEFINE(USE_FIONBIO)
    23432524            AC_MSG_RESULT([FIONBIO])
    23442525            ;;
     
    23502531
    23512532#--------------------------------------------------------------------
    2352 # TEA_TIME_HANLDER
     2533# SC_TIME_HANLDER
    23532534#
    23542535#       Checks how the system deals with time.h, what time structures
     
    23682549#--------------------------------------------------------------------
    23692550
    2370 AC_DEFUN([TEA_TIME_HANDLER], [
     2551AC_DEFUN([SC_TIME_HANDLER], [
    23712552    AC_CHECK_HEADERS(sys/time.h)
    23722553    AC_HEADER_TIME
     
    23752556    AC_CHECK_FUNCS(gmtime_r localtime_r)
    23762557
    2377     AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj,
     2558    AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
    23782559        AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
    2379             tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
     2560            tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
    23802561    if test $tcl_cv_member_tm_tzadj = yes ; then
    2381         AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
    2382     fi
    2383 
    2384     AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff,
     2562        AC_DEFINE(HAVE_TM_TZADJ)
     2563    fi
     2564
     2565    AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
    23852566        AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
    2386             tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
     2567            tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
    23872568    if test $tcl_cv_member_tm_gmtoff = yes ; then
    2388         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
     2569        AC_DEFINE(HAVE_TM_GMTOFF)
    23892570    fi
    23902571
     
    23932574    # (like convex) have timezone functions, etc.
    23942575    #
    2395     AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long,
     2576    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
    23962577        AC_TRY_COMPILE([#include <time.h>],
    23972578            [extern long timezone;
    23982579            timezone += 1;
    23992580            exit (0);],
    2400             tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
     2581            tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
    24012582    if test $tcl_cv_timezone_long = yes ; then
    2402         AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
     2583        AC_DEFINE(HAVE_TIMEZONE_VAR)
    24032584    else
    24042585        #
    24052586        # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
    24062587        #
    2407         AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time,
     2588        AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
    24082589            AC_TRY_COMPILE([#include <time.h>],
    24092590                [extern time_t timezone;
    24102591                timezone += 1;
    24112592                exit (0);],
    2412                 tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
     2593                tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
    24132594        if test $tcl_cv_timezone_time = yes ; then
    2414             AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
     2595            AC_DEFINE(HAVE_TIMEZONE_VAR)
    24152596        fi
    24162597    fi
     
    24182599
    24192600#--------------------------------------------------------------------
    2420 # TEA_BUGGY_STRTOD
     2601# SC_BUGGY_STRTOD
    24212602#
    24222603#       Under Solaris 2.4, strtod returns the wrong value for the
     
    24372618#--------------------------------------------------------------------
    24382619
    2439 AC_DEFUN([TEA_BUGGY_STRTOD], [
     2620AC_DEFUN([SC_BUGGY_STRTOD], [
    24402621    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
    24412622    if test "$tcl_strtod" = 1; then
     
    24632644                    tcl_cv_strtod_buggy=buggy)])
    24642645        if test "$tcl_cv_strtod_buggy" = buggy; then
    2465             AC_LIBOBJ([fixstrtod])
    2466             USE_COMPAT=1
    2467             AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
     2646            LIBOBJS="$LIBOBJS fixstrtod.o"
     2647            AC_DEFINE(strtod, fixstrtod)
    24682648        fi
    24692649    fi
     
    24712651
    24722652#--------------------------------------------------------------------
    2473 # TEA_TCL_LINK_LIBS
     2653# SC_TCL_LINK_LIBS
    24742654#
    24752655#       Search for the libraries needed to link the Tcl shell.
     
    24972677#--------------------------------------------------------------------
    24982678
    2499 AC_DEFUN([TEA_TCL_LINK_LIBS], [
     2679AC_DEFUN([SC_TCL_LINK_LIBS], [
    25002680    #--------------------------------------------------------------------
    25012681    # On a few very rare systems, all of the libm.a stuff is
     
    25142694
    25152695    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
    2516     AC_CHECK_HEADER(net/errno.h, [
    2517         AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
     2696    AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)])
    25182697
    25192698    #--------------------------------------------------------------------
     
    25502729   
    25512730    # Don't perform the eval of the libraries here because DL_LIBS
    2552     # won't be set until we call TEA_CONFIG_CFLAGS
     2731    # won't be set until we call SC_CONFIG_CFLAGS
    25532732
    25542733    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
     
    25582737
    25592738#--------------------------------------------------------------------
    2560 # TEA_TCL_EARLY_FLAGS
     2739# SC_TCL_EARLY_FLAGS
    25612740#
    25622741#       Check for what flags are needed to be passed so the correct OS
     
    25752754#--------------------------------------------------------------------
    25762755
    2577 AC_DEFUN([TEA_TCL_EARLY_FLAG],[
     2756AC_DEFUN([SC_TCL_EARLY_FLAG],[
    25782757    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
    25792758        AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
     
    25832762                [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
    25842763    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
    2585         AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
     2764        AC_DEFINE($1)
    25862765        tcl_flags="$tcl_flags $1"
    25872766    fi
    25882767])
    25892768
    2590 AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
     2769AC_DEFUN([SC_TCL_EARLY_FLAGS],[
    25912770    AC_MSG_CHECKING([for required early compiler flags])
    25922771    tcl_flags=""
    2593     TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
     2772    SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
    25942773        [char *p = (char *)strtoll; char *q = (char *)strtoull;])
    2595     TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
     2774    SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
    25962775        [struct stat64 buf; int i = stat64("/", &buf);])
    2597     TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
     2776    SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
    25982777        [char *p = (char *)open64;])
    25992778    if test "x${tcl_flags}" = "x" ; then
     
    26052784
    26062785#--------------------------------------------------------------------
    2607 # TEA_TCL_64BIT_FLAGS
     2786# SC_TCL_64BIT_FLAGS
    26082787#
    26092788#       Check for what is defined in the way of 64-bit features.
     
    26232802#--------------------------------------------------------------------
    26242803
    2625 AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
     2804AC_DEFUN([SC_TCL_64BIT_FLAGS], [
    26262805    AC_MSG_CHECKING([for 64-bit integer type])
    26272806    AC_CACHE_VAL(tcl_cv_type_64bit,[
     
    26372816        }],tcl_cv_type_64bit=${tcl_type_64bit})])
    26382817    if test "${tcl_cv_type_64bit}" = none ; then
    2639         AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
     2818        AC_DEFINE(TCL_WIDE_INT_IS_LONG)
    26402819        AC_MSG_RESULT([using long])
    2641     elif test "${tcl_cv_type_64bit}" = "__int64" \
    2642                 -a "${TEA_PLATFORM}" = "windows" ; then
    2643         # We actually want to use the default tcl.h checks in this
    2644         # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
    2645         AC_MSG_RESULT([using Tcl header defaults])
    26462820    else
    2647         AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
    2648             [What type should be used to define wide integers?])
     2821        AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
    26492822        AC_MSG_RESULT([${tcl_cv_type_64bit}])
    26502823
     
    26552828                tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
    26562829        if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
    2657             AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
     2830            AC_DEFINE(HAVE_STRUCT_DIRENT64)
    26582831        fi
    26592832
     
    26632836                tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
    26642837        if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
    2665             AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
     2838            AC_DEFINE(HAVE_STRUCT_STAT64)
    26662839        fi
    26672840
     
    26772850                test "x${ac_cv_func_lseek64}" = "xyes" && \
    26782851                test "x${ac_cv_func_open64}" = "xyes" ; then
    2679             AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
     2852            AC_DEFINE(HAVE_TYPE_OFF64_T)
    26802853            AC_MSG_RESULT([yes])
    26812854        else
     
    26852858])
    26862859
    2687 ##
    2688 ## Here ends the standard Tcl configuration bits and starts the
    2689 ## TEA specific functions
    2690 ##
    2691 
    2692 #------------------------------------------------------------------------
    2693 # TEA_INIT --
    2694 #
    2695 #       Init various Tcl Extension Architecture (TEA) variables.
    2696 #       This should be the first called TEA_* macro.
     2860#--------------------------------------------------------------------
     2861# SC_TCL_GETHOSTBYADDR_R
     2862#
     2863#       Check if we have MT-safe variant of gethostbyaddr().
    26972864#
    26982865# Arguments:
    2699 #       none
    2700 #
     2866#       None
     2867#       
    27012868# Results:
    27022869#
    2703 #       Defines and substs the following vars:
    2704 #               CYGPATH
    2705 #               EXEEXT
    2706 #       Defines only:
    2707 #               TEA_VERSION
    2708 #               TEA_INITED
    2709 #               TEA_PLATFORM (windows or unix)
    2710 #
    2711 # "cygpath" is used on windows to generate native path names for include
    2712 # files. These variables should only be used with the compiler and linker
    2713 # since they generate native path names.
    2714 #
    2715 # EXEEXT
    2716 #       Select the executable extension based on the host type.  This
    2717 #       is a lightweight replacement for AC_EXEEXT that doesn't require
    2718 #       a compiler.
    2719 #------------------------------------------------------------------------
    2720 
    2721 AC_DEFUN([TEA_INIT], [
    2722     # TEA extensions pass this us the version of TEA they think they
    2723     # are compatible with.
    2724     TEA_VERSION="3.5"
    2725 
    2726     AC_MSG_CHECKING([for correct TEA configuration])
    2727     if test x"${PACKAGE_NAME}" = x ; then
    2728         AC_MSG_ERROR([
    2729 The PACKAGE_NAME variable must be defined by your TEA configure.in])
    2730     fi
    2731     if test x"$1" = x ; then
    2732         AC_MSG_ERROR([
    2733 TEA version not specified.])
    2734     elif test "$1" != "${TEA_VERSION}" ; then
    2735         AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
     2870#       Might define the following vars:
     2871#               HAVE_GETHOSTBYADDR_R
     2872#               HAVE_GETHOSTBYADDR_R_7
     2873#               HAVE_GETHOSTBYADDR_R_8
     2874#
     2875#--------------------------------------------------------------------
     2876
     2877AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
     2878    AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [
     2879    AC_TRY_COMPILE([
     2880        #include <netdb.h>
     2881    ], [
     2882        char *addr;
     2883        int length;
     2884        int type;
     2885        struct hostent *result;
     2886        char buffer[2048];
     2887        int buflen = 2048;
     2888        int h_errnop;
     2889
     2890        (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
     2891                               &h_errnop);
     2892    ], tcl_cv_api_gethostbyaddr_r_7=yes, tcl_cv_api_gethostbyaddr_r_7=no)])
     2893    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
     2894    if test "$tcl_ok" = yes; then
     2895        AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
    27362896    else
    2737         AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
    2738     fi
    2739     case "`uname -s`" in
    2740         *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*|*MSYS_NT*)
    2741             AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
    2742             EXEEXT=".exe"
    2743             TEA_PLATFORM="windows"
    2744             ;;
    2745         *)
    2746             CYGPATH=echo
    2747             EXEEXT=""
    2748             TEA_PLATFORM="unix"
    2749             ;;
    2750     esac
    2751 
    2752     # Check if exec_prefix is set. If not use fall back to prefix.
    2753     # Note when adjusted, so that TEA_PREFIX can correct for this.
    2754     # This is needed for recursive configures, since autoconf propagates
    2755     # $prefix, but not $exec_prefix (doh!).
    2756     if test x$exec_prefix = xNONE ; then
    2757         exec_prefix_default=yes
    2758         exec_prefix=$prefix
    2759     fi
    2760 
    2761     AC_SUBST(EXEEXT)
    2762     AC_SUBST(CYGPATH)
    2763 
    2764     # This package name must be replaced statically for AC_SUBST to work
    2765     AC_SUBST(PKG_LIB_FILE)
    2766     # Substitute STUB_LIB_FILE in case package creates a stub library too.
    2767     AC_SUBST(PKG_STUB_LIB_FILE)
    2768 
    2769     # We AC_SUBST these here to ensure they are subst'ed,
    2770     # in case the user doesn't call TEA_ADD_...
    2771     AC_SUBST(PKG_STUB_SOURCES)
    2772     AC_SUBST(PKG_STUB_OBJECTS)
    2773     AC_SUBST(PKG_TCL_SOURCES)
    2774     AC_SUBST(PKG_HEADERS)
    2775     AC_SUBST(PKG_INCLUDES)
    2776     AC_SUBST(PKG_LIBS)
    2777     AC_SUBST(PKG_CFLAGS)
    2778 ])
    2779 
    2780 #------------------------------------------------------------------------
    2781 # TEA_ADD_SOURCES --
    2782 #
    2783 #       Specify one or more source files.  Users should check for
    2784 #       the right platform before adding to their list.
    2785 #       It is not important to specify the directory, as long as it is
    2786 #       in the generic, win or unix subdirectory of $(srcdir).
     2897        AC_CACHE_CHECK([for gethostbyaddr_r with 8 args], tcl_cv_api_gethostbyaddr_r_8, [
     2898        AC_TRY_COMPILE([
     2899            #include <netdb.h>
     2900        ], [
     2901            char *addr;
     2902            int length;
     2903            int type;
     2904            struct hostent *result, *resultp;
     2905            char buffer[2048];
     2906            int buflen = 2048;
     2907            int h_errnop;
     2908
     2909            (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
     2910                                   &resultp, &h_errnop);
     2911        ], tcl_cv_api_gethostbyaddr_r_8=yes, tcl_cv_api_gethostbyaddr_r_8=no)])
     2912        tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
     2913        if test "$tcl_ok" = yes; then
     2914            AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
     2915        fi
     2916    fi
     2917    if test "$tcl_ok" = yes; then
     2918        AC_DEFINE(HAVE_GETHOSTBYADDR_R)
     2919    fi
     2920])])
     2921
     2922#--------------------------------------------------------------------
     2923# SC_TCL_GETHOSTBYNAME_R
     2924#
     2925#       Check to see what variant of gethostbyname_r() we have.
     2926#       Based on David Arnold's example from the comp.programming.threads
     2927#       FAQ Q213
    27872928#
    27882929# Arguments:
    2789 #       one or more file names
    2790 #
     2930#       None
     2931#       
    27912932# Results:
    27922933#
    2793 #       Defines and substs the following vars:
    2794 #               PKG_SOURCES
    2795 #               PKG_OBJECTS
    2796 #------------------------------------------------------------------------
    2797 AC_DEFUN([TEA_ADD_SOURCES], [
    2798     vars="$@"
    2799     for i in $vars; do
    2800         case $i in
    2801             [\$]*)
    2802                 # allow $-var names
    2803                 PKG_SOURCES="$PKG_SOURCES $i"
    2804                 PKG_OBJECTS="$PKG_OBJECTS $i"
    2805                 ;;
    2806             *)
    2807                 # check for existence - allows for generic/win/unix VPATH
    2808                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \
    2809                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
    2810                     ; then
    2811                     AC_MSG_ERROR([could not find source file '$i'])
    2812                 fi
    2813                 PKG_SOURCES="$PKG_SOURCES $i"
    2814                 # this assumes it is in a VPATH dir
    2815                 i=`basename $i`
    2816                 # handle user calling this before or after TEA_SETUP_COMPILER
    2817                 if test x"${OBJEXT}" != x ; then
    2818                     j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
    2819                 else
    2820                     j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
    2821                 fi
    2822                 PKG_OBJECTS="$PKG_OBJECTS $j"
    2823                 ;;
    2824         esac
    2825     done
    2826     AC_SUBST(PKG_SOURCES)
    2827     AC_SUBST(PKG_OBJECTS)
    2828 ])
    2829 
    2830 #------------------------------------------------------------------------
    2831 # TEA_ADD_STUB_SOURCES --
    2832 #
    2833 #       Specify one or more source files.  Users should check for
    2834 #       the right platform before adding to their list.
    2835 #       It is not important to specify the directory, as long as it is
    2836 #       in the generic, win or unix subdirectory of $(srcdir).
     2934#       Might define the following vars:
     2935#               HAVE_GETHOSTBYADDR_R
     2936#               HAVE_GETHOSTBYADDR_R_3
     2937#               HAVE_GETHOSTBYADDR_R_5
     2938#               HAVE_GETHOSTBYADDR_R_6
     2939#
     2940#--------------------------------------------------------------------
     2941
     2942AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [
     2943    AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [
     2944    AC_TRY_COMPILE([
     2945        #include <netdb.h>
     2946    ], [
     2947        char *name;
     2948        struct hostent *he, *res;
     2949        char buffer[2048];
     2950        int buflen = 2048;
     2951        int h_errnop;
     2952
     2953        (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
     2954    ], tcl_cv_api_gethostbyname_r_6=yes, tcl_cv_api_gethostbyname_r_6=no)])
     2955    tcl_ok=$tcl_cv_api_gethostbyname_r_6
     2956    if test "$tcl_ok" = yes; then
     2957        AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
     2958    else
     2959        AC_CACHE_CHECK([for gethostbyname_r with 5 args], tcl_cv_api_gethostbyname_r_5, [
     2960        AC_TRY_COMPILE([
     2961            #include <netdb.h>
     2962        ], [
     2963            char *name;
     2964            struct hostent *he;
     2965            char buffer[2048];
     2966            int buflen = 2048;
     2967            int h_errnop;
     2968
     2969            (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
     2970        ], tcl_cv_api_gethostbyname_r_5=yes, tcl_cv_api_gethostbyname_r_5=no)])
     2971        tcl_ok=$tcl_cv_api_gethostbyname_r_5
     2972        if test "$tcl_ok" = yes; then
     2973            AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
     2974        else
     2975            AC_CACHE_CHECK([for gethostbyname_r with 3 args], tcl_cv_api_gethostbyname_r_3, [
     2976            AC_TRY_COMPILE([
     2977                #include <netdb.h>
     2978            ], [
     2979                char *name;
     2980                struct hostent *he;
     2981                struct hostent_data data;
     2982
     2983                (void) gethostbyname_r(name, he, &data);
     2984            ], tcl_cv_api_gethostbyname_r_3=yes, tcl_cv_api_gethostbyname_r_3=no)])
     2985            tcl_ok=$tcl_cv_api_gethostbyname_r_3
     2986            if test "$tcl_ok" = yes; then
     2987                AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
     2988            fi
     2989        fi
     2990    fi
     2991    if test "$tcl_ok" = yes; then
     2992        AC_DEFINE(HAVE_GETHOSTBYNAME_R)
     2993    fi
     2994])])
     2995
     2996#--------------------------------------------------------------------
     2997# SC_TCL_GETPWUID_R
     2998#
     2999#       Check if we have MT-safe variant of getpwuid() and if yes,
     3000#       which one exactly.
    28373001#
    28383002# Arguments:
    2839 #       one or more file names
    2840 #
     3003#       None
     3004#       
    28413005# Results:
    28423006#
    2843 #       Defines and substs the following vars:
    2844 #               PKG_STUB_SOURCES
    2845 #               PKG_STUB_OBJECTS
    2846 #------------------------------------------------------------------------
    2847 AC_DEFUN([TEA_ADD_STUB_SOURCES], [
    2848     vars="$@"
    2849     for i in $vars; do
    2850         # check for existence - allows for generic/win/unix VPATH
    2851         if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
    2852             -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
    2853             ; then
    2854             AC_MSG_ERROR([could not find stub source file '$i'])
     3007#       Might define the following vars:
     3008#               HAVE_GETPWUID_R
     3009#               HAVE_GETPWUID_R_4
     3010#               HAVE_GETPWUID_R_5
     3011#
     3012#--------------------------------------------------------------------
     3013
     3014AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
     3015    AC_CACHE_CHECK([for getpwuid_r with 5 args], tcl_cv_api_getpwuid_r_5, [
     3016    AC_TRY_COMPILE([
     3017        #include <sys/types.h>
     3018        #include <pwd.h>
     3019    ], [
     3020        uid_t uid;
     3021        struct passwd pw, *pwp;
     3022        char buf[512];
     3023        int buflen = 512;
     3024
     3025        (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
     3026    ], tcl_cv_api_getpwuid_r_5=yes, tcl_cv_api_getpwuid_r_5=no)])
     3027    tcl_ok=$tcl_cv_api_getpwuid_r_5
     3028    if test "$tcl_ok" = yes; then
     3029        AC_DEFINE(HAVE_GETPWUID_R_5)
     3030    else
     3031        AC_CACHE_CHECK([for getpwuid_r with 4 args], tcl_cv_api_getpwuid_r_4, [
     3032        AC_TRY_COMPILE([
     3033            #include <sys/types.h>
     3034            #include <pwd.h>
     3035        ], [
     3036            uid_t uid;
     3037            struct passwd pw;
     3038            char buf[512];
     3039            int buflen = 512;
     3040
     3041            (void)getpwnam_r(uid, &pw, buf, buflen);
     3042        ], tcl_cv_api_getpwuid_r_4=yes, tcl_cv_api_getpwuid_r_4=no)])
     3043        tcl_ok=$tcl_cv_api_getpwuid_r_4
     3044        if test "$tcl_ok" = yes; then
     3045            AC_DEFINE(HAVE_GETPWUID_R_4)
    28553046        fi
    2856         PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
    2857         # this assumes it is in a VPATH dir
    2858         i=`basename $i`
    2859         # handle user calling this before or after TEA_SETUP_COMPILER
    2860         if test x"${OBJEXT}" != x ; then
    2861             j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
    2862         else
    2863             j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
     3047    fi
     3048    if test "$tcl_ok" = yes; then
     3049        AC_DEFINE(HAVE_GETPWUID_R)
     3050    fi
     3051])])
     3052
     3053#--------------------------------------------------------------------
     3054# SC_TCL_GETPWNAM_R
     3055#
     3056#       Check if we have MT-safe variant of getpwnam() and if yes,
     3057#       which one exactly.
     3058#
     3059# Arguments:
     3060#       None
     3061#       
     3062# Results:
     3063#
     3064#       Might define the following vars:
     3065#               HAVE_GETPWNAM_R
     3066#               HAVE_GETPWNAM_R_4
     3067#               HAVE_GETPWNAM_R_5
     3068#
     3069#--------------------------------------------------------------------
     3070
     3071AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
     3072    AC_CACHE_CHECK([for getpwnam_r with 5 args], tcl_cv_api_getpwnam_r_5, [
     3073    AC_TRY_COMPILE([
     3074        #include <sys/types.h>
     3075        #include <pwd.h>
     3076    ], [
     3077        char *name;
     3078        struct passwd pw, *pwp;
     3079        char buf[512];
     3080        int buflen = 512;
     3081
     3082        (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
     3083    ], tcl_cv_api_getpwnam_r_5=yes, tcl_cv_api_getpwnam_r_5=no)])
     3084    tcl_ok=$tcl_cv_api_getpwnam_r_5
     3085    if test "$tcl_ok" = yes; then
     3086        AC_DEFINE(HAVE_GETPWNAM_R_5)
     3087    else
     3088        AC_CACHE_CHECK([for getpwnam_r with 4 args], tcl_cv_api_getpwnam_r_4, [
     3089        AC_TRY_COMPILE([
     3090            #include <sys/types.h>
     3091            #include <pwd.h>
     3092        ], [
     3093            char *name;
     3094            struct passwd pw;
     3095            char buf[512];
     3096            int buflen = 512;
     3097
     3098            (void)getpwnam_r(name, &pw, buf, buflen);
     3099        ], tcl_cv_api_getpwnam_r_4=yes, tcl_cv_api_getpwnam_r_4=no)])
     3100        tcl_ok=$tcl_cv_api_getpwnam_r_4
     3101        if test "$tcl_ok" = yes; then
     3102            AC_DEFINE(HAVE_GETPWNAM_R_4)
    28643103        fi
    2865         PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
    2866     done
    2867     AC_SUBST(PKG_STUB_SOURCES)
    2868     AC_SUBST(PKG_STUB_OBJECTS)
    2869 ])
    2870 
    2871 #------------------------------------------------------------------------
    2872 # TEA_ADD_TCL_SOURCES --
    2873 #
    2874 #       Specify one or more Tcl source files.  These should be platform
    2875 #       independent runtime files.
     3104    fi
     3105    if test "$tcl_ok" = yes; then
     3106        AC_DEFINE(HAVE_GETPWNAM_R)
     3107    fi
     3108])])
     3109
     3110#--------------------------------------------------------------------
     3111# SC_TCL_GETGRGID_R
     3112#
     3113#       Check if we have MT-safe variant of getgrgid() and if yes,
     3114#       which one exactly.
    28763115#
    28773116# Arguments:
    2878 #       one or more file names
    2879 #
     3117#       None
     3118#       
    28803119# Results:
    28813120#
    2882 #       Defines and substs the following vars:
    2883 #               PKG_TCL_SOURCES
    2884 #------------------------------------------------------------------------
    2885 AC_DEFUN([TEA_ADD_TCL_SOURCES], [
    2886     vars="$@"
    2887     for i in $vars; do
    2888         # check for existence, be strict because it is installed
    2889         if test ! -f "${srcdir}/$i" ; then
    2890             AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
     3121#       Might define the following vars:
     3122#               HAVE_GETGRGID_R
     3123#               HAVE_GETGRGID_R_4
     3124#               HAVE_GETGRGID_R_5
     3125#
     3126#--------------------------------------------------------------------
     3127
     3128AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
     3129    AC_CACHE_CHECK([for getgrgid_r with 5 args], tcl_cv_api_getgrgid_r_5, [
     3130    AC_TRY_COMPILE([
     3131        #include <sys/types.h>
     3132        #include <grp.h>
     3133    ], [
     3134        gid_t gid;
     3135        struct group gr, *grp;
     3136        char buf[512];
     3137        int buflen = 512;
     3138
     3139        (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
     3140    ], tcl_cv_api_getgrgid_r_5=yes, tcl_cv_api_getgrgid_r_5=no)])
     3141    tcl_ok=$tcl_cv_api_getgrgid_r_5
     3142    if test "$tcl_ok" = yes; then
     3143        AC_DEFINE(HAVE_GETGRGID_R_5)
     3144    else
     3145        AC_CACHE_CHECK([for getgrgid_r with 4 args], tcl_cv_api_getgrgid_r_4, [
     3146        AC_TRY_COMPILE([
     3147            #include <sys/types.h>
     3148            #include <grp.h>
     3149        ], [
     3150            gid_t gid;
     3151            struct group gr;
     3152            char buf[512];
     3153            int buflen = 512;
     3154
     3155            (void)getgrgid_r(gid, &gr, buf, buflen);
     3156        ], tcl_cv_api_getgrgid_r_4=yes, tcl_cv_api_getgrgid_r_4=no)])
     3157        tcl_ok=$tcl_cv_api_getgrgid_r_4
     3158        if test "$tcl_ok" = yes; then
     3159            AC_DEFINE(HAVE_GETGRGID_R_4)
    28913160        fi
    2892         PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
    2893     done
    2894     AC_SUBST(PKG_TCL_SOURCES)
    2895 ])
    2896 
    2897 #------------------------------------------------------------------------
    2898 # TEA_ADD_HEADERS --
    2899 #
    2900 #       Specify one or more source headers.  Users should check for
    2901 #       the right platform before adding to their list.
     3161    fi
     3162    if test "$tcl_ok" = yes; then
     3163        AC_DEFINE(HAVE_GETGRGID_R)
     3164    fi
     3165])])
     3166
     3167#--------------------------------------------------------------------
     3168# SC_TCL_GETGRNAM_R
     3169#
     3170#       Check if we have MT-safe variant of getgrnam() and if yes,
     3171#       which one exactly.
    29023172#
    29033173# Arguments:
    2904 #       one or more file names
    2905 #
     3174#       None
     3175#       
    29063176# Results:
    29073177#
    2908 #       Defines and substs the following vars:
    2909 #               PKG_HEADERS
    2910 #------------------------------------------------------------------------
    2911 AC_DEFUN([TEA_ADD_HEADERS], [
    2912     vars="$@"
    2913     for i in $vars; do
    2914         # check for existence, be strict because it is installed
    2915         if test ! -f "${srcdir}/$i" ; then
    2916             AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
     3178#       Might define the following vars:
     3179#               HAVE_GETGRNAM_R
     3180#               HAVE_GETGRNAM_R_4
     3181#               HAVE_GETGRNAM_R_5
     3182#
     3183#--------------------------------------------------------------------
     3184
     3185AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
     3186    AC_CACHE_CHECK([for getgrnam_r with 5 args], tcl_cv_api_getgrnam_r_5, [
     3187    AC_TRY_COMPILE([
     3188        #include <sys/types.h>
     3189        #include <grp.h>
     3190    ], [
     3191        char *name;
     3192        struct group gr, *grp;
     3193        char buf[512];
     3194        int buflen = 512;
     3195
     3196        (void) getgrnam_r(name, &gr, buf, buflen, &grp);
     3197    ], tcl_cv_api_getgrnam_r_5=yes, tcl_cv_api_getgrnam_r_5=no)])
     3198    tcl_ok=$tcl_cv_api_getgrnam_r_5
     3199    if test "$tcl_ok" = yes; then
     3200        AC_DEFINE(HAVE_GETGRNAM_R_5)
     3201    else
     3202        AC_CACHE_CHECK([for getgrnam_r with 4 args], tcl_cv_api_getgrnam_r_4, [
     3203        AC_TRY_COMPILE([
     3204            #include <sys/types.h>
     3205            #include <grp.h>
     3206        ], [
     3207            char *name;
     3208            struct group gr;
     3209            char buf[512];
     3210            int buflen = 512;
     3211
     3212            (void)getgrnam_r(name, &gr, buf, buflen);
     3213        ], tcl_cv_api_getgrnam_r_4=yes, tcl_cv_api_getgrnam_r_4=no)])
     3214        tcl_ok=$tcl_cv_api_getgrnam_r_4
     3215        if test "$tcl_ok" = yes; then
     3216            AC_DEFINE(HAVE_GETGRNAM_R_4)
    29173217        fi
    2918         PKG_HEADERS="$PKG_HEADERS $i"
    2919     done
    2920     AC_SUBST(PKG_HEADERS)
    2921 ])
    2922 
    2923 #------------------------------------------------------------------------
    2924 # TEA_ADD_INCLUDES --
    2925 #
    2926 #       Specify one or more include dirs.  Users should check for
    2927 #       the right platform before adding to their list.
    2928 #
    2929 # Arguments:
    2930 #       one or more file names
    2931 #
    2932 # Results:
    2933 #
    2934 #       Defines and substs the following vars:
    2935 #               PKG_INCLUDES
    2936 #------------------------------------------------------------------------
    2937 AC_DEFUN([TEA_ADD_INCLUDES], [
    2938     vars="$@"
    2939     for i in $vars; do
    2940         PKG_INCLUDES="$PKG_INCLUDES $i"
    2941     done
    2942     AC_SUBST(PKG_INCLUDES)
    2943 ])
    2944 
    2945 #------------------------------------------------------------------------
    2946 # TEA_ADD_LIBS --
    2947 #
    2948 #       Specify one or more libraries.  Users should check for
    2949 #       the right platform before adding to their list.  For Windows,
    2950 #       libraries provided in "foo.lib" format will be converted to
    2951 #       "-lfoo" when using GCC (mingw).
    2952 #
    2953 # Arguments:
    2954 #       one or more file names
    2955 #
    2956 # Results:
    2957 #
    2958 #       Defines and substs the following vars:
    2959 #               PKG_LIBS
    2960 #------------------------------------------------------------------------
    2961 AC_DEFUN([TEA_ADD_LIBS], [
    2962     vars="$@"
    2963     for i in $vars; do
    2964         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
    2965             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
    2966             i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
    2967         fi
    2968         PKG_LIBS="$PKG_LIBS $i"
    2969     done
    2970     AC_SUBST(PKG_LIBS)
    2971 ])
    2972 
    2973 #------------------------------------------------------------------------
    2974 # TEA_ADD_CFLAGS --
    2975 #
    2976 #       Specify one or more CFLAGS.  Users should check for
    2977 #       the right platform before adding to their list.
    2978 #
    2979 # Arguments:
    2980 #       one or more file names
    2981 #
    2982 # Results:
    2983 #
    2984 #       Defines and substs the following vars:
    2985 #               PKG_CFLAGS
    2986 #------------------------------------------------------------------------
    2987 AC_DEFUN([TEA_ADD_CFLAGS], [
    2988     PKG_CFLAGS="$PKG_CFLAGS $@"
    2989     AC_SUBST(PKG_CFLAGS)
    2990 ])
    2991 
    2992 #------------------------------------------------------------------------
    2993 # TEA_PREFIX --
    2994 #
    2995 #       Handle the --prefix=... option by defaulting to what Tcl gave
    2996 #
    2997 # Arguments:
    2998 #       none
    2999 #
    3000 # Results:
    3001 #
    3002 #       If --prefix or --exec-prefix was not specified, $prefix and
    3003 #       $exec_prefix will be set to the values given to Tcl when it was
    3004 #       configured.
    3005 #------------------------------------------------------------------------
    3006 AC_DEFUN([TEA_PREFIX], [
    3007     if test "${prefix}" = "NONE"; then
    3008         prefix_default=yes
    3009         if test x"${TCL_PREFIX}" != x; then
    3010             AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
    3011             prefix=${TCL_PREFIX}
    3012         else
    3013             AC_MSG_NOTICE([--prefix defaulting to /usr/local])
    3014             prefix=/usr/local
    3015         fi
    3016     fi
    3017     if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
    3018         -o x"${exec_prefix_default}" = x"yes" ; then
    3019         if test x"${TCL_EXEC_PREFIX}" != x; then
    3020             AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
    3021             exec_prefix=${TCL_EXEC_PREFIX}
    3022         else
    3023             AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
    3024             exec_prefix=$prefix
    3025         fi
    3026     fi
    3027 ])
    3028 
    3029 #------------------------------------------------------------------------
    3030 # TEA_SETUP_COMPILER_CC --
    3031 #
    3032 #       Do compiler checks the way we want.  This is just a replacement
    3033 #       for AC_PROG_CC in TEA configure.in files to make them cleaner.
    3034 #
    3035 # Arguments:
    3036 #       none
    3037 #
    3038 # Results:
    3039 #
    3040 #       Sets up CC var and other standard bits we need to make executables.
    3041 #------------------------------------------------------------------------
    3042 AC_DEFUN([TEA_SETUP_COMPILER_CC], [
    3043     # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
    3044     # in this macro, they need to go into TEA_SETUP_COMPILER instead.
    3045 
    3046     # If the user did not set CFLAGS, set it now to keep
    3047     # the AC_PROG_CC macro from adding "-g -O2".
    3048     if test "${CFLAGS+set}" != "set" ; then
    3049         CFLAGS=""
    3050     fi
    3051 
    3052     AC_PROG_CC
    3053     AC_PROG_CPP
    3054 
    3055     AC_PROG_INSTALL
    3056 
    3057     #--------------------------------------------------------------------
    3058     # Checks to see if the make program sets the $MAKE variable.
    3059     #--------------------------------------------------------------------
    3060 
    3061     AC_PROG_MAKE_SET
    3062 
    3063     #--------------------------------------------------------------------
    3064     # Find ranlib
    3065     #--------------------------------------------------------------------
    3066 
    3067     AC_PROG_RANLIB
    3068 
    3069     #--------------------------------------------------------------------
    3070     # Determines the correct binary file extension (.o, .obj, .exe etc.)
    3071     #--------------------------------------------------------------------
    3072 
    3073     AC_OBJEXT
    3074     AC_EXEEXT
    3075 ])
    3076 
    3077 #------------------------------------------------------------------------
    3078 # TEA_SETUP_COMPILER --
    3079 #
    3080 #       Do compiler checks that use the compiler.  This must go after
    3081 #       TEA_SETUP_COMPILER_CC, which does the actual compiler check.
    3082 #
    3083 # Arguments:
    3084 #       none
    3085 #
    3086 # Results:
    3087 #
    3088 #       Sets up CC var and other standard bits we need to make executables.
    3089 #------------------------------------------------------------------------
    3090 AC_DEFUN([TEA_SETUP_COMPILER], [
    3091     # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
    3092     AC_REQUIRE([TEA_SETUP_COMPILER_CC])
    3093 
    3094     #------------------------------------------------------------------------
    3095     # If we're using GCC, see if the compiler understands -pipe. If so, use it.
    3096     # It makes compiling go faster.  (This is only a performance feature.)
    3097     #------------------------------------------------------------------------
    3098 
    3099     if test -z "$no_pipe" -a -n "$GCC"; then
    3100         AC_MSG_CHECKING([if the compiler understands -pipe])
    3101         OLDCC="$CC"
    3102         CC="$CC -pipe"
    3103         AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
    3104             AC_MSG_RESULT([no]))
    3105     fi
    3106 
    3107     #--------------------------------------------------------------------
    3108     # Common compiler flag setup
    3109     #--------------------------------------------------------------------
    3110 
    3111     AC_C_BIGENDIAN
    3112     if test "${TEA_PLATFORM}" = "unix" ; then
    3113         TEA_TCL_LINK_LIBS
    3114         TEA_MISSING_POSIX_HEADERS
    3115         # Let the user call this, because if it triggers, they will
    3116         # need a compat/strtod.c that is correct.  Users can also
    3117         # use Tcl_GetDouble(FromObj) instead.
    3118         #TEA_BUGGY_STRTOD
    3119     fi
    3120 ])
    3121 
    3122 #------------------------------------------------------------------------
    3123 # TEA_MAKE_LIB --
    3124 #
    3125 #       Generate a line that can be used to build a shared/unshared library
    3126 #       in a platform independent manner.
    3127 #
    3128 # Arguments:
    3129 #       none
    3130 #
    3131 #       Requires:
    3132 #
    3133 # Results:
    3134 #
    3135 #       Defines the following vars:
    3136 #       CFLAGS -        Done late here to note disturb other AC macros
    3137 #       MAKE_LIB -      Command to execute to build the Tcl library;
    3138 #                       differs depending on whether or not Tcl is being
    3139 #                       compiled as a shared library.
    3140 #       MAKE_SHARED_LIB Makefile rule for building a shared library
    3141 #       MAKE_STATIC_LIB Makefile rule for building a static library
    3142 #       MAKE_STUB_LIB   Makefile rule for building a stub library
    3143 #------------------------------------------------------------------------
    3144 
    3145 AC_DEFUN([TEA_MAKE_LIB], [
    3146     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
    3147         MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
    3148         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
    3149         MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
    3150     else
    3151         MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
    3152         MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
    3153         MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
    3154     fi
    3155 
    3156     if test "${SHARED_BUILD}" = "1" ; then
    3157         MAKE_LIB="${MAKE_SHARED_LIB} "
    3158     else
    3159         MAKE_LIB="${MAKE_STATIC_LIB} "
    3160     fi
    3161 
    3162     #--------------------------------------------------------------------
    3163     # Shared libraries and static libraries have different names.
    3164     # Use the double eval to make sure any variables in the suffix is
    3165     # substituted. (@@@ Might not be necessary anymore)
    3166     #--------------------------------------------------------------------
    3167 
    3168     if test "${TEA_PLATFORM}" = "windows" ; then
    3169         if test "${SHARED_BUILD}" = "1" ; then
    3170             # We force the unresolved linking of symbols that are really in
    3171             # the private libraries of Tcl and Tk.
    3172             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
    3173             if test x"${TK_BIN_DIR}" != x ; then
    3174                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
    3175             fi
    3176             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
    3177         else
    3178             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    3179         fi
    3180         # Some packages build their own stubs libraries
    3181         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
    3182         if test "$GCC" = "yes"; then
    3183             PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
    3184         fi
    3185         # These aren't needed on Windows (either MSVC or gcc)
    3186         RANLIB="mt -manifest ${PKG_LIB_FILE}.manifest -outputresource:${PKG_LIB_FILE}\;2 ; test -f"
    3187         RANLIB_STUB=:
    3188     else
    3189         RANLIB_STUB="${RANLIB}"
    3190         if test "${SHARED_BUILD}" = "1" ; then
    3191             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
    3192             if test x"${TK_BIN_DIR}" != x ; then
    3193                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
    3194             fi
    3195             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
    3196             RANLIB=:
    3197         else
    3198             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    3199         fi
    3200         # Some packages build their own stubs libraries
    3201         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
    3202     fi
    3203 
    3204     # These are escaped so that only CFLAGS is picked up at configure time.
    3205     # The other values will be substituted at make time.
    3206     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
    3207     if test "${SHARED_BUILD}" = "1" ; then
    3208         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
    3209     fi
    3210 
    3211     AC_SUBST(MAKE_LIB)
    3212     AC_SUBST(MAKE_SHARED_LIB)
    3213     AC_SUBST(MAKE_STATIC_LIB)
    3214     AC_SUBST(MAKE_STUB_LIB)
    3215     AC_SUBST(RANLIB_STUB)
    3216     AC_SUBST(RANLIB)
    3217 ])
    3218 
    3219 #------------------------------------------------------------------------
    3220 # TEA_LIB_SPEC --
    3221 #
    3222 #       Compute the name of an existing object library located in libdir
    3223 #       from the given base name and produce the appropriate linker flags.
    3224 #
    3225 # Arguments:
    3226 #       basename        The base name of the library without version
    3227 #                       numbers, extensions, or "lib" prefixes.
    3228 #       extra_dir       Extra directory in which to search for the
    3229 #                       library.  This location is used first, then
    3230 #                       $prefix/$exec-prefix, then some defaults.
    3231 #
    3232 # Requires:
    3233 #       TEA_INIT and TEA_PREFIX must be called first.
    3234 #
    3235 # Results:
    3236 #
    3237 #       Defines the following vars:
    3238 #               ${basename}_LIB_NAME    The computed library name.
    3239 #               ${basename}_LIB_SPEC    The computed linker flags.
    3240 #------------------------------------------------------------------------
    3241 
    3242 AC_DEFUN([TEA_LIB_SPEC], [
    3243     AC_MSG_CHECKING([for $1 library])
    3244 
    3245     # Look in exec-prefix for the library (defined by TEA_PREFIX).
    3246 
    3247     tea_lib_name_dir="${exec_prefix}/lib"
    3248 
    3249     # Or in a user-specified location.
    3250 
    3251     if test x"$2" != x ; then
    3252         tea_extra_lib_dir=$2
    3253     else
    3254         tea_extra_lib_dir=NONE
    3255     fi
    3256 
    3257     for i in \
    3258             `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
    3259             `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
    3260             `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
    3261             `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
    3262             `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
    3263             `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
    3264             `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
    3265             `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
    3266         if test -f "$i" ; then
    3267             tea_lib_name_dir=`dirname $i`
    3268             $1_LIB_NAME=`basename $i`
    3269             $1_LIB_PATH_NAME=$i
    3270             break
    3271         fi
    3272     done
    3273 
    3274     if test "${TEA_PLATFORM}" = "windows"; then
    3275         $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
    3276     else
    3277         # Strip off the leading "lib" and trailing ".a" or ".so"
    3278 
    3279         tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
    3280         $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
    3281     fi
    3282 
    3283     if test "x${$1_LIB_NAME}" = x ; then
    3284         AC_MSG_ERROR([not found])
    3285     else
    3286         AC_MSG_RESULT([${$1_LIB_SPEC}])
    3287     fi
    3288 ])
    3289 
    3290 #------------------------------------------------------------------------
    3291 # TEA_PRIVATE_TCL_HEADERS --
    3292 #
    3293 #       Locate the private Tcl include files
    3294 #
    3295 # Arguments:
    3296 #
    3297 #       Requires:
    3298 #               TCL_SRC_DIR     Assumes that TEA_LOAD_TCLCONFIG has
    3299 #                                already been called.
    3300 #
    3301 # Results:
    3302 #
    3303 #       Substs the following vars:
    3304 #               TCL_TOP_DIR_NATIVE
    3305 #               TCL_GENERIC_DIR_NATIVE
    3306 #               TCL_UNIX_DIR_NATIVE
    3307 #               TCL_WIN_DIR_NATIVE
    3308 #               TCL_BMAP_DIR_NATIVE
    3309 #               TCL_TOOL_DIR_NATIVE
    3310 #               TCL_PLATFORM_DIR_NATIVE
    3311 #               TCL_BIN_DIR_NATIVE
    3312 #               TCL_INCLUDES
    3313 #------------------------------------------------------------------------
    3314 
    3315 AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
    3316     AC_MSG_CHECKING([for Tcl private include files])
    3317 
    3318     TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
    3319     TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
    3320     TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
    3321     TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
    3322     TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
    3323     TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
    3324     TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
    3325     TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
    3326 
    3327     if test "${TEA_PLATFORM}" = "windows"; then
    3328         TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
    3329     else
    3330         TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
    3331     fi
    3332     # We want to ensure these are substituted so as not to require
    3333     # any *_NATIVE vars be defined in the Makefile
    3334     TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
    3335     if test "`uname -s`" = "Darwin"; then
    3336         # If Tcl was built as a framework, attempt to use
    3337         # the framework's Headers and PrivateHeaders directories
    3338         case ${TCL_DEFS} in
    3339             *TCL_FRAMEWORK*)
    3340                 if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
    3341                 TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
    3342                 TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
    3343                 ;;
    3344         esac
    3345     fi
    3346 
    3347     AC_SUBST(TCL_TOP_DIR_NATIVE)
    3348     AC_SUBST(TCL_GENERIC_DIR_NATIVE)
    3349     AC_SUBST(TCL_UNIX_DIR_NATIVE)
    3350     AC_SUBST(TCL_WIN_DIR_NATIVE)
    3351     AC_SUBST(TCL_BMAP_DIR_NATIVE)
    3352     AC_SUBST(TCL_TOOL_DIR_NATIVE)
    3353     AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
    3354 
    3355     AC_SUBST(TCL_INCLUDES)
    3356     AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
    3357 ])
    3358 
    3359 #------------------------------------------------------------------------
    3360 # TEA_PUBLIC_TCL_HEADERS --
    3361 #
    3362 #       Locate the installed public Tcl header files
    3363 #
    3364 # Arguments:
    3365 #       None.
    3366 #
    3367 # Requires:
    3368 #       CYGPATH must be set
    3369 #
    3370 # Results:
    3371 #
    3372 #       Adds a --with-tclinclude switch to configure.
    3373 #       Result is cached.
    3374 #
    3375 #       Substs the following vars:
    3376 #               TCL_INCLUDES
    3377 #------------------------------------------------------------------------
    3378 
    3379 AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
    3380     AC_MSG_CHECKING([for Tcl public headers])
    3381 
    3382     AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files], with_tclinclude=${withval})
    3383 
    3384     AC_CACHE_VAL(ac_cv_c_tclh, [
    3385         # Use the value from --with-tclinclude, if it was given
    3386 
    3387         if test x"${with_tclinclude}" != x ; then
    3388             if test -f "${with_tclinclude}/tcl.h" ; then
    3389                 ac_cv_c_tclh=${with_tclinclude}
    3390             else
    3391                 AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
    3392             fi
    3393         else
    3394             if test "`uname -s`" = "Darwin"; then
    3395                 # If Tcl was built as a framework, attempt to use
    3396                 # the framework's Headers directory
    3397                 case ${TCL_DEFS} in
    3398                     *TCL_FRAMEWORK*)
    3399                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
    3400                         ;;
    3401                 esac
    3402             fi
    3403 
    3404             # Look in the source dir only if Tcl is not installed,
    3405             # and in that situation, look there before installed locations.
    3406             if test -f "${TCL_BIN_DIR}/Makefile" ; then
    3407                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
    3408             fi
    3409 
    3410             # Check order: pkg --prefix location, Tcl's --prefix location,
    3411             # relative to directory of tclConfig.sh.
    3412 
    3413             eval "temp_includedir=${includedir}"
    3414             list="$list \
    3415                 `ls -d ${temp_includedir}        2>/dev/null` \
    3416                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
    3417                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
    3418             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
    3419                 list="$list /usr/local/include /usr/include"
    3420                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
    3421                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
    3422                     list="$list `ls -d ${d} 2>/dev/null`"
    3423                 fi
    3424             fi
    3425             for i in $list ; do
    3426                 if test -f "$i/tcl.h" ; then
    3427                     ac_cv_c_tclh=$i
    3428                     break
    3429                 fi
    3430             done
    3431         fi
    3432     ])
    3433 
    3434     # Print a message based on how we determined the include path
    3435 
    3436     if test x"${ac_cv_c_tclh}" = x ; then
    3437         AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
    3438     else
    3439         AC_MSG_RESULT([${ac_cv_c_tclh}])
    3440     fi
    3441 
    3442     # Convert to a native path and substitute into the output files.
    3443 
    3444     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
    3445 
    3446     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3447 
    3448     AC_SUBST(TCL_INCLUDES)
    3449 ])
    3450 
    3451 #------------------------------------------------------------------------
    3452 # TEA_PRIVATE_TK_HEADERS --
    3453 #
    3454 #       Locate the private Tk include files
    3455 #
    3456 # Arguments:
    3457 #
    3458 #       Requires:
    3459 #               TK_SRC_DIR      Assumes that TEA_LOAD_TKCONFIG has
    3460 #                                already been called.
    3461 #
    3462 # Results:
    3463 #
    3464 #       Substs the following vars:
    3465 #               TK_INCLUDES
    3466 #------------------------------------------------------------------------
    3467 
    3468 AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
    3469     AC_MSG_CHECKING([for Tk private include files])
    3470 
    3471     TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
    3472     TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
    3473     TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
    3474     TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
    3475     TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
    3476     TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
    3477     if test "${TEA_PLATFORM}" = "windows"; then
    3478         TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
    3479     else
    3480         TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
    3481     fi
    3482     # We want to ensure these are substituted so as not to require
    3483     # any *_NATIVE vars be defined in the Makefile
    3484     TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
    3485     if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
    3486         -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3487         TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
    3488     fi
    3489     if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3490         TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx"
    3491     fi
    3492     if test "`uname -s`" = "Darwin"; then
    3493         # If Tk was built as a framework, attempt to use
    3494         # the framework's Headers and PrivateHeaders directories
    3495         case ${TK_DEFS} in
    3496             *TK_FRAMEWORK*)
    3497                 if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then
    3498                 TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
    3499                 ;;
    3500         esac
    3501     fi
    3502 
    3503     AC_SUBST(TK_TOP_DIR_NATIVE)
    3504     AC_SUBST(TK_UNIX_DIR_NATIVE)
    3505     AC_SUBST(TK_WIN_DIR_NATIVE)
    3506     AC_SUBST(TK_GENERIC_DIR_NATIVE)
    3507     AC_SUBST(TK_XLIB_DIR_NATIVE)
    3508     AC_SUBST(TK_PLATFORM_DIR_NATIVE)
    3509 
    3510     AC_SUBST(TK_INCLUDES)
    3511     AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
    3512 ])
    3513 
    3514 #------------------------------------------------------------------------
    3515 # TEA_PUBLIC_TK_HEADERS --
    3516 #
    3517 #       Locate the installed public Tk header files
    3518 #
    3519 # Arguments:
    3520 #       None.
    3521 #
    3522 # Requires:
    3523 #       CYGPATH must be set
    3524 #
    3525 # Results:
    3526 #
    3527 #       Adds a --with-tkinclude switch to configure.
    3528 #       Result is cached.
    3529 #
    3530 #       Substs the following vars:
    3531 #               TK_INCLUDES
    3532 #------------------------------------------------------------------------
    3533 
    3534 AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
    3535     AC_MSG_CHECKING([for Tk public headers])
    3536 
    3537     AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
    3538 
    3539     AC_CACHE_VAL(ac_cv_c_tkh, [
    3540         # Use the value from --with-tkinclude, if it was given
    3541 
    3542         if test x"${with_tkinclude}" != x ; then
    3543             if test -f "${with_tkinclude}/tk.h" ; then
    3544                 ac_cv_c_tkh=${with_tkinclude}
    3545             else
    3546                 AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
    3547             fi
    3548         else
    3549             if test "`uname -s`" = "Darwin"; then
    3550                 # If Tk was built as a framework, attempt to use
    3551                 # the framework's Headers directory.
    3552                 case ${TK_DEFS} in
    3553                     *TK_FRAMEWORK*)
    3554                         list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
    3555                         ;;
    3556                 esac
    3557             fi
    3558 
    3559             # Look in the source dir only if Tk is not installed,
    3560             # and in that situation, look there before installed locations.
    3561             if test -f "${TK_BIN_DIR}/Makefile" ; then
    3562                 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
    3563             fi
    3564 
    3565             # Check order: pkg --prefix location, Tk's --prefix location,
    3566             # relative to directory of tkConfig.sh, Tcl's --prefix location,
    3567             # relative to directory of tclConfig.sh.
    3568 
    3569             eval "temp_includedir=${includedir}"
    3570             list="$list \
    3571                 `ls -d ${temp_includedir}        2>/dev/null` \
    3572                 `ls -d ${TK_PREFIX}/include      2>/dev/null` \
    3573                 `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
    3574                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
    3575                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
    3576             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
    3577                 list="$list /usr/local/include /usr/include"
    3578             fi
    3579             for i in $list ; do
    3580                 if test -f "$i/tk.h" ; then
    3581                     ac_cv_c_tkh=$i
    3582                     break
    3583                 fi
    3584             done
    3585         fi
    3586     ])
    3587 
    3588     # Print a message based on how we determined the include path
    3589 
    3590     if test x"${ac_cv_c_tkh}" = x ; then
    3591         AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
    3592     else
    3593         AC_MSG_RESULT([${ac_cv_c_tkh}])
    3594     fi
    3595 
    3596     # Convert to a native path and substitute into the output files.
    3597 
    3598     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
    3599 
    3600     TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3601 
    3602     AC_SUBST(TK_INCLUDES)
    3603 
    3604     if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
    3605         -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3606         # On Windows and Aqua, we need the X compat headers
    3607         AC_MSG_CHECKING([for X11 header files])
    3608         if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
    3609             INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
    3610             TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3611             AC_SUBST(TK_XINCLUDES)
    3612         fi
    3613         AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
    3614     fi
    3615 ])
    3616 
    3617 #------------------------------------------------------------------------
    3618 # TEA_PROG_TCLSH
    3619 #       Determine the fully qualified path name of the tclsh executable
    3620 #       in the Tcl build directory or the tclsh installed in a bin
    3621 #       directory. This macro will correctly determine the name
    3622 #       of the tclsh executable even if tclsh has not yet been
    3623 #       built in the build directory. The tclsh found is always
    3624 #       associated with a tclConfig.sh file. This tclsh should be used
    3625 #       only for running extension test cases. It should never be
    3626 #       or generation of files (like pkgIndex.tcl) at build time.
    3627 #
    3628 # Arguments
    3629 #       none
    3630 #
    3631 # Results
    3632 #       Subst's the following values:
    3633 #               TCLSH_PROG
    3634 #------------------------------------------------------------------------
    3635 
    3636 AC_DEFUN([TEA_PROG_TCLSH], [
    3637     AC_MSG_CHECKING([for tclsh])
    3638     if test -f "${TCL_BIN_DIR}/Makefile" ; then
    3639         # tclConfig.sh is in Tcl build directory
    3640         if test "${TEA_PLATFORM}" = "windows"; then
    3641             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
    3642         else
    3643             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
    3644         fi
    3645     else
    3646         # tclConfig.sh is in install location
    3647         if test "${TEA_PLATFORM}" = "windows"; then
    3648             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
    3649         else
    3650             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
    3651         fi
    3652         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
    3653               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
    3654               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
    3655         for i in $list ; do
    3656             if test -f "$i/${TCLSH_PROG}" ; then
    3657                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
    3658                 break
    3659             fi
    3660         done
    3661         TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
    3662     fi
    3663     AC_MSG_RESULT([${TCLSH_PROG}])
    3664     AC_SUBST(TCLSH_PROG)
    3665 ])
    3666 
    3667 #------------------------------------------------------------------------
    3668 # TEA_PROG_WISH
    3669 #       Determine the fully qualified path name of the wish executable
    3670 #       in the Tk build directory or the wish installed in a bin
    3671 #       directory. This macro will correctly determine the name
    3672 #       of the wish executable even if wish has not yet been
    3673 #       built in the build directory. The wish found is always
    3674 #       associated with a tkConfig.sh file. This wish should be used
    3675 #       only for running extension test cases. It should never be
    3676 #       or generation of files (like pkgIndex.tcl) at build time.
    3677 #
    3678 # Arguments
    3679 #       none
    3680 #
    3681 # Results
    3682 #       Subst's the following values:
    3683 #               WISH_PROG
    3684 #------------------------------------------------------------------------
    3685 
    3686 AC_DEFUN([TEA_PROG_WISH], [
    3687     AC_MSG_CHECKING([for wish])
    3688     if test -f "${TK_BIN_DIR}/Makefile" ; then
    3689         # tkConfig.sh is in Tk build directory
    3690         if test "${TEA_PLATFORM}" = "windows"; then
    3691             WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
    3692         else
    3693             WISH_PROG="${TK_BIN_DIR}/wish"
    3694         fi
    3695     else
    3696         # tkConfig.sh is in install location
    3697         if test "${TEA_PLATFORM}" = "windows"; then
    3698             WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
    3699         else
    3700             WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
    3701         fi
    3702         list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
    3703               `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
    3704               `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
    3705         for i in $list ; do
    3706             if test -f "$i/${WISH_PROG}" ; then
    3707                 REAL_TK_BIN_DIR="`cd "$i"; pwd`"
    3708                 break
    3709             fi
    3710         done
    3711         WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}"
    3712     fi
    3713     AC_MSG_RESULT([${WISH_PROG}])
    3714     AC_SUBST(WISH_PROG)
    3715 ])
    3716 
    3717 #------------------------------------------------------------------------
    3718 # TEA_PATH_CONFIG --
    3719 #
    3720 #       Locate the ${1}Config.sh file and perform a sanity check on
    3721 #       the ${1} compile flags.  These are used by packages like
    3722 #       [incr Tk] that load *Config.sh files from more than Tcl and Tk.
    3723 #
    3724 # Arguments:
    3725 #       none
    3726 #
    3727 # Results:
    3728 #
    3729 #       Adds the following arguments to configure:
    3730 #               --with-$1=...
    3731 #
    3732 #       Defines the following vars:
    3733 #               $1_BIN_DIR      Full path to the directory containing
    3734 #                               the $1Config.sh file
    3735 #------------------------------------------------------------------------
    3736 
    3737 AC_DEFUN([TEA_PATH_CONFIG], [
    3738     #
    3739     # Ok, lets find the $1 configuration
    3740     # First, look for one uninstalled.
    3741     # the alternative search directory is invoked by --with-$1
    3742     #
    3743 
    3744     if test x"${no_$1}" = x ; then
    3745         # we reset no_$1 in case something fails here
    3746         no_$1=true
    3747         AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
    3748         AC_MSG_CHECKING([for $1 configuration])
    3749         AC_CACHE_VAL(ac_cv_c_$1config,[
    3750 
    3751             # First check to see if --with-$1 was specified.
    3752             if test x"${with_$1config}" != x ; then
    3753                 case ${with_$1config} in
    3754                     */$1Config.sh )
    3755                         if test -f ${with_$1config}; then
    3756                             AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
    3757                             with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
    3758                         fi;;
    3759                 esac
    3760                 if test -f "${with_$1config}/$1Config.sh" ; then
    3761                     ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
    3762                 else
    3763                     AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
    3764                 fi
    3765             fi
    3766 
    3767             # then check for a private $1 installation
    3768             if test x"${ac_cv_c_$1config}" = x ; then
    3769                 for i in \
    3770                         ../$1 \
    3771                         `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3772                         `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3773                         `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3774                         `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3775                         ../../$1 \
    3776                         `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3777                         `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3778                         `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3779                         `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3780                         ../../../$1 \
    3781                         `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3782                         `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3783                         `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3784                         `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3785                         ${srcdir}/../$1 \
    3786                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3787                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3788                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3789                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3790                         ; do
    3791                     if test -f "$i/$1Config.sh" ; then
    3792                         ac_cv_c_$1config=`(cd $i; pwd)`
    3793                         break
    3794                     fi
    3795                     if test -f "$i/unix/$1Config.sh" ; then
    3796                         ac_cv_c_$1config=`(cd $i/unix; pwd)`
    3797                         break
    3798                     fi
    3799                 done
    3800             fi
    3801 
    3802             # check in a few common install locations
    3803             if test x"${ac_cv_c_$1config}" = x ; then
    3804                 for i in `ls -d ${libdir} 2>/dev/null` \
    3805                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
    3806                         `ls -d ${prefix}/lib 2>/dev/null` \
    3807                         `ls -d /usr/local/lib 2>/dev/null` \
    3808                         `ls -d /usr/contrib/lib 2>/dev/null` \
    3809                         `ls -d /usr/lib 2>/dev/null` \
    3810                         ; do
    3811                     if test -f "$i/$1Config.sh" ; then
    3812                         ac_cv_c_$1config=`(cd $i; pwd)`
    3813                         break
    3814                     fi
    3815                 done
    3816             fi
    3817         ])
    3818 
    3819         if test x"${ac_cv_c_$1config}" = x ; then
    3820             $1_BIN_DIR="# no $1 configs found"
    3821             AC_MSG_WARN([Cannot find $1 configuration definitions])
    3822             exit 0
    3823         else
    3824             no_$1=
    3825             $1_BIN_DIR=${ac_cv_c_$1config}
    3826             AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
    3827         fi
    3828     fi
    3829 ])
    3830 
    3831 #------------------------------------------------------------------------
    3832 # TEA_LOAD_CONFIG --
    3833 #
    3834 #       Load the $1Config.sh file
    3835 #
    3836 # Arguments:
    3837 #       
    3838 #       Requires the following vars to be set:
    3839 #               $1_BIN_DIR
    3840 #
    3841 # Results:
    3842 #
    3843 #       Subst the following vars:
    3844 #               $1_SRC_DIR
    3845 #               $1_LIB_FILE
    3846 #               $1_LIB_SPEC
    3847 #
    3848 #------------------------------------------------------------------------
    3849 
    3850 AC_DEFUN([TEA_LOAD_CONFIG], [
    3851     AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
    3852 
    3853     if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
    3854         AC_MSG_RESULT([loading])
    3855         . ${$1_BIN_DIR}/$1Config.sh
    3856     else
    3857         AC_MSG_RESULT([file not found])
    3858     fi
    3859 
    3860     #
    3861     # If the $1_BIN_DIR is the build directory (not the install directory),
    3862     # then set the common variable name to the value of the build variables.
    3863     # For example, the variable $1_LIB_SPEC will be set to the value
    3864     # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
    3865     # instead of $1_BUILD_LIB_SPEC since it will work with both an
    3866     # installed and uninstalled version of Tcl.
    3867     #
    3868 
    3869     if test -f ${$1_BIN_DIR}/Makefile ; then
    3870         AC_MSG_WARN([Found Makefile - using build library specs for $1])
    3871         $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
    3872         $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
    3873         $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
    3874     fi
    3875 
    3876     AC_SUBST($1_VERSION)
    3877     AC_SUBST($1_BIN_DIR)
    3878     AC_SUBST($1_SRC_DIR)
    3879 
    3880     AC_SUBST($1_LIB_FILE)
    3881     AC_SUBST($1_LIB_SPEC)
    3882 
    3883     AC_SUBST($1_STUB_LIB_FILE)
    3884     AC_SUBST($1_STUB_LIB_SPEC)
    3885     AC_SUBST($1_STUB_LIB_PATH)
    3886 ])
    3887 
    3888 #------------------------------------------------------------------------
    3889 # TEA_PATH_CELIB --
    3890 #
    3891 #       Locate Keuchel's celib emulation layer for targeting Win/CE
    3892 #
    3893 # Arguments:
    3894 #       none
    3895 #
    3896 # Results:
    3897 #
    3898 #       Adds the following arguments to configure:
    3899 #               --with-celib=...
    3900 #
    3901 #       Defines the following vars:
    3902 #               CELIB_DIR       Full path to the directory containing
    3903 #                               the include and platform lib files
    3904 #------------------------------------------------------------------------
    3905 
    3906 AC_DEFUN([TEA_PATH_CELIB], [
    3907     # First, look for one uninstalled.
    3908     # the alternative search directory is invoked by --with-celib
    3909 
    3910     if test x"${no_celib}" = x ; then
    3911         # we reset no_celib in case something fails here
    3912         no_celib=true
    3913         AC_ARG_WITH(celib,[  --with-celib=DIR        use Windows/CE support library from DIR], with_celibconfig=${withval})
    3914         AC_MSG_CHECKING([for Windows/CE celib directory])
    3915         AC_CACHE_VAL(ac_cv_c_celibconfig,[
    3916             # First check to see if --with-celibconfig was specified.
    3917             if test x"${with_celibconfig}" != x ; then
    3918                 if test -d "${with_celibconfig}/inc" ; then
    3919                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
    3920                 else
    3921                     AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
    3922                 fi
    3923             fi
    3924 
    3925             # then check for a celib library
    3926             if test x"${ac_cv_c_celibconfig}" = x ; then
    3927                 for i in \
    3928                         ../celib-palm-3.0 \
    3929                         ../celib \
    3930                         ../../celib-palm-3.0 \
    3931                         ../../celib \
    3932                         `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
    3933                         ${srcdir}/../celib-palm-3.0 \
    3934                         ${srcdir}/../celib \
    3935                         `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
    3936                         ; do
    3937                     if test -d "$i/inc" ; then
    3938                         ac_cv_c_celibconfig=`(cd $i; pwd)`
    3939                         break
    3940                     fi
    3941                 done
    3942             fi
    3943         ])
    3944         if test x"${ac_cv_c_celibconfig}" = x ; then
    3945             AC_MSG_ERROR([Cannot find celib support library directory])
    3946         else
    3947             no_celib=
    3948             CELIB_DIR=${ac_cv_c_celibconfig}
    3949             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
    3950             AC_MSG_RESULT([found $CELIB_DIR])
    3951         fi
    3952     fi
    3953 ])
    3954 
    3955 
    3956 # Local Variables:
    3957 # mode: autoconf
    3958 # End:
     3218    fi
     3219    if test "$tcl_ok" = yes; then
     3220        AC_DEFINE(HAVE_GETGRNAM_R)
     3221    fi
     3222])])
     3223
     3224#--------------------------------------------------------------------
     3225# SC_CONFIG_COMMANDS_PRE(CMDS)
     3226#
     3227#       Replacement for autoconf 2.5x AC_COMMANDS_PRE:
     3228#               Commands to run right before config.status is
     3229#               created. Accumulates.
     3230#
     3231#       Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
     3232#       of configure.in (right before AC_OUTPUT).
     3233#
     3234#--------------------------------------------------------------------
     3235
     3236AC_DEFUN([SC_CONFIG_COMMANDS_PRE], [
     3237    define([SC_OUTPUT_COMMANDS_PRE], defn([SC_OUTPUT_COMMANDS_PRE])[$1
     3238])])
     3239AC_DEFUN([SC_OUTPUT_COMMANDS_PRE])
     3240
  • trunk/lang/matlab/Makefile.in

    r951 r1018  
    88mandir          = @mandir@
    99prefix          = @prefix@
     10srcdir          = @srcdir@
     11
     12destdir         = $(libdir)/matlab
    1013
    1114INSTALL         = @INSTALL@
    12 INSTALL_PROGRAM = ${INSTALL} -m 755
    13 INSTALL_DATA    = ${INSTALL} -m 644
    14 INSTALL_SCRIPT  = ${INSTALL}
     15VPATH           = $(srcdir)
     16RM              = rm -f
    1517
    16 # tell make where to find the expat headers
    17 INCL_RP_DEPS    = -I$(includedir)
     18MEX             = @MEX@
     19MEX_ARCH        = @MEX_ARCH@
     20EXT             = .mexglx
     21INCLUDES        = \
     22                -I$(srcdir)/../../src/core \
     23                -I$(prefix)/include
     24DEFINES         = -g
     25LIBS            =  -L../../src/core -L$(libdir) -lrappture
    1826
    19 # define the top of the rappture directory structure
    20 RP_BASE   = @RP_BASE@
     27MEX_FLAGS       = $(MEX_ARCH) $(INCLUDES) $(DEFINES)
    2128
    22 # define our compiling environment
    23 #
    24 MEX             = @MEX@ @MEX_ARCH@
     29OBJS            = \
     30                rpAddPresets$(EXT) \
     31                rpLib$(EXT) \
     32                rpLibChildren$(EXT) \
     33                rpLibChildrenByType$(EXT) \
     34                rpLibElement$(EXT) \
     35                rpLibElementAsComp$(EXT) \
     36                rpLibElementAsId$(EXT) \
     37                rpLibElementAsObject$(EXT) \
     38                rpLibElementAsType$(EXT) \
     39                rpLibGet$(EXT) \
     40                rpLibGetDouble$(EXT) \
     41                rpLibGetString$(EXT) \
     42                rpLibNodeComp$(EXT) \
     43                rpLibNodeId$(EXT) \
     44                rpLibNodeType$(EXT) \
     45                rpLibPut$(EXT) \
     46                rpLibPutData$(EXT) \
     47                rpLibPutDouble$(EXT) \
     48                rpLibPutFile$(EXT) \
     49                rpLibPutString$(EXT) \
     50                rpLibResult$(EXT) \
     51                rpLibXml$(EXT) \
     52                rpUnitsConvert$(EXT) \
     53                rpUnitsConvertDbl$(EXT) \
     54                rpUnitsConvertObjDbl$(EXT) \
     55                rpUnitsConvertObjStr$(EXT) \
     56                rpUnitsConvertStr$(EXT) \
     57                rpUnitsDefineUnit$(EXT) \
     58                rpUnitsFind$(EXT) \
     59                rpUnitsGetBasis$(EXT) \
     60                rpUnitsGetExponent$(EXT) \
     61                rpUnitsGetUnits$(EXT) \
     62                rpUnitsGetUnitsName$(EXT) \
     63                rpUtilsProgress$(EXT)
    2564
    26 # define our directories
    27 #
    28 LIB_DIR         = $(RP_BASE)/src
    29 MATLAB_SRC      = $(RP_BASE)/src/matlab
    30 LIB_RAPPTURE    = -L$(LIB_DIR) -lrappture
    31 INCL_RAPPTURE   = -I$(RP_BASE)/include
    32 INCL_MATLAB     = -I$(RP_BASE)/src/matlab
     65all: $(OBJS)
    3366
    34 OBJS=rpLib.@MEXEXT@ rpLibXml.@MEXEXT@ rpLibElement.@MEXEXT@ rpLibElementAsObject.@MEXEXT@ rpLibElementAsType.@MEXEXT@ rpLibElementAsComp.@MEXEXT@ rpLibElementAsId.@MEXEXT@ rpLibChildren.@MEXEXT@ rpLibChildrenByType.@MEXEXT@ rpLibGet.@MEXEXT@ rpLibGetString.@MEXEXT@ rpLibGetDouble.@MEXEXT@ rpLibPut.@MEXEXT@ rpLibPutString.@MEXEXT@ rpLibPutDouble.@MEXEXT@ rpLibPutData.@MEXEXT@ rpLibPutFile.@MEXEXT@ rpLibNodeComp.@MEXEXT@ rpLibNodeType.@MEXEXT@ rpLibNodeId.@MEXEXT@ rpLibResult.@MEXEXT@ rpUnitsDefineUnit.@MEXEXT@ rpUnitsGetUnits.@MEXEXT@ rpUnitsGetUnitsName.@MEXEXT@ rpUnitsGetExponent.@MEXEXT@ rpUnitsGetBasis.@MEXEXT@ rpUnitsFind.@MEXEXT@ rpUnitsConvert.@MEXEXT@ rpUnitsConvertStr.@MEXEXT@ rpUnitsConvertObjStr.@MEXEXT@ rpUnitsConvertDbl.@MEXEXT@ rpUnitsConvertObjDbl.@MEXEXT@ rpAddPresets.@MEXEXT@ rpUtilsProgress.@MEXEXT@
     67.SUFFIXES: .cc $(EXT)
    3568
    36 all: $(OBJS)
     69.cc$(EXT):
     70        $(MEX) $(MEX_FLAGS) $< $(srcdir)/RpMatlabInterface.cc $(LIBS)
    3771
    38 #### Matlab ########################################################
    39 install: $(OBJS)
    40         @if test ! -d $(libdir)/matlab; then \
    41                 mkdir $(libdir)/matlab; \
    42         fi
    43         $(INSTALL_DATA) *.mex* $(libdir)/matlab
     72install: $(OBJS)
     73        $(INSTALL) -d $(destdir)
     74        for i in $(OBJS) ; do \
     75          $(INSTALL) -m 444  $$i $(destdir) ; \
     76        done
    4477
    45 ####################################################################
    46 
    47 # matlab bindings
    48 MEX_INCLS = $(INCL_MATLAB) $(INCL_RAPPTURE) $(INCL_RP_DEPS)
    49 # MEX_OPTS = -g -outdir $(MATLAB_SRC) -L$(LIB_DIR) -lrappture
    50 MEX_OPTS = -g $(LIB_RAPPTURE)
    51 MATLAB_COMP_ARGS = RpMatlabInterface.cc $(MEX_INCLS) $(MEX_OPTS)
    52 
    53 rpLib.@MEXEXT@: rpLib.cc
    54         $(MEX) rpLib.cc $(MATLAB_COMP_ARGS)
    55 rpLibXml.@MEXEXT@: rpLibXml.cc
    56         $(MEX) rpLibXml.cc $(MATLAB_COMP_ARGS)
    57 rpLibElement.@MEXEXT@: rpLibElement.cc
    58         $(MEX) rpLibElement.cc $(MATLAB_COMP_ARGS)
    59 rpLibElementAsObject.@MEXEXT@: rpLibElementAsObject.cc
    60         $(MEX) rpLibElementAsObject.cc $(MATLAB_COMP_ARGS)
    61 rpLibElementAsType.@MEXEXT@: rpLibElementAsType.cc
    62         $(MEX) rpLibElementAsType.cc $(MATLAB_COMP_ARGS)
    63 rpLibElementAsComp.@MEXEXT@: rpLibElementAsComp.cc
    64         $(MEX) rpLibElementAsComp.cc $(MATLAB_COMP_ARGS)
    65 rpLibElementAsId.@MEXEXT@: rpLibElementAsId.cc
    66         $(MEX) rpLibElementAsId.cc $(MATLAB_COMP_ARGS)
    67 rpLibChildren.@MEXEXT@: rpLibChildren.cc
    68         $(MEX) rpLibChildren.cc $(MATLAB_COMP_ARGS)
    69 rpLibChildrenByType.@MEXEXT@: rpLibChildrenByType.cc
    70         $(MEX) rpLibChildrenByType.cc $(MATLAB_COMP_ARGS)
    71 
    72 #rpLibChildrenAsObject.@MEXEXT@: rpChildrenAsObject.cc
    73 #$(MEX) rpChildrenAsObject.cc $(MATLAB_COMP_ARGS)
    74 #rpLibChildrenAsType.@MEXEXT@: rpChildrenAsType.cc
    75 #$(MEX) rpChildrenAsType.cc $(MATLAB_COMP_ARGS)
    76 #rpLibChildrenAsComp.@MEXEXT@: rpChildrenAsComp.cc
    77 #$(MEX) rpChildrenAsComp.cc $(MATLAB_COMP_ARGS)
    78 #rpLibChildrenAsId.@MEXEXT@: rpChildrenAsId.cc
    79 #$(MEX) rpChildrenAsId.cc $(MATLAB_COMP_ARGS)
    80 
    81 rpLibGet.@MEXEXT@: rpLibGet.cc
    82         $(MEX) rpLibGet.cc $(MATLAB_COMP_ARGS)
    83 rpLibGetString.@MEXEXT@: rpLibGetString.cc
    84         $(MEX) rpLibGetString.cc $(MATLAB_COMP_ARGS)
    85 rpLibGetDouble.@MEXEXT@: rpLibGetDouble.cc
    86         $(MEX) rpLibGetDouble.cc $(MATLAB_COMP_ARGS)
    87 rpLibPut.@MEXEXT@: rpLibPut.cc
    88         $(MEX) rpLibPut.cc $(MATLAB_COMP_ARGS)
    89 rpLibPutString.@MEXEXT@: rpLibPutString.cc
    90         $(MEX) rpLibPutString.cc $(MATLAB_COMP_ARGS)
    91 rpLibPutDouble.@MEXEXT@: rpLibPutDouble.cc
    92         $(MEX) rpLibPutDouble.cc $(MATLAB_COMP_ARGS)
    93 rpLibPutData.@MEXEXT@: rpLibPutData.cc
    94         $(MEX) rpLibPutData.cc $(MATLAB_COMP_ARGS)
    95 rpLibPutFile.@MEXEXT@: rpLibPutFile.cc
    96         $(MEX) rpLibPutFile.cc $(MATLAB_COMP_ARGS)
    97 rpLibNodeComp.@MEXEXT@: rpLibNodeComp.cc
    98         $(MEX) rpLibNodeComp.cc $(MATLAB_COMP_ARGS)
    99 rpLibNodeType.@MEXEXT@: rpLibNodeType.cc
    100         $(MEX) rpLibNodeType.cc $(MATLAB_COMP_ARGS)
    101 rpLibNodeId.@MEXEXT@: rpLibNodeId.cc
    102         $(MEX) rpLibNodeId.cc $(MATLAB_COMP_ARGS)
    103 rpLibResult.@MEXEXT@: rpLibResult.cc
    104         $(MEX) rpLibResult.cc $(MATLAB_COMP_ARGS)
    105 rpUnitsDefineUnit.@MEXEXT@: rpUnitsDefineUnit.cc
    106         $(MEX) rpUnitsDefineUnit.cc $(MATLAB_COMP_ARGS)
    107 #rpDefineConv.@MEXEXT@: rpDefineConv.cc
    108 #$(MEX) rpDefineConv.cc $(MATLAB_COMP_ARGS)
    109 rpUnitsGetUnits.@MEXEXT@: rpUnitsGetUnits.cc
    110         $(MEX) rpUnitsGetUnits.cc $(MATLAB_COMP_ARGS)
    111 rpUnitsGetUnitsName.@MEXEXT@: rpUnitsGetUnitsName.cc
    112         $(MEX) rpUnitsGetUnitsName.cc $(MATLAB_COMP_ARGS)
    113 rpUnitsGetExponent.@MEXEXT@: rpUnitsGetExponent.cc
    114         $(MEX) rpUnitsGetExponent.cc $(MATLAB_COMP_ARGS)
    115 rpUnitsGetBasis.@MEXEXT@: rpUnitsGetBasis.cc
    116         $(MEX) rpUnitsGetBasis.cc $(MATLAB_COMP_ARGS)
    117 rpUnitsFind.@MEXEXT@: rpUnitsFind.cc
    118         $(MEX) rpUnitsFind.cc $(MATLAB_COMP_ARGS)
    119 rpUnitsConvert.@MEXEXT@: rpUnitsConvert.cc
    120         $(MEX) rpUnitsConvert.cc $(MATLAB_COMP_ARGS)
    121 rpUnitsConvertStr.@MEXEXT@: rpUnitsConvertStr.cc
    122         $(MEX) rpUnitsConvertStr.cc $(MATLAB_COMP_ARGS)
    123 rpUnitsConvertObjStr.@MEXEXT@: rpUnitsConvertObjStr.cc
    124         $(MEX) rpUnitsConvertObjStr.cc $(MATLAB_COMP_ARGS)
    125 rpUnitsConvertDbl.@MEXEXT@: rpUnitsConvertDbl.cc
    126         $(MEX) rpUnitsConvertDbl.cc $(MATLAB_COMP_ARGS)
    127 rpUnitsConvertObjDbl.@MEXEXT@: rpUnitsConvertObjDbl.cc
    128         $(MEX) rpUnitsConvertObjDbl.cc $(MATLAB_COMP_ARGS)
    129 rpAddPresets.@MEXEXT@: rpAddPresets.cc
    130         $(MEX) rpAddPresets.cc $(MATLAB_COMP_ARGS)
    131 rpUtilsProgress.@MEXEXT@: rpUtilsProgress.cc
    132         $(MEX) rpUtilsProgress.cc $(MATLAB_COMP_ARGS)
    133 
    134 docs:
    135         @if test ! -d docs; then \
    136                 mkdir docs; \
    137         fi
    138         @if test ! -d docs/doxygen; then \
    139                 mkdir docs/doxygen; \
    140         fi
    141         doxygen
    142 
    143 #### CLEAN UP ############################################################
    14478clean:
    145         - rm -f rp*.mex*
     79        $(RM) $(OBJS)
    14680
    14781distclean: clean
    148         - rm Makefile
     82        $(RM) Makefile *~
  • trunk/lang/octave/Makefile.in

    r951 r1018  
    88mandir          = @mandir@
    99prefix          = @prefix@
     10srcdir          = @srcdir@
     11
     12destdir         = $(libdir)/octave
    1013
    1114INSTALL         = @INSTALL@
    12 INSTALL_PROGRAM = ${INSTALL} -m 755
    13 INSTALL_DATA    = ${INSTALL} -m 644
    14 INSTALL_SCRIPT  = ${INSTALL}
     15VPATH           = $(srcdir)
     16RM              = rm -f
    1517
    16 # tell make where to find the expat headers
    17 INCL_RP_DEPS    = -I$(includedir)
     18OCT             = @MKOCTFILE@
     19INCLUDES        = \
     20                -I$(srcdir)/../../src/core \
     21                -I$(prefix)/include
     22DEFINES         =
     23LIBS            = -L../../src/core -lrappture
     24OCT_FLAGS       = $(INCLUDES) $(DEFINES)
    1825
    19 # define the top of the rappture directory structure
    20 RP_BASE   = @RP_BASE@
    21 
    22 # define our compiling environment
    23 #
    24 OCT             = @MKOCTFILE@
    25 
    26 # define our directories
    27 #
    28 LIB_DIR         = $(RP_BASE)/src
    29 LIB_RAPPTURE    = -L$(LIB_DIR) -lrappture
    30 INCL_RAPPTURE   = -I$(RP_BASE)/include
    31 INCL_OCTAVE     = -I$(RP_BASE)/src/octave
    32 
    33 OBJS=rpAddPresets.oct rpUtilsProgress.oct rpLib.oct rpLibChildrenByType.oct rpLibChildren.oct rpLibElementAsComp.oct rpLibElementAsId.oct rpLibElementAsObject.oct rpLibElementAsType.oct rpLibElement.oct rpLibGet.oct rpLibGetString.oct rpLibGetDouble.oct rpLibNodeComp.oct rpLibNodeId.oct rpLibNodeType.oct rpLibPut.oct rpLibPutDouble.oct rpLibPutString.oct rpLibPutFile.oct rpLibResult.oct rpLibXml.oct rpUnitsConvert.oct rpUnitsConvertDbl.oct rpUnitsConvertStr.oct rpUnitsConvertObjDbl.oct rpUnitsConvertObjStr.oct rpUnitsDefineUnit.oct rpUnitsFind.oct rpUnitsGetBasis.oct rpUnitsGetExponent.oct rpUnitsGetUnits.oct rpUnitsGetUnitsName.oct
     26OBJS            = \
     27                rpAddPresets.oct \
     28                rpUtilsProgress.oct \
     29                rpLib.oct \
     30                rpLibChildrenByType.oct \
     31                rpLibChildren.oct \
     32                rpLibElementAsComp.oct \
     33                rpLibElementAsId.oct \
     34                rpLibElementAsObject.oct \
     35                rpLibElementAsType.oct \
     36                rpLibElement.oct \
     37                rpLibGet.oct \
     38                rpLibGetString.oct \
     39                rpLibGetDouble.oct \
     40                rpLibNodeComp.oct \
     41                rpLibNodeId.oct \
     42                rpLibNodeType.oct \
     43                rpLibPut.oct \
     44                rpLibPutDouble.oct \
     45                rpLibPutString.oct \
     46                rpLibPutFile.oct \
     47                rpLibResult.oct \
     48                rpLibXml.oct \
     49                rpUnitsConvert.oct \
     50                rpUnitsConvertDbl.oct \
     51                rpUnitsConvertStr.oct \
     52                rpUnitsConvertObjDbl.oct \
     53                rpUnitsConvertObjStr.oct \
     54                rpUnitsDefineUnit.oct \
     55                rpUnitsFind.oct \
     56                rpUnitsGetBasis.oct \
     57                rpUnitsGetExponent.oct \
     58                rpUnitsGetUnits.oct \
     59                rpUnitsGetUnitsName.oct
    3460
    3561all: $(OBJS)
    3662
    37 #### Octave ########################################################
    38 install: $(OBJS)
    39         @if test ! -d $(libdir)/octave; then \
    40                 mkdir $(libdir)/octave; \
    41         fi
    42         $(INSTALL_DATA) *.oct* $(libdir)/octave
    43 ####################################################################
     63.SUFFIXES: .cc .o .oct
    4464
    45 OCT_INCLS = $(INCL_OCTAVE) $(INCL_RAPPTURE) $(INCL_RP_DEPS)
    46 OCTAVE_COMP_ARGS = $(OCT_INCLS) $(LIB_RAPPTURE)
     65.o.oct:
     66        $(OCT) $(OCT_FLAGS) $< -o $@ $(LIBS)
    4767
    48 rpAddPresets.oct: rpAddPresets.cc
    49         $(OCT) rpAddPresets.cc $(OCTAVE_COMP_ARGS)
    50 rpUtilsProgress.oct: rpUtilsProgress.cc
    51         $(OCT) rpUtilsProgress.cc $(OCTAVE_COMP_ARGS)
    52 rpLib.oct: rpLib.cc
    53         $(OCT) rpLib.cc $(OCTAVE_COMP_ARGS)
    54 rpLibChildrenByType.oct: rpLibChildrenByType.cc
    55         $(OCT) rpLibChildrenByType.cc $(OCTAVE_COMP_ARGS)
    56 rpLibChildren.oct: rpLibChildren.cc
    57         $(OCT) rpLibChildren.cc $(OCTAVE_COMP_ARGS)
    58 rpLibElementAsComp.oct: rpLibElementAsComp.cc
    59         $(OCT) rpLibElementAsComp.cc $(OCTAVE_COMP_ARGS)
    60 rpLibElementAsId.oct: rpLibElementAsId.cc
    61         $(OCT) rpLibElementAsId.cc $(OCTAVE_COMP_ARGS)
    62 rpLibElementAsObject.oct: rpLibElementAsObject.cc
    63         $(OCT) rpLibElementAsObject.cc $(OCTAVE_COMP_ARGS)
    64 rpLibElementAsType.oct: rpLibElementAsType.cc
    65         $(OCT) rpLibElementAsType.cc $(OCTAVE_COMP_ARGS)
    66 rpLibElement.oct: rpLibElement.cc
    67         $(OCT) rpLibElement.cc $(OCTAVE_COMP_ARGS)
    68 rpLibGet.oct: rpLibGet.cc
    69         $(OCT) rpLibGet.cc $(OCTAVE_COMP_ARGS)
    70 rpLibGetString.oct: rpLibGetString.cc
    71         $(OCT) rpLibGetString.cc $(OCTAVE_COMP_ARGS)
    72 rpLibGetDouble.oct: rpLibGetDouble.cc
    73         $(OCT) rpLibGetDouble.cc $(OCTAVE_COMP_ARGS)
    74 rpLibNodeComp.oct: rpLibNodeComp.cc
    75         $(OCT) rpLibNodeComp.cc $(OCTAVE_COMP_ARGS)
    76 rpLibNodeId.oct: rpLibNodeId.cc
    77         $(OCT) rpLibNodeId.cc $(OCTAVE_COMP_ARGS)
    78 rpLibNodeType.oct: rpLibNodeType.cc
    79         $(OCT) rpLibNodeType.cc $(OCTAVE_COMP_ARGS)
    80 rpLibPut.oct: rpLibPut.cc
    81         $(OCT) rpLibPut.cc $(OCTAVE_COMP_ARGS)
    82 rpLibPutDouble.oct: rpLibPutDouble.cc
    83         $(OCT) rpLibPutDouble.cc $(OCTAVE_COMP_ARGS)
    84 rpLibPutString.oct: rpLibPutString.cc
    85         $(OCT) rpLibPutString.cc $(OCTAVE_COMP_ARGS)
    86 rpLibPutFile.oct: rpLibPutFile.cc
    87         $(OCT) rpLibPutFile.cc $(OCTAVE_COMP_ARGS)
    88 rpLibResult.oct: rpLibResult.cc
    89         $(OCT) rpLibResult.cc $(OCTAVE_COMP_ARGS)
    90 rpLibXml.oct: rpLibXml.cc
    91         $(OCT) rpLibXml.cc $(OCTAVE_COMP_ARGS)
    92 rpUnitsConvert.oct: rpUnitsConvert.cc
    93         $(OCT) rpUnitsConvert.cc $(OCTAVE_COMP_ARGS)
    94 rpUnitsConvertDbl.oct: rpUnitsConvertDbl.cc
    95         $(OCT) rpUnitsConvertDbl.cc $(OCTAVE_COMP_ARGS)
    96 rpUnitsConvertStr.oct: rpUnitsConvertStr.cc
    97         $(OCT) rpUnitsConvertStr.cc $(OCTAVE_COMP_ARGS)
    98 rpUnitsConvertObjDbl.oct: rpUnitsConvertObjDbl.cc
    99         $(OCT) rpUnitsConvertObjDbl.cc $(OCTAVE_COMP_ARGS)
    100 rpUnitsConvertObjStr.oct: rpUnitsConvertObjStr.cc
    101         $(OCT) rpUnitsConvertObjStr.cc $(OCTAVE_COMP_ARGS)
    102 rpUnitsDefineUnit.oct: rpUnitsDefineUnit.cc
    103         $(OCT) rpUnitsDefineUnit.cc $(OCTAVE_COMP_ARGS)
    104 rpUnitsFind.oct: rpUnitsFind.cc
    105         $(OCT) rpUnitsFind.cc $(OCTAVE_COMP_ARGS)
    106 rpUnitsGetBasis.oct: rpUnitsGetBasis.cc
    107         $(OCT) rpUnitsGetBasis.cc $(OCTAVE_COMP_ARGS)
    108 rpUnitsGetExponent.oct: rpUnitsGetExponent.cc
    109         $(OCT) rpUnitsGetExponent.cc $(OCTAVE_COMP_ARGS)
    110 rpUnitsGetUnits.oct: rpUnitsGetUnits.cc
    111         $(OCT) rpUnitsGetUnits.cc $(OCTAVE_COMP_ARGS)
    112 rpUnitsGetUnitsName.oct: rpUnitsGetUnitsName.cc
    113         $(OCT) rpUnitsGetUnitsName.cc $(OCTAVE_COMP_ARGS)
     68.cc.o:
     69        $(OCT) $(OCT_FLAGS) -c $< -o $@
    11470
    115 docs:
    116         @if test ! -d docs; then \
    117                 mkdir docs; \
    118         fi
    119         @if test ! -d docs/doxygen; then \
    120                 mkdir docs/doxygen; \
    121         fi
    122         doxygen
     71install: $(OBJS)
     72        $(INSTALL) -d $(destdir)
     73        for i in $(OBJS) ; do \
     74          $(INSTALL) -m 444  $$i $(destdir) ; \
     75        done
    12376
    124 #### CLEAN UP ############################################################
    12577clean:
    126         - rm -f rp*.o*
     78        $(RM) $(OBJS)
    12779
    12880distclean: clean
    129         - rm Makefile
     81        $(RM) Makefile *~
     82
  • trunk/lang/perl/Makefile.PL.in

    r872 r1018  
    1818        @LDDLFLAGS = ( q[-bundle],
    1919                       q[-bundle_loader /usr/bin/perl],
    20                        q[-L/usr/local/lib],
    2120                       q[-L$(PERL_INC) -lperl]
    2221                     );
     
    3029        "/opt/expat-2.0.0/lib", "/opt/expat/lib" );
    3130    $EXPAT_INC="expat.h";
    32     @RAPPTURE_LIB_SEARCHPATH = ( "@prefix@/lib",
     31    @RAPPTURE_LIB_SEARCHPATH = ( "../../src/core", "@prefix@/lib",
    3332        "@libdir@",
    3433        "../src", "/usr/local/lib", "/opt/lib" );
     
    122121WriteMakefile(
    123122    NAME              => 'Rappture',
    124     VERSION_FROM      => 'lib/Rappture.pm', # finds $VERSION
     123    PREFIX            => '@prefix@',
     124    VERSION_FROM      => '@srcdir@/lib/Rappture.pm', # finds $VERSION
    125125    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
    126126    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
    127       (ABSTRACT_FROM  => 'lib/Rappture.pm', # retrieve abstract from module
     127      (ABSTRACT_FROM  => '@srcdir@/lib/Rappture.pm', # retrieve abstract from module
    128128       AUTHOR         => 'Nicholas J. Kisseberth') : ()),
    129129    LIBS              => ["@LIBS"],
  • trunk/lang/python/setup.py.in

    r791 r1018  
    22
    33rp_install_dir = '@prefix@'
     4tmpdir = 'build/tmp/'
     5srcdir = '@srcdir@/Rappture/'
     6incdir = '@prefix@/include'
     7libdir = '@prefix@/lib'
    48
    59library_module = Extension('Rappture.library',
    6                    include_dirs = [rp_install_dir+'/include', '../include'],
    7                    sources = [ 'Rappture/PyRpLibrary.cc' ],
    8                    library_dirs = [ rp_install_dir+'/lib', '../src' ],
    9                    libraries = [ 'rappture' ] )
     10                           include_dirs = [incdir, '../include'],
     11                           sources = [ tmpdir+'PyRpLibrary.cc' ],
     12                           library_dirs = [ libdir, '../src' ],
     13                           libraries = [ 'rappture' ] )
    1014
    1115units_module = Extension('Rappture.Units',
    12                    include_dirs = [rp_install_dir+'/include', '../include'],
    13                    sources = [ 'Rappture/PyRpUnits.cc' ],
    14                    library_dirs = [ rp_install_dir+'/lib', '../src' ],
    15                    libraries = [ 'rappture' ] )
     16                         include_dirs = [incdir, '../include'],
     17                         sources = [ tmpdir+'PyRpUnits.cc' ],
     18                         library_dirs = [ libdir, '../src' ],
     19                         libraries = [ 'rappture' ] )
    1620
    1721utils_module = Extension('Rappture.Utils',
    18                    include_dirs = [rp_install_dir+'/include', '../include'],
    19                    sources = [ 'Rappture/PyRpUtils.cc' ],
    20                    library_dirs = [ rp_install_dir+'/lib', '../src' ],
    21                    libraries = [ 'rappture' ] )
     22                         include_dirs = [ incdir, '../include'],
     23                         sources = [ tmpdir+'PyRpUtils.cc' ],
     24                         library_dirs = [ libdir, '../src' ],
     25                         libraries = [ 'rappture' ] )
    2226
    2327encode_module = Extension('Rappture.encoding',
    24                    include_dirs = [rp_install_dir+'/include', '../include'],
    25                    sources = [ 'Rappture/PyRpEncode.cc' ],
    26                    library_dirs = [ rp_install_dir+'/lib', '../src' ],
    27                    libraries = [ 'rappture' ] )
     28                          include_dirs = [ incdir, '../include'],
     29                          sources = [ tmpdir+'PyRpEncode.cc' ],
     30                          library_dirs = [ libdir, '../src' ],
     31                          libraries = [ 'rappture' ] )
    2832
    2933setup(  name='Rappture',
     
    3135        description='Rapid Application Infrastructure library for nanoHUB.org',
    3236        url='http://www.nanohub.org/',
     37        package_dir={ 'Rappture' : srcdir },
    3338        py_modules=[ 'Rappture.interface',
    3439                     'Rappture.number',
     
    3742                     'Rappture.tools',
    3843                     'Rappture.result'],
    39         ext_modules=[   encode_module,
    40                         library_module,
    41                         units_module,
    42                         utils_module    ]
     44        ext_modules=[ encode_module,
     45                      library_module,
     46                      units_module,
     47                      utils_module ]
    4348  )
  • trunk/lang/ruby/build.rb.in

    r896 r1018  
    1010cxx           = "@CXX@"
    1111cxxflags      = "@CXXFLAGS@"
     12srcdir        = "@srcdir@"
     13install       = "@INSTALL@"
     14shlib_cflags  = "@SHLIB_CFLAGS@"
     15shlib_ldflags  = "@SHLIB_LDFLAGS@"
    1216
    1317##############################################################################
     
    2024dlext         = Config::CONFIG["DLEXT"]
    2125rubydir       = Config::CONFIG["prefix"]
     26rb_archdir        = Config::CONFIG["archdir"]
    2227sitedir       = Config::CONFIG["sitedir"]
    2328ldshared      = Config::CONFIG["LDSHARED"]
     
    3641# Create Makefile
    3742
    38 f = File.new("Makefile", "w")
     43f = File.new("Makefile.ruby", "w")
    3944f.printf("\n")
     45f.printf("srcdir        = #{srcdir}\n")
     46f.printf("incdir        = $(RAPPTURE_DIR)/include\n")
     47f.printf("archdir       = #{rb_archdir}\n")
    4048f.printf("SOURCE        = #{source}\n")
    4149f.printf("TARGET        = #{target}\n\n")
     
    4553f.printf("RUBY_DIR      = #{rubydir}\n")
    4654f.printf("SITE_DIR      = #{sitedir}\n\n")
     55f.printf("SITE_DIR      = $(RAPPTURE_DIR)/lib/ruby/ruby_site\n\n")
    4756f.printf("CXX           = #{cxx}\n")
    48 f.printf("CXXFLAGS      = #{cxxflags}\n")
     57f.printf("CFLAGS        = #{cxxflags}\n")
    4958f.printf("CXX_DLFLAGS   = #{cxx_dlflags}\n")
    50 f.printf("CXX_INCLUDES  = -I$(RAPPTURE_DIR)/include -I$(RUBY_DIR)\n")
    51 f.printf("CXX_FLAGS     = $(CXXFLAGS) $(CXX_DLFLAGS) $(CXX_INCLUDES)\n\n")
     59f.printf("INCLUDES      = -I$(incdir) -I#{srcdir}/../../src/core -I$(archdir)/\n")
     60f.printf("INSTALL       = #{install}\n")
     61f.printf("SHLIB_FLAGS   = $(CFLAGS) $(CXX_DLFLAGS) $(LDFLAGS) $(INCLUDES)\n\n")
    5262f.printf("EXCEPTIONS    = #{exceptions}\n\n")
    53 f.printf("LDSHARED      = #{ldshared}\n")
    54 f.printf("LDFLAGS       = #{ldflags}\n")
    55 f.printf("LD_FLAGS      = $(LDFLAGS) -L$(RAPPTURE_DIR)/lib\n")
    56 f.printf("LIBS          = #{libs} -lrappture\n\n")
    57 f.printf("all: extension install\n\n")
    58 f.printf("extension: $(SOURCE).cc\n")
    59 f.printf("      $(CXX) $(CXX_FLAGS) $(EXCEPTIONS) -c $(SOURCE).cc\n")
    60 f.printf("      $(LDSHARED) $(LD_FLAGS) -o $(TARGET).$(DLEXT) $(SOURCE).$(OBJEXT) $(LIBS)\n\n")
    61 f.printf("install: $(TARGET).$(DLEXT)\n")
    62 f.printf("      @cp $(TARGET).$(DLEXT) $(SITE_DIR)\n\n")
     63f.printf("SHLIB_LD      = #{ldshared}\n")
     64f.printf("LDFLAGS       = #{ldflags}\n")
     65f.printf("LIBS          = -L../../src/core -lrappture #{libs}\n\n")
     66f.printf("package       = $(TARGET).$(DLEXT)\n\n")
     67f.printf("all: extension\n\n")
     68f.printf("extension: $(package)\n")
     69f.printf("$(package): $(srcdir)/$(SOURCE).cc\n")
     70f.printf("      $(SHLIB_LD) $(SHLIB_FLAGS) $(EXCEPTIONS) $< -o $@ $(LIBS)\n\n")
     71f.printf("install: $(package)\n")
     72f.printf("      $(INSTALL) -m 0755 $(package) $(SITE_DIR)\n\n")
    6373f.close
    6474 
     
    6676# Build the extension
    6777
    68 `make extension`
     78#`make extension`
    6979#`make install`
    7080
  • trunk/lang/tcl/Makefile.in

    r951 r1018  
    1 # Makefile.in --
    2 #
    3 #       This file is a Makefile for Sample TEA Extension.  If it has the name
    4 #       "Makefile.in" then it is a template for a Makefile;  to generate the
    5 #       actual Makefile, run "./configure", which is a configuration script
    6 #       generated by the "autoconf" program (constructs like "@foo@" will get
    7 #       replaced in the actual Makefile.
    8 #
    9 # Copyright (c) 1999 Scriptics Corporation.
    10 # Copyright (c) 2002-2005 ActiveState Corporation.
    11 #
    12 # See the file "license.terms" for information on usage and redistribution
    13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14 #
    15 # RCS: @(#) $Id: Makefile.in,v 1.60 2005/09/13 22:06:37 hobbs Exp $
    161
    17 #========================================================================
    18 # Add additional lines to handle any additional AC_SUBST cases that
    19 # have been added in a customized configure script.
    20 #========================================================================
    21 
    22 #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
    23 BLT_SRC_DIR = @BLT_SRC_DIR@
    24 ALT_DIR = @ALT_DIR@
    25 RAPPTURE_DIR = @RAPPTURE_DIR@
    26 
    27 
    28 #========================================================================
    29 # Nothing of the variables below this line should need to be changed.
    30 # Please check the TARGETS section below to make sure the make targets
    31 # are correct.
    32 #========================================================================
    33 
    34 #========================================================================
    35 # The names of the source files is defined in the configure script.
    36 # The object files are used for linking into the final library.
    37 # This will be used when a dist target is added to the Makefile.
    38 # It is not important to specify the directory, as long as it is the
    39 # $(srcdir) or in the generic, win or unix subdirectory.
    40 #========================================================================
    41 
    42 PKG_SOURCES     = @PKG_SOURCES@
    43 PKG_OBJECTS     = @PKG_OBJECTS@
    44 
    45 PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
    46 PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
    47 
    48 #========================================================================
    49 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
    50 # this package that need to be installed, if any.
    51 #========================================================================
    52 
    53 PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
    54 
    55 #========================================================================
    56 # This is a list of public header files to be installed, if any.
    57 #========================================================================
    58 
    59 PKG_HEADERS     = @PKG_HEADERS@
    60 
    61 #========================================================================
    62 # "PKG_LIB_FILE" refers to the library (dynamic or static as per
    63 # configuration options) composed of the named objects.
    64 #========================================================================
    65 
    66 PKG_LIB_FILE    = @PKG_LIB_FILE@
    67 PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
    68 
    69 lib_BINARIES    = $(PKG_LIB_FILE)
    70 BINARIES        = $(lib_BINARIES)
    71 
    72 SHELL           = @SHELL@
    73 
    74 srcdir          = @srcdir@
    75 prefix          = @prefix@
    76 exec_prefix     = @exec_prefix@
    77 
    78 bindir          = @bindir@
    79 libdir          = @libdir@
     2bindir          = @bindir@
    803datadir         = @datadir@
    814datarootdir     = @datarootdir@
    82 mandir          = @mandir@
    83 includedir      = @includedir@
     5exec_prefix     = @exec_prefix@
     6includedir      = @includedir@
     7libdir          = @libdir@
     8mandir          = @mandir@
     9prefix          = @prefix@
    8410
    85 DESTDIR         =
     11destdir         = $(libdir)/Rappture$(PACKAGE_VERSION)
    8612
    87 PKG_DIR         = $(PACKAGE_NAME)$(PACKAGE_VERSION)
    88 pkgdatadir      = $(datadir)/$(PKG_DIR)
    89 pkglibdir       = $(libdir)/$(PKG_DIR)
    90 pkgincludedir   = $(includedir)/$(PKG_DIR)
    91 
    92 top_builddir    = .
     13PACKAGE_VERSION = @PACKAGE_VERSION@
    9314
    9415INSTALL         = @INSTALL@
    95 INSTALL_PROGRAM = @INSTALL_PROGRAM@
    96 INSTALL_DATA    = @INSTALL_DATA@
    97 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
    9816
    99 PACKAGE_NAME    = @PACKAGE_NAME@
    100 PACKAGE_VERSION = @PACKAGE_VERSION@
    101 CC              = @CC@
    102 CXX             = @CXX@
    103 CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    104 CFLAGS_WARNING  = @CFLAGS_WARNING@
    105 CLEANFILES      = @CLEANFILES@
    106 EXEEXT          = @EXEEXT@
    107 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
    108 MAKE_LIB        = @MAKE_LIB@
    109 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
    110 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
    111 MAKE_STUB_LIB   = @MAKE_STUB_LIB@
    112 OBJEXT          = @OBJEXT@
    113 RANLIB          = @RANLIB@
    114 RANLIB_STUB     = @RANLIB_STUB@
    115 SHLIB_CFLAGS    = @SHLIB_CFLAGS@
    116 SHLIB_LD        = @SHLIB_LD@
    117 SHLIB_LD_LIBS   = @SHLIB_LD_LIBS@
    118 STLIB_LD        = @STLIB_LD@
    119 #TCL_DEFS       = @TCL_DEFS@
    120 TCL_BIN_DIR     = @TCL_BIN_DIR@
    121 TCL_SRC_DIR     = @TCL_SRC_DIR@
    122 #TK_BIN_DIR     = @TK_BIN_DIR@
    123 #TK_SRC_DIR     = @TK_SRC_DIR@
     17CXX             = @CXX@
     18CC              = @CC@
     19CFLAGS_DEBUG    = @CFLAGS_DEBUG@
     20CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
     21STLIB_LD        = @STLIB_LD@
     22SHLIB_LD        = @SHLIB_LD@
     23SHLIB_CFLAGS    = @SHLIB_CFLAGS@
     24SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
     25SHLIB_SUFFIX    = @SHLIB_SUFFIX@
     26CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
     27LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
     28CFLAGS          = @CFLAGS@
    12429
    125 # Not used, but retained for reference of what libs Tcl required
    126 #TCL_LIBS       = @TCL_LIBS@
     30RANLIB          = @RANLIB@
     31AR              = ar
     32RM              = rm -f
    12733
    128 #========================================================================
    129 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
    130 # package without installing.  The other environment variables allow us
    131 # to test against an uninstalled Tcl.  Add special env vars that you
    132 # require for testing here (like TCLX_LIBRARY).
    133 #========================================================================
     34# The script directory is moved from src/tcl.
    13435
    135 EXTRA_PATH      = $(top_builddir):$(TCL_BIN_DIR)
    136 #EXTRA_PATH     = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
    137 TCLLIBPATH      = $(top_builddir)
    138 TCLSH_ENV       = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
    139                   @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
    140                   PATH="$(EXTRA_PATH):$(PATH)" \
    141                   TCLLIBPATH="$(TCLLIBPATH)"
    142 #                 TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
     36.PHONY: src scripts tests
    14337
    144 TCLSH_PROG      = @TCLSH_PROG@
    145 TCLSH   = $(TCLSH_ENV) $(TCLSH_PROG)
     38all:
     39        $(MAKE) -C src all
     40        $(MAKE) -C scripts all
    14641
    147 #WISH_PROG      = @WISH_PROG@
    148 #WISH   = $(TCLSH_ENV) $(WISH_PROG)
     42install:
     43        $(INSTALL) -d $(destdir)
     44        $(INSTALL) -m 0444 pkgIndex.tcl $(destdir)
     45        $(MAKE) -C src install
     46        $(MAKE) -C scripts install
    14947
     48test:   
     49        $(MAKE) -C tests all
    15050
    151 SHARED_BUILD    = @SHARED_BUILD@
    152 
    153 INCLUDES        = @PKG_INCLUDES@ @TCL_INCLUDES@ -I$(BLT_SRC_DIR) -I$(ALT_DIR)/include -I$(RAPPTURE_DIR)/include
    154 #INCLUDES       = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
    155 
    156 PKG_CFLAGS      = @PKG_CFLAGS@
    157 
    158 # TCL_DEFS is not strictly need here, but if you remove it, then you
    159 # must make sure that configure.in checks for the necessary components
    160 # that your library may use.  TCL_DEFS can actually be a problem if
    161 # you do not compile with a similar machine setup as the Tcl core was
    162 # compiled with.
    163 #DEFS           = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
    164 DEFS            = @DEFS@ $(PKG_CFLAGS)
    165 
    166 CONFIG_CLEAN_FILES = Makefile
    167 
    168 CPPFLAGS        = @CPPFLAGS@
    169 LIBS            = @PKG_LIBS@ @LIBS@
    170 AR              = @AR@
    171 CFLAGS          = @CFLAGS@
    172 COMPILE         = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    173 
    174 #========================================================================
    175 # Start of user-definable TARGETS section
    176 #========================================================================
    177 
    178 #========================================================================
    179 # TEA TARGETS.  Please note that the "libraries:" target refers to platform
    180 # independent files, and the "binaries:" target inclues executable programs and
    181 # platform-dependent libraries.  Modify these targets so that they install
    182 # the various pieces of your package.  The make and install rules
    183 # for the BINARIES that you specified above have already been done.
    184 #========================================================================
    185 
    186 all: binaries libraries doc
    187 
    188 #========================================================================
    189 # The binaries target builds executable programs, Windows .dll's, unix
    190 # shared/static libraries, and any other platform-dependent files.
    191 # The list of targets to build for "binaries:" is specified at the top
    192 # of the Makefile, in the "BINARIES" variable.
    193 #========================================================================
    194 
    195 binaries: $(BINARIES)
    196 
    197 libraries:
    198 
    199 
    200 #========================================================================
    201 # Your doc target should differentiate from doc builds (by the developer)
    202 # and doc installs (see install-doc), which just install the docs on the
    203 # end user machine when building from source.
    204 #========================================================================
    205 
    206 doc:
    207 #       @echo "If you have documentation to create, place the commands to"
    208 #       @echo "build the docs in the 'doc:' target.  For example:"
    209 #       @echo "        xml2nroff sample.xml > sample.n"
    210 #       @echo "        xml2html sample.xml > sample.html"
    211 
    212 install: all install-binaries install-libraries install-doc
    213 
    214 install-binaries: binaries install-lib-binaries install-bin-binaries
    215 
    216 #========================================================================
    217 # This rule installs platform-independent files, such as header files.
    218 # The list=...; for p in $$list handles the empty list case x-platform.
    219 #========================================================================
    220 
    221 install-libraries: libraries
    222         @mkdir -p $(DESTDIR)$(includedir)
    223         @echo "Installing header files in $(DESTDIR)$(includedir)"
    224         @list='$(PKG_HEADERS)'; for i in $$list; do \
    225             echo "Installing $(srcdir)/$$i" ; \
    226             $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
    227         done;
    228 
    229 #========================================================================
    230 # Install documentation.  Unix manpages should go in the $(mandir)
    231 # directory.
    232 #========================================================================
    233 
    234 install-doc: doc
    235 #       @mkdir -p $(DESTDIR)$(mandir)/mann
    236 #       @echo "Installing documentation in $(DESTDIR)$(mandir)"
    237 #       @list='$(srcdir)/doc/*.n'; for i in $$list; do \
    238 #           echo "Installing $$i"; \
    239 #           rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
    240 #           $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
    241 #       done
    242 
    243 test: binaries libraries
    244         $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
    245 
    246 shell: binaries libraries
    247         @$(TCLSH) $(SCRIPT)
    248 
    249 gdb:
    250         $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
    251 
    252 depend:
    253 
    254 #========================================================================
    255 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
    256 # mentioned above.  That will ensure that this target is built when you
    257 # run "make binaries".
    258 #
    259 # The $(PKG_OBJECTS) objects are created and linked into the final
    260 # library.  In most cases these object files will correspond to the
    261 # source files above.
    262 #========================================================================
    263 
    264 $(PKG_LIB_FILE): $(PKG_OBJECTS)
    265         -rm -f $(PKG_LIB_FILE)
    266         ${MAKE_LIB}
    267         $(RANLIB) $(PKG_LIB_FILE)
    268 
    269 $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
    270         -rm -f $(PKG_STUB_LIB_FILE)
    271         ${MAKE_STUB_LIB}
    272         $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
    273 
    274 #========================================================================
    275 # We need to enumerate the list of .c to .o lines here.
    276 #
    277 # In the following lines, $(srcdir) refers to the toplevel directory
    278 # containing your extension.  If your sources are in a subdirectory,
    279 # you will have to modify the paths to reflect this:
    280 #
    281 # sample.$(OBJEXT): $(srcdir)/generic/sample.c
    282 #       $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
    283 #
    284 # Setting the VPATH variable to a list of paths will cause the makefile
    285 # to look into these paths when resolving .c to .obj dependencies.
    286 # As necessary, add $(srcdir):$(srcdir)/compat:....
    287 #========================================================================
    288 
    289 VPATH = $(srcdir):$(srcdir)/src:$(srcdir)/unix:$(srcdir)/win
    290 
    291 .c.@OBJEXT@:
    292         $(CC) $(COMPILE) -c `@CYGPATH@ $<` -o $@
    293 .cc.@OBJEXT@:
    294         $(CXX) $(COMPILE) -c `@CYGPATH@ $<` -o $@
    295 .cpp.@OBJEXT@:
    296         $(CXX) $(COMPILE) -c `@CYGPATH@ $<` -o $@
    297 
    298 #========================================================================
    299 # Distribution creation
    300 # You may need to tweak this target to make it work correctly.
    301 #========================================================================
    302 
    303 #COMPRESS       = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
    304 COMPRESS        = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
    305 DIST_ROOT       = /tmp/dist
    306 DIST_DIR        = $(DIST_ROOT)/$(PKG_DIR)
    307 
    308 dist-clean:
    309         rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
    310 
    311 dist: dist-clean
    312         mkdir -p $(DIST_DIR)
    313         cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
    314                 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
    315                 $(DIST_DIR)/
    316         chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
    317         chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
    318 
    319         for i in $(srcdir)/*.[ch]; do \
    320             if [ -f $$i ]; then \
    321                 cp -p $$i $(DIST_DIR)/ ; \
    322             fi; \
    323         done;
    324 
    325         mkdir $(DIST_DIR)/tclconfig
    326         cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
    327                 $(DIST_DIR)/tclconfig/
    328         chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
    329         chmod +x $(DIST_DIR)/tclconfig/install-sh
    330 
    331         list='demos doc generic library mac tests unix win'; \
    332         for p in $$list; do \
    333             if test -d $(srcdir)/$$p ; then \
    334                 mkdir $(DIST_DIR)/$$p; \
    335                 cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
    336             fi; \
    337         done
    338 
    339         (cd $(DIST_ROOT); $(COMPRESS);)
    340 
    341 #========================================================================
    342 # End of user-definable section
    343 #========================================================================
    344 
    345 #========================================================================
    346 # Don't modify the file to clean here.  Instead, set the "CLEANFILES"
    347 # variable in configure.in
    348 #========================================================================
    349 
    350 clean: 
    351         -test -z "$(BINARIES)" || rm -f $(BINARIES)
    352         -rm -f *.$(OBJEXT) core *.core
    353         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
     51clean:
     52        $(MAKE) -C src clean
     53        $(MAKE) -C tests clean
     54        $(MAKE) -C scripts clean
    35455
    35556distclean: clean
    356         -rm -f *.tab.c
    357         -rm -f $(CONFIG_CLEAN_FILES)
    358         -rm -f config.cache config.log config.status
     57        $(MAKE) -C src distclean
     58        $(MAKE) -C tests distclean
     59        $(MAKE) -C scripts distclean
     60        $(RM) Makefile
    35961
    360 #========================================================================
    361 # Install binary object libraries.  On Windows this includes both .dll and
    362 # .lib files.  Because the .lib files are not explicitly listed anywhere,
    363 # we need to deduce their existence from the .dll file of the same name.
    364 # Library files go into the lib directory.
    365 # In addition, this will generate the pkgIndex.tcl
    366 # file in the install location (assuming it can find a usable tclsh shell)
    367 #
    368 # You should not have to modify this target.
    369 #========================================================================
    370 
    371 install-lib-binaries: binaries
    372         @mkdir -p $(DESTDIR)$(pkglibdir)
    373         @list='$(lib_BINARIES)'; for p in $$list; do \
    374           if test -f $$p; then \
    375             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
    376             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
    377             stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
    378             if test "x$$stub" = "xstub"; then \
    379                 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
    380                 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
    381             else \
    382                 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
    383                 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
    384             fi; \
    385             ext=`echo $$p|sed -e "s/.*\.//"`; \
    386             if test "x$$ext" = "xdll"; then \
    387                 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
    388                 if test -f $$lib; then \
    389                     echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
    390                     $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
    391                 fi; \
    392             fi; \
    393           fi; \
    394         done
    395         @mkdir -p $(DESTDIR)$(pkglibdir)/scripts
    396         @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
    397           if test -f $(srcdir)/$$p; then \
    398             destp=`basename $$p`; \
    399             echo " Install $$destp $(DESTDIR)$(pkglibdir)/scripts/$$destp"; \
    400             $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/scripts/$$destp; \
    401           fi; \
    402         done
    403         # Uncomment when you are ready to install tcl rappture library bindings
    404         #$(TCLSH_PROG) $(srcdir)/tclconfig/mkindex.tcl $(DESTDIR)$(pkglibdir)/scripts
    405         $(INSTALL_DATA) init.tcl $(DESTDIR)$(pkglibdir)/init.tcl
    406         @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
    407           if test -f $(srcdir)/$$p; then \
    408             destp=`basename $$p`; \
    409             echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
    410             $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
    411           fi; \
    412         done
    413         @if test "x$(SHARED_BUILD)" = "x1"; then \
    414             echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
    415             $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
    416         fi
    417 
    418 #========================================================================
    419 # Install binary executables (e.g. .exe files and dependent .dll files)
    420 # This is for files that must go in the bin directory (located next to
    421 # wish and tclsh), like dependent .dll files on Windows.
    422 #
    423 # You should not have to modify this target, except to define bin_BINARIES
    424 # above if necessary.
    425 #========================================================================
    426 
    427 install-bin-binaries: binaries
    428         @mkdir -p $(DESTDIR)$(bindir)
    429         @list='$(bin_BINARIES)'; for p in $$list; do \
    430           if test -f $$p; then \
    431             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
    432             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
    433           fi; \
    434         done
    435 
    436 .SUFFIXES: .c .$(OBJEXT)
    437 
    438 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    439         cd $(top_builddir) \
    440           && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
    441 
    442 uninstall-binaries:
    443         list='$(lib_BINARIES)'; for p in $$list; do \
    444           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
    445         done
    446         list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
    447           p=`basename $$p`; \
    448           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
    449         done
    450         list='$(bin_BINARIES)'; for p in $$list; do \
    451           rm -f $(DESTDIR)$(bindir)/$$p; \
    452         done
    453 
    454 .PHONY: all binaries clean depend distclean doc install libraries test
    455 
    456 # Tell versions [3.59,3.63) of GNU make to not export all variables.
    457 # Otherwise a system limit (for SysV at least) may be exceeded.
    458 .NOEXPORT:
  • trunk/lang/tcl/pkgIndex.tcl.in

    r527 r1018  
    1 # this file identifies Rappture as a Tcl package
    2 package ifneeded Rappture @PACKAGE_VERSION@ [list source [file join $dir init.tcl]]
    3 namespace eval Rappture {}
    4 set Rappture::installdir [file join $dir]
    5 if {"." == $Rappture::installdir} {
    6         set installdir [pwd]
    7 }
     1package ifneeded Rappture @PACKAGE_VERSION@ [format {
     2    set dir "%s"
     3    set version @PACKAGE_VERSION@
     4    lappend auto_path [file join $dir scripts]
     5    namespace eval Rappture {
     6        variable version $version
     7        variable installdir [file normalize $dir]
     8    }
     9    namespace eval Rappture::LibraryObj {
     10        #empty
     11    }
     12    set ext [info sharedlibextension]
     13    load [file join $dir "Rappture${version}${ext}"]
     14    package provide Rappture $version
     15} $dir]
  • trunk/lang/tcl/src/RpDaemon.c

    r1017 r1018  
    2727 *  RpDaemon_Init()
    2828 *
    29  *  Called in RapptureGUI_Init() to initialize the commands defined
     29 *  Called in Rappture_Init() to initialize the commands defined
    3030 *  in this file.
    3131 * ------------------------------------------------------------------------
  • trunk/lang/tcl/src/RpEncodeTclInterface.cc

    r725 r1018  
    1414#include <tcl.h>
    1515#include "RpEncode.h"
    16 #include "RpEncodeTclInterface.h"
    17 
    18 #ifdef __cplusplus
    19 extern "C" {
    20 #endif
    21 
    22 static int RpTclEncodingIs      _ANSI_ARGS_((   ClientData cdata,
    23                                                 Tcl_Interp *interp,
    24                                                 int objc,
    25                                                 Tcl_Obj *const objv[]    ));
    26 
    27 static int RpTclEncodingEncode  _ANSI_ARGS_((   ClientData cdata,
    28                                                 Tcl_Interp *interp,
    29                                                 int objc,
    30                                                 Tcl_Obj *const objv[]    ));
    31 
    32 static int RpTclEncodingDecode  _ANSI_ARGS_((   ClientData cdata,
    33                                                 Tcl_Interp *interp,
    34                                                 int objc,
    35                                                 Tcl_Obj *const objv[]    ));
    36 
    37 #ifdef __cplusplus
    38 }
    39 #endif
    40 
     16
     17extern "C" Tcl_AppInitProc RpEncoding_Init;
     18
     19static Tcl_ObjCmdProc RpTclEncodingIs;
     20static Tcl_ObjCmdProc RpTclEncodingEncode;
     21static Tcl_ObjCmdProc RpTclEncodingDecode;
    4122
    4223/**********************************************************************/
    43 // FUNCTION: RapptureEncoding_Init()
     24// FUNCTION: RpEncoding_Init()
    4425/// Initializes the Rappture Encoding module and commands defined below
    4526/**
     
    5233
    5334int
    54 RapptureEncoding_Init(Tcl_Interp *interp)
     35RpEncoding_Init(Tcl_Interp *interp)
    5536{
    5637
     
    7758 */
    7859
    79 int
     60static int
    8061RpTclEncodingIs (ClientData cdata, Tcl_Interp *interp,
    8162    int objc, Tcl_Obj *const objv[])
     
    127108 */
    128109
    129 int
     110static int
    130111RpTclEncodingEncode (   ClientData cdata,
    131112                        Tcl_Interp *interp,
     
    260241 */
    261242
    262 int
     243static int
    263244RpTclEncodingDecode (   ClientData cdata,
    264245                        Tcl_Interp *interp,
  • trunk/lang/tcl/src/RpLibraryTclInterface.cc

    r685 r1018  
    1515#include <tcl.h>
    1616#include <sstream>
    17 #include "core/RpLibrary.h"
    18 #include "RpLibraryTclInterface.h"
    19 
    20 #ifdef __cplusplus
    21 extern "C" {
    22 #endif
    23 
    24 #include "bltInt.h"
    25 
    26 
    27 static int RpLibraryCmd _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    28     int objc, Tcl_Obj *CONST *objv));
    29 static int RpLibCallCmd _ANSI_ARGS_((ClientData cData, Tcl_Interp *interp,
    30     int objc, Tcl_Obj *CONST *objv));
    31 static int RpTclLibChild _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    32     int objc, Tcl_Obj *CONST *objv));
    33 static int RpTclLibCopy _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    34     int objc, Tcl_Obj *CONST *objv));
    35 static int RpTclLibDiff _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    36     int objc, Tcl_Obj *CONST *objv));
    37 static int RpTclLibElem _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    38     int objc, Tcl_Obj *CONST *objv));
    39 static int RpTclLibGet _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    40     int objc, Tcl_Obj *CONST *objv));
    41 static int RpTclLibInfo _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    42     int objc, Tcl_Obj *CONST *objv));
    43 static int RpTclLibIsa _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    44     int objc, Tcl_Obj *CONST *objv));
    45 static int RpTclLibParent _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    46     int objc, Tcl_Obj *CONST *objv));
    47 static int RpTclLibPut _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    48     int objc, Tcl_Obj *CONST *objv));
    49 static int RpTclLibRemove _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    50     int objc, Tcl_Obj *CONST *objv));
    51 static int RpTclLibResult _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    52     int objc, Tcl_Obj *CONST *objv));
    53 static int RpTclLibValue _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    54     int objc, Tcl_Obj *CONST *objv));
    55 static int RpTclLibXml _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    56     int objc, Tcl_Obj *CONST *objv));
    57 
    58 static int RpTclResult _ANSI_ARGS_((ClientData cdata, Tcl_Interp *interp,
    59     int objc, Tcl_Obj *CONST *objv));
     17#include "RpLibrary.h"
     18
     19#define RAPPTURE_OBJ_TYPE "::Rappture::LibraryObj"
     20
     21extern "C" Tcl_AppInitProc RpLibrary_Init;
     22
     23#include "RpOp.h"
     24
     25static Tcl_ObjCmdProc RpLibraryCmd;
     26static Tcl_ObjCmdProc RpLibCallCmd;
     27static Tcl_ObjCmdProc RpTclLibChild;
     28static Tcl_ObjCmdProc RpTclLibCopy;
     29static Tcl_ObjCmdProc RpTclLibDiff;
     30static Tcl_ObjCmdProc RpTclLibElem;
     31static Tcl_ObjCmdProc RpTclLibGet;
     32static Tcl_ObjCmdProc RpTclLibInfo;
     33static Tcl_ObjCmdProc RpTclLibIsa;
     34static Tcl_ObjCmdProc RpTclLibParent;
     35static Tcl_ObjCmdProc RpTclLibPut;
     36static Tcl_ObjCmdProc RpTclLibRemove;
     37static Tcl_ObjCmdProc RpTclLibResult;
     38static Tcl_ObjCmdProc RpTclLibValue;
     39static Tcl_ObjCmdProc RpTclLibXml;
     40static Tcl_ObjCmdProc RpTclResult;
    6041
    6142static std::string rpLib2command _ANSI_ARGS_((Tcl_Interp *interp,
     
    6748typedef std::string (RpLibrary::*rpMbrFxnPtr) _ANSI_ARGS_(());
    6849
    69 static Blt_OpSpec rpLibOps[] = {
    70     {"children", 2, (Blt_Op)RpTclLibChild, 2, 7,
    71         "?-as <fval>? ?-type <name>? ?<path>?",},
    72     {"copy", 2, (Blt_Op)RpTclLibCopy, 5, 6,
     50static Rp_OpSpec rpLibOps[] = {
     51    {"children", 2, (void *)RpTclLibChild, 2, 7,
     52        "?-as <fval>? ?-type <name>? ?<path>?",},
     53    {"copy",     2, (void *)RpTclLibCopy, 5, 6,
    7354        "<path> from ?<xmlobj>? <path>",},
    74     {"diff", 1, (Blt_Op)RpTclLibDiff, 3, 3, "<xmlobj>",},
    75     {"element", 1, (Blt_Op)RpTclLibElem, 2, 5, "?-as <fval>? ?<path>?",},
    76     {"get", 1, (Blt_Op)RpTclLibGet, 2, 3, "?<path>?",},
    77     {"info", 1, (Blt_Op)RpTclLibInfo, 3, 3, "<objType>",},
    78     {"isa", 1, (Blt_Op)RpTclLibIsa, 3, 3, "<objType>",},
    79     {"parent", 2, (Blt_Op)RpTclLibParent, 2, 5, "?-as <fval>? ?<path>?",},
    80     {"put", 2, (Blt_Op)RpTclLibPut, 2, 8,
     55    {"diff",     1, (void *)RpTclLibDiff, 3, 3, "<xmlobj>",},
     56    {"element",  1, (void *)RpTclLibElem, 2, 5, "?-as <fval>? ?<path>?",},
     57    {"get",      1, (void *)RpTclLibGet, 2, 3, "?<path>?",},
     58    {"info",     1, (void *)RpTclLibInfo, 3, 3, "<objType>",},
     59    {"isa",      1, (void *)RpTclLibIsa, 3, 3, "<objType>",},
     60    {"parent",   2, (void *)RpTclLibParent, 2, 5, "?-as <fval>? ?<path>?",},
     61    {"put",      2, (void *)RpTclLibPut, 2, 8,
    8162        "?-append yes? ?-id num? ?<path>? <string>",},
    82     {"remove", 3, (Blt_Op)RpTclLibRemove, 2, 3, "?<path>?",},
    83 //    {"result", 3, (Blt_Op)RpTclLibResult, 2, 2, "",},
    84     {"xml", 1, (Blt_Op)RpTclLibXml, 2, 2, "",},
     63    {"remove",   3, (void *)RpTclLibRemove, 2, 3, "?<path>?",},
     64//    {"result", 3, (void *)RpTclLibResult, 2, 2, "",},
     65    {"xml",      1, (void *)RpTclLibXml, 2, 2, "",},
    8566};
    8667
    87 static int nRpLibOps = sizeof(rpLibOps) / sizeof(Blt_OpSpec);
    88 
    89 #ifdef __cplusplus
    90 }
    91 #endif
     68static int nRpLibOps = sizeof(rpLibOps) / sizeof(Rp_OpSpec);
    9269
    9370/*
     
    124101 * ------------------------------------------------------------------------
    125102 */
    126 int
     103static int
    127104rpGetLibraryFromObj(Tcl_Interp *interp, Tcl_Obj* obj, RpLibrary **rval)
    128105{
     
    143120/*
    144121 * ------------------------------------------------------------------------
    145  *  Rappturelibrary_Init()
     122 *  RpLibrary_Init()
    146123 *
    147124 *  Called in Rappture_Init() to initialize the commands defined
     
    150127 */
    151128int
    152 Rappturelibrary_Init(Tcl_Interp *interp)
     129RpLibrary_Init(Tcl_Interp *interp)
    153130{
    154131
     
    172149 * USAGE: library isvalid <object>
    173150 */
    174 int
     151static int
    175152RpLibraryCmd (ClientData cData, Tcl_Interp *interp,
    176     int objc, Tcl_Obj* CONST *objv[])
    177 {
    178     char *flag = Tcl_GetString(objv[1]);
     153    int objc, Tcl_Obj* const *objv)
     154{
     155    const char *flag = Tcl_GetString(objv[1]);
    179156    if (objc > 2 && strcmp(flag,"isvalid") == 0) {
    180157        if (objc != 3) {
     
    214191
    215192
    216 int
     193static int
    217194RpLibCallCmd (ClientData cData, Tcl_Interp *interp,
    218     int objc, Tcl_Obj *CONST *objv)
    219 {
    220     Blt_Op proc;
    221 
    222     proc = Blt_GetOpFromObj(interp, nRpLibOps, rpLibOps, BLT_OP_ARG1,
    223         objc, (char**)objv, 0);
     195    int objc, Tcl_Obj *const *objv)
     196{
     197    Tcl_ObjCmdProc *proc;
     198
     199    proc = (Tcl_ObjCmdProc *)Rp_GetOpFromObj(interp, nRpLibOps, rpLibOps,
     200        RP_OP_ARG1, objc, objv, 0);
    224201
    225202    if (proc == NULL) {
     
    252229 *        parent node and all its children will be returned.
    253230 */
    254 int
     231static int
    255232RpTclLibChild (ClientData cdata, Tcl_Interp *interp,
    256     int objc, Tcl_Obj *CONST *objv)
     233    int objc, Tcl_Obj *const *objv)
    257234{
    258235    std::string path   = "";    // path of where to place data inside xml tree
     
    263240
    264241    RpLibrary* node    = NULL;
    265     rpMbrFxnPtr asProc = &RpLibrary::nodeComp;
     242    rpMbrFxnPtr asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    266243
    267244    // parse through -'d arguments
     
    273250                if (nextarg < objc) {
    274251                    if (*opt == 'c' && strcmp(opt,"component") == 0) {
    275                         asProc = &RpLibrary::nodeComp;
     252                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    276253                        nextarg++;
    277254                    }
    278255                    else if (*opt == 'i' && strcmp(opt,"id") == 0) {
    279                         asProc = &RpLibrary::nodeId;
     256                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeId;
    280257                        nextarg++;
    281258                    }
    282259                    else if (*opt == 't' && strcmp(opt,"type") == 0) {
    283                         asProc = &RpLibrary::nodeType;
     260                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeType;
    284261                        nextarg++;
    285262                    }
    286263                    else if (*opt == 'p' && strcmp(opt,"path") == 0) {
    287                         asProc = &RpLibrary::nodePath;
     264                        asProc = (rpMbrFxnPtr)&RpLibrary::nodePath;
    288265                        nextarg++;
    289266                    }
    290267                    else if (*opt == 'o' && strcmp(opt,"object") == 0) {
    291                         asProc = NULL;
     268                        asProc = (rpMbrFxnPtr)NULL;
    292269                        nextarg++;
    293270                    }
     
    361338}
    362339
    363 int
     340static int
    364341RpTclLibCopy (ClientData cdata, Tcl_Interp *interp,
    365     int objc, Tcl_Obj *CONST *objv)
     342    int objc, Tcl_Obj *const *objv)
    366343{
    367344    std::string fromPath = "";    // path of where to copy data from
     
    411388
    412389    // call the rappture library copy function
    413     ((RpLibrary*) cdata)->copy(toPath, fromPath, fromObj);
     390    RpLibrary *libPtr   = (RpLibrary *)cdata;
     391    libPtr->copy(toPath, fromObj, fromPath);
    414392
    415393    // clear any previous result in the interpreter
     
    427405 */
    428406
    429 int
     407static int
    430408RpTclLibDiff (ClientData cdata, Tcl_Interp *interp,
    431     int objc, Tcl_Obj *CONST *objv)
     409    int objc, Tcl_Obj *const *objv)
    432410{
    433411    RpLibrary* otherLib = NULL;
     
    467445 * element ?-as <fval>? ?<path>?
    468446 */
    469 int
     447static int
    470448RpTclLibElem (ClientData cdata, Tcl_Interp *interp,
    471     int objc, Tcl_Obj *CONST *objv)
     449    int objc, Tcl_Obj *const *objv)
    472450{
    473451    std::string path   = "";    // path of where to place data inside xml tree
     
    477455
    478456    RpLibrary* node    = NULL;
    479     rpMbrFxnPtr asProc = &RpLibrary::nodeComp;
     457    rpMbrFxnPtr asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    480458
    481459    // parse through -'d arguments
    482460    while (opt_objc--) {
    483         char *opt = Tcl_GetString(objv[nextart]);
     461        char *opt = Tcl_GetString(objv[nextarg]);
    484462        if (nextarg < objc && *opt == '-') {
    485463            if (strcmp(opt,"-as") == 0) {
     
    487465                if (nextarg < objc) {
    488466                    if (*opt == 'c' && strcmp(opt,"component") == 0) {
    489                         asProc = &RpLibrary::nodeComp;
     467                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    490468                        nextarg++;
    491469                    }
    492470                    else if (*opt == 'i' && strcmp(opt,"id") == 0) {
    493                         asProc = &RpLibrary::nodeId;
     471                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeId;
    494472                        nextarg++;
    495473                    }
    496474                    else if (*opt == 't' && strcmp(opt,"type") == 0) {
    497                         asProc = &RpLibrary::nodeType;
     475                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeType;
    498476                        nextarg++;
    499477                    }
    500478                    else if (*opt == 'p' && strcmp(opt,"path") == 0) {
    501                         asProc = &RpLibrary::nodePath;
     479                        asProc = (rpMbrFxnPtr)&RpLibrary::nodePath;
    502480                        nextarg++;
    503481                    }
     
    571549 * get ?<path>?
    572550 */
    573 int
     551static int
    574552RpTclLibGet (ClientData cdata, Tcl_Interp *interp,
    575     int objc, Tcl_Obj *CONST *objv)
     553    int objc, Tcl_Obj *const *objv)
    576554{
    577555
     
    619597 */
    620598
    621 int
     599static int
    622600RpTclLibInfo (ClientData cdata, Tcl_Interp *interp,
    623     int objc, Tcl_Obj *CONST *objv)
     601    int objc, Tcl_Obj *const *objv)
    624602{
    625603
     
    674652 */
    675653
    676 int
     654static int
    677655RpTclLibIsa (ClientData cdata, Tcl_Interp *interp,
    678     int objc, Tcl_Obj *CONST *objv)
     656    int objc, Tcl_Obj *const *objv)
    679657{
    680658
     
    708686}
    709687
    710 int
     688static int
    711689RpTclLibParent (ClientData cdata, Tcl_Interp *interp,
    712     int objc, Tcl_Obj *CONST *objv)
     690    int objc, Tcl_Obj *const *objv)
    713691{
    714692
     
    719697
    720698    RpLibrary* node    = NULL;
    721     rpMbrFxnPtr asProc = &RpLibrary::nodeComp;
     699    rpMbrFxnPtr asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    722700
    723701    // parse through -'d arguments
    724702    while (opt_objc--) {
    725         char *opt = Tcl_GetString(objv[nextart]);
     703        char *opt = Tcl_GetString(objv[nextarg]);
    726704        if (nextarg < objc && *opt == '-') {
    727705            if (strcmp(opt,"-as") == 0) {
     
    729707                if (nextarg < objc) {
    730708                    if (*opt == 'c' && strcmp(opt,"component") == 0) {
    731                         asProc = &RpLibrary::nodeComp;
     709                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeComp;
    732710                        nextarg++;
    733711                    }
    734712                    else if (*opt == 'i' && strcmp(opt,"id") == 0) {
    735                         asProc = &RpLibrary::nodeId;
     713                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeId;
    736714                        nextarg++;
    737715                    }
    738716                    else if (*opt == 't' && strcmp(opt,"type") == 0) {
    739                         asProc = &RpLibrary::nodeType;
     717                        asProc = (rpMbrFxnPtr)&RpLibrary::nodeType;
    740718                        nextarg++;
    741719                    }
    742720                    else if (*opt == 'p' && strcmp(opt,"path") == 0) {
    743                         asProc = &RpLibrary::nodePath;
     721                        asProc = (rpMbrFxnPtr)&RpLibrary::nodePath;
    744722                        nextarg++;
    745723                    }
     
    818796 * On failure, an error message is returned
    819797 */
    820 int
     798static int
    821799RpTclLibPut (ClientData cdata, Tcl_Interp *interp,
    822     int objc, Tcl_Obj *CONST *objv)
     800    int objc, Tcl_Obj *const *objv)
    823801{
    824802    std::string id     = "";    // id tag for the given path
     
    896874 * On failure, an error message is returned
    897875 */
    898 int
     876static int
    899877RpTclLibRemove (ClientData cdata, Tcl_Interp *interp,
    900     int objc, Tcl_Obj *CONST *objv)
     878    int objc, Tcl_Obj *const *objv)
    901879{
    902880    std::string path = std::string("");  // path of where to remove data from
     
    914892}
    915893
    916 int
     894static int
    917895RpTclLibResult (ClientData cdata, Tcl_Interp *interp,
    918     int objc, Tcl_Obj *CONST *objv)
     896    int objc, Tcl_Obj *const *objv)
    919897{
    920898    // call the rappture library result function
     
    940918 *   - second element is the normalization of the value at location <path>
    941919 */
    942 int
     920static int
    943921RpTclLibValue (ClientData cdata, Tcl_Interp *interp,
    944     int objc, Tcl_Obj *CONST *objv)
     922    int objc, Tcl_Obj *const *objv)
    945923{
    946924    std::list<std::string> valList;  // list to store the return value
     
    990968 */
    991969
    992 int
     970static int
    993971RpTclLibXml (ClientData cdata, Tcl_Interp *interp,
    994     int objc, Tcl_Obj *CONST *objv)
     972    int objc, Tcl_Obj *const *objv)
    995973{
    996974
     
    10301008 * None
    10311009 */
    1032 int
     1010static int
    10331011RpTclResult (ClientData cdata, Tcl_Interp *interp,
    1034     int objc, Tcl_Obj *CONST *objv)
     1012    int objc, Tcl_Obj *const *objv)
    10351013{
    10361014    // parse through command line options
  • trunk/lang/tcl/src/RpRlimit.c

    r1017 r1018  
    1616 */
    1717#include <tcl.h>
     18#include <string.h>
    1819#ifndef _WIN32
    1920#include <sys/time.h>
     
    2324#endif
    2425
    25 #include "bltInt.h"
    26 
    27 static int RpRlimitCmd _ANSI_ARGS_((ClientData cdata,
    28     Tcl_Interp *interp, int argc, CONST84 char *argv[]));
    29 static int RpRlimitGetOp _ANSI_ARGS_((ClientData cdata,
    30     Tcl_Interp *interp, int argc, char *argv[]));
    31 static int RpRlimitSetOp _ANSI_ARGS_((ClientData cdata,
    32     Tcl_Interp *interp, int argc, char *argv[]));
    33 static int RpRlimitOptionError _ANSI_ARGS_((Tcl_Interp *interp,
    34     char *option));
     26#include <errno.h>
     27#include "RpOp.h"
     28
     29static Tcl_ObjCmdProc RpRlimitCmd;
     30static Tcl_ObjCmdProc RpRlimitGetOp;
     31static Tcl_ObjCmdProc RpRlimitSetOp;
     32static int RpRlimitOptionError(Tcl_Interp *interp, const char *string);
    3533
    3634/*
    3735 * rlimit subcommands:
    3836 */
    39 static Blt_OpSpec rlimitOps[] = {
    40     {"get", 1, (Blt_Op)RpRlimitGetOp, 2, 4, "?-soft|-hard? ?option?",},
    41     {"set", 1, (Blt_Op)RpRlimitSetOp, 2, 0, "?option value ...?",},
     37static Rp_OpSpec rlimitOps[] = {
     38    {"get", 1, RpRlimitGetOp, 2, 4, "?-soft|-hard? ?option?",},
     39    {"set", 1, RpRlimitSetOp, 2, 0, "?option value ...?",},
    4240};
    43 static int nRlimitOps = sizeof(rlimitOps) / sizeof(Blt_OpSpec);
     41static int nRlimitOps = sizeof(rlimitOps) / sizeof(Rp_OpSpec);
    4442
    4543/*
     
    6260 *  RpRlimit_Init()
    6361 *
    64  *  Called in RapptureGUI_Init() to initialize the commands defined
     62 *  Called in Rappture_Init() to initialize the commands defined
    6563 *  in this file.
    6664 * ------------------------------------------------------------------------
     
    7068    Tcl_Interp *interp;  /* interpreter being initialized */
    7169{
    72     Tcl_CreateCommand(interp, "::Rappture::rlimit",
    73         RpRlimitCmd, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
    74 
     70    Tcl_CreateObjCommand(interp, "::Rappture::rlimit", RpRlimitCmd, NULL, NULL);
    7571    return TCL_OK;
    7672}
     
    9187 */
    9288static int
    93 RpRlimitCmd(cdata, interp, argc, argv)
     89RpRlimitCmd(cdata, interp, objc, objv)
    9490    ClientData cdata;         /* not used */
    9591    Tcl_Interp *interp;       /* interpreter handling this request */
    96     int argc;                 /* number of command line args */
    97     CONST84 char *argv[];     /* strings for command line args */
    98 {
    99     Blt_Op proc;
    100 
    101     proc = Blt_GetOp(interp, nRlimitOps, rlimitOps, BLT_OP_ARG1,
    102         argc, (char**)argv, 0);
    103 
     92    int objc;                 /* number of command line args */
     93    Tcl_Obj *const *objv;     /* strings for command line args */
     94{
     95    Tcl_ObjCmdProc *proc;
     96
     97    proc = Rp_GetOpFromObj(interp, nRlimitOps, rlimitOps, RP_OP_ARG1,
     98        objc, objv, 0);
    10499    if (proc == NULL) {
    105100        return TCL_ERROR;
    106101    }
    107     return (*proc)(cdata, interp, argc, argv);
     102    return (*proc)(cdata, interp, objc, objv);
    108103}
    109104
     
    122117 */
    123118static int
    124 RpRlimitGetOp(cdata, interp, argc, argv)
     119RpRlimitGetOp(cdata, interp, objc, objv)
    125120    ClientData cdata;         /* not used */
    126121    Tcl_Interp *interp;       /* interpreter handling this request */
    127     int argc;                 /* number of command line args */
    128     char *argv[];             /* strings for command line args */
     122    int objc;                 /* number of command line args */
     123    Tcl_Obj *const *objv;     /* strings for command line args */
    129124{
    130125    int hardlim = 0;  /* default: use -soft limit */
    131126    int nextarg = 2;  /* start with this arg */
    132 
     127    Tcl_Obj *objPtr;
    133128    int i, status;
    134129    struct rlimit rvals;
    135130    rlim_t *rvalptr;
    136     char buffer[64];
    137 
    138     if (nextarg < argc && *argv[nextarg] == '-') {
    139         if (strcmp(argv[nextarg],"-soft") == 0) {
    140             hardlim = 0;
    141             nextarg++;
    142         }
    143         else if (strcmp(argv[nextarg],"-hard") == 0) {
    144             hardlim = 1;
    145             nextarg++;
    146         }
    147         else {
    148             Tcl_AppendResult(interp, "bad option \"", argv[nextarg],
     131 
     132    if (nextarg < objc) {
     133        const char *string;
     134
     135        string = Tcl_GetString(objv[nextarg]);
     136        if (string[0] == '-') {
     137            if (strcmp(string,"-soft") == 0) {
     138                hardlim = 0;
     139                nextarg++;
     140            } else if (strcmp(string,"-hard") == 0) {
     141                hardlim = 1;
     142                nextarg++;
     143            } else {
     144                Tcl_AppendResult(interp, "bad option \"", string,
    149145                "\": should be -soft or -hard", (char*)NULL);
    150             return TCL_ERROR;
     146                return TCL_ERROR;
     147            }
    151148        }
    152149    }
     
    155152     * No args?  Then return limits for all options.
    156153     */
    157     if (nextarg >= argc) {
     154    if (nextarg >= objc) {
     155        Tcl_Obj *listObjPtr;
     156
     157        listObjPtr = Tcl_NewListObj(0, NULL);
    158158        for (i=0; rlimitOptions[i].name != NULL; i++) {
     159            Tcl_Obj *objPtr;
    159160            status = getrlimit(rlimitOptions[i].resid, &rvals);
    160161            if (status != 0) {
     
    169170                rvalptr = &rvals.rlim_cur;
    170171            }
    171 
    172             Tcl_AppendElement(interp, rlimitOptions[i].name);
     172            objPtr = Tcl_NewStringObj(rlimitOptions[i].name, -1);
     173            Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    173174            if (*rvalptr == RLIM_INFINITY) {
    174                 Tcl_AppendElement(interp, "unlimited");
     175                objPtr = Tcl_NewStringObj("unlimited", -1);
    175176            } else {
    176                 sprintf(buffer, "%lu", (unsigned long)*rvalptr);
    177                 Tcl_AppendElement(interp, buffer);
    178             }
    179         }
     177                objPtr = Tcl_NewLongObj((unsigned long)*rvalptr);
     178            }
     179            Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     180        }
     181        Tcl_SetObjResult(interp, listObjPtr);
    180182        return TCL_OK;
    181183    }
     
    185187     */
    186188    for (i=0; rlimitOptions[i].name != NULL; i++) {
    187         if (strcmp(argv[nextarg], rlimitOptions[i].name) == 0) {
     189        const char *string;
     190
     191        string = Tcl_GetString(objv[nextarg]);
     192        if (strcmp(string, rlimitOptions[i].name) == 0) {
    188193            break;
    189194        }
    190195    }
    191196    if (rlimitOptions[i].name == NULL) {
    192         return RpRlimitOptionError(interp, argv[nextarg]);
     197        const char *string;
     198
     199        string = Tcl_GetString(objv[nextarg]);
     200        return RpRlimitOptionError(interp, string);
    193201    }
    194202
     
    207215
    208216    if (*rvalptr == RLIM_INFINITY) {
    209         Tcl_SetResult(interp, "unlimited", TCL_STATIC);
     217        objPtr = Tcl_NewStringObj("unlimited", -1);
    210218    } else {
    211         sprintf(buffer, "%lu", (unsigned long)*rvalptr);
    212         Tcl_SetResult(interp, buffer, TCL_VOLATILE);
    213     }
     219        objPtr = Tcl_NewLongObj((unsigned long)*rvalptr);
     220    }
     221    Tcl_SetObjResult(interp, objPtr);
    214222    return TCL_OK;
    215223}
     
    229237 */
    230238static int
    231 RpRlimitSetOp(cdata, interp, argc, argv)
     239RpRlimitSetOp(cdata, interp, objc, objv)
    232240    ClientData cdata;         /* not used */
    233241    Tcl_Interp *interp;       /* interpreter handling this request */
    234     int argc;                 /* number of command line args */
    235     char *argv[];             /* strings for command line args */
     242    int objc;                 /* number of command line args */
     243    Tcl_Obj *const *objv;   /* strings for command line args */
    236244{
    237245    int i, n, lim, status;
     
    239247    rlim_t newval;
    240248
    241     for (n=2; n < argc; n += 2) {
    242         if (n+1 >= argc) {
     249    for (n=2; n < objc; n += 2) {
     250        const char *name, *value;
     251
     252        name = Tcl_GetString(objv[n]);
     253        if (n+1 >= objc) {
    243254            Tcl_AppendResult(interp, "missing value for option \"",
    244                 argv[n], "\"", (char*)NULL);
     255                name, "\"", (char*)NULL);
    245256            return TCL_ERROR;
    246257        }
    247         if (strcmp(argv[n+1],"unlimited") == 0) {
     258        value = Tcl_GetString(objv[n+1]);
     259        if (strcmp(value, "unlimited") == 0) {
    248260            newval = RLIM_INFINITY;
    249         }
    250         else if (Tcl_GetInt(interp, argv[n+1], &lim) == TCL_OK) {
     261        } else if (Tcl_GetIntFromObj(interp, objv[n+1], &lim) == TCL_OK) {
    251262            if (lim < 0) {
    252263                Tcl_ResetResult(interp);
    253                 Tcl_AppendResult(interp, "bad value \"", argv[n+1],
     264                Tcl_AppendResult(interp, "bad value \"", value,
    254265                    "\": should be integer >= 0 or \"unlimited\"",
    255266                    (char*)NULL);
     
    257268            }
    258269            newval = (rlim_t)lim;
    259         }
    260         else {
     270        } else {
    261271            Tcl_ResetResult(interp);
    262             Tcl_AppendResult(interp, "bad value \"", argv[n+1],
     272            Tcl_AppendResult(interp, "bad value \"", value,
    263273                "\": should be integer >= 0 or \"unlimited\"", (char*)NULL);
    264274            return TCL_ERROR;
     
    269279         */
    270280        for (i=0; rlimitOptions[i].name != NULL; i++) {
    271             if (strcmp(argv[n], rlimitOptions[i].name) == 0) {
     281            if (strcmp(name, rlimitOptions[i].name) == 0) {
    272282                break;
    273283            }
    274284        }
    275285        if (rlimitOptions[i].name == NULL) {
    276             return RpRlimitOptionError(interp, argv[n]);
     286            return RpRlimitOptionError(interp, name);
    277287        }
    278288        status = getrlimit(rlimitOptions[i].resid, &rvals);
     
    281291            status = setrlimit(rlimitOptions[i].resid, &rvals);
    282292        }
    283 
    284293        if (status == EPERM) {
    285294            Tcl_ResetResult(interp);
    286             Tcl_AppendResult(interp, "value \"", argv[n+1],
    287                 "\" set too high for option \"", argv[n],
     295            Tcl_AppendResult(interp, "value \"", value,
     296                "\" set too high for option \"", name,
    288297                (char*)NULL);
    289298            return TCL_ERROR;
    290         }
    291         else if (status != 0) {
     299        } else if (status != 0) {
    292300            Tcl_ResetResult(interp);
    293301            Tcl_AppendResult(interp, "unexpected rlimit failure",
     
    311319RpRlimitOptionError(interp, option)
    312320    Tcl_Interp *interp;       /* interpreter handling this request */
    313     char *option;             /* bad option supplied by the user */
     321    const char *option;       /* bad option supplied by the user */
    314322{
    315323    int i;
  • trunk/lang/tcl/src/RpRusage.c

    r1017 r1018  
    1616 */
    1717#include <tcl.h>
     18#include <string.h>
    1819#ifndef WIN32
    1920#include <sys/time.h>
     
    2324#endif
    2425
    25 #include "bltInt.h"
     26#include "RpOp.h"
    2627
    2728/*
     
    3738
    3839
    39 static int RpRusageCmd _ANSI_ARGS_((ClientData cdata,
    40     Tcl_Interp *interp, int argc, CONST84 char *argv[]));
    41 static int RpRusageMarkOp _ANSI_ARGS_((ClientData cdata,
    42     Tcl_Interp *interp, int argc, char *argv[]));
    43 static int RpRusageMeasureOp _ANSI_ARGS_((ClientData cdata,
    44     Tcl_Interp *interp, int argc, char *argv[]));
     40static Tcl_ObjCmdProc RpRusageCmd;
     41static Tcl_ObjCmdProc RpRusageMarkOp;
     42static Tcl_ObjCmdProc RpRusageMeasureOp;
     43
    4544static int RpRusageCapture _ANSI_ARGS_((Tcl_Interp *interp,
    4645    RpRusageStats *rptr));
     
    5150 * rusage subcommands:
    5251 */
    53 static Blt_OpSpec rusageOps[] = {
    54     {"mark", 2, (Blt_Op)RpRusageMarkOp, 2, 2, "",},
    55     {"measure", 2, (Blt_Op)RpRusageMeasureOp, 2, 2, "",},
     52static Rp_OpSpec rusageOps[] = {
     53    {"mark",    2, RpRusageMarkOp, 2, 2, "",},
     54    {"measure", 2, RpRusageMeasureOp, 2, 2, "",},
    5655};
    57 static int nRusageOps = sizeof(rusageOps) / sizeof(Blt_OpSpec);
     56static int nRusageOps = sizeof(rusageOps) / sizeof(Rp_OpSpec);
    5857
    5958/*
     
    6160 *  RpRusage_Init()
    6261 *
    63  *  Called in RapptureGUI_Init() to initialize the commands defined
     62 *  Called in Rappture_Init() to initialize the commands defined
    6463 *  in this file.
    6564 * ------------------------------------------------------------------------
     
    6968    Tcl_Interp *interp;  /* interpreter being initialized */
    7069{
    71     Tcl_CreateCommand(interp, "::Rappture::rusage",
    72         RpRusageCmd, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
     70    Tcl_CreateObjCommand(interp, "::Rappture::rusage", RpRusageCmd,
     71        NULL, NULL);
    7372
    7473    /* set an initial mark automatically */
    75     if (RpRusageMarkOp(NULL, interp, 0, (char**)NULL) != TCL_OK) {
     74    if (RpRusageMarkOp(NULL, interp, 0, (Tcl_Obj**)NULL) != TCL_OK) {
    7675        return TCL_ERROR;
    7776    }
     
    9897 */
    9998static int
    100 RpRusageCmd(cdata, interp, argc, argv)
     99RpRusageCmd(cdata, interp, objc, objv)
    101100    ClientData cdata;         /* not used */
    102101    Tcl_Interp *interp;       /* interpreter handling this request */
    103     int argc;                 /* number of command line args */
    104     CONST84 char *argv[];     /* strings for command line args */
    105 {
    106     Blt_Op proc;
    107 
    108     proc = Blt_GetOp(interp, nRusageOps, rusageOps, BLT_OP_ARG1,
    109         argc, (char**)argv, 0);
     102    int objc;                 /* number of command line args */
     103    Tcl_Obj *const *objv;     /* strings for command line args */
     104{
     105    Tcl_ObjCmdProc *proc;
     106
     107    proc = Rp_GetOpFromObj(interp, nRusageOps, rusageOps, RP_OP_ARG1,
     108        objc, objv, 0);
    110109
    111110    if (proc == NULL) {
    112111        return TCL_ERROR;
    113112    }
    114     return (*proc)(cdata, interp, argc, argv);
     113    return (*proc)(cdata, interp, objc, objv);
    115114}
    116115
     
    129128 */
    130129static int
    131 RpRusageMarkOp(cdata, interp, argc, argv)
     130RpRusageMarkOp(cdata, interp, objc, objv)
    132131    ClientData cdata;         /* not used */
    133132    Tcl_Interp *interp;       /* interpreter handling this request */
    134     int argc;                 /* number of command line args */
    135     char *argv[];             /* strings for command line args */
     133    int objc;                 /* number of command line args */
     134    Tcl_Obj *const *objv;             /* strings for command line args */
    136135{
    137136    return RpRusageCapture(interp, &RpRusage_MarkStats);
     
    153152 */
    154153static int
    155 RpRusageMeasureOp(cdata, interp, argc, argv)
     154RpRusageMeasureOp(cdata, interp, objc, objv)
    156155    ClientData cdata;         /* not used */
    157156    Tcl_Interp *interp;       /* interpreter handling this request */
    158     int argc;                 /* number of command line args */
    159     char *argv[];             /* strings for command line args */
     157    int objc;                 /* number of command line args */
     158    Tcl_Obj *const *objv;     /* strings for command line args */
    160159{
    161160    double tval;
  • trunk/lang/tcl/src/RpSignal.c

    r1017 r1018  
    1919#include <signal.h>
    2020
    21 static int RpSignalCmd _ANSI_ARGS_((ClientData cdata,
    22     Tcl_Interp *interp, int argc, CONST84 char *argv[]));
     21static Tcl_CmdProc RpSignalCmd;
    2322static void RpSignalHandler _ANSI_ARGS_((int signum));
    2423static int RpSignalOptionError _ANSI_ARGS_((Tcl_Interp *interp,
     
    8685 *  RpSignal_Init()
    8786 *
    88  *  Called in RapptureGUI_Init() to initialize the commands defined
     87 *  Called in Rappture_Init() to initialize the commands defined
    8988 *  in this file.
    9089 * ------------------------------------------------------------------------
  • trunk/lang/tcl/src/RpUnitsTclInterface.cc

    r642 r1018  
    1515#include <tcl.h>
    1616#include "RpUnits.h"
    17 #include "RpUnitsTclInterface.h"
    18 
    19 #ifdef __cplusplus
    20 extern "C" {
    21 #endif
    22 
    23 // EXTERN int RapptureUnits_Init _ANSI_ARGS_((Tcl_Interp * interp));
    24 
    25 static int RpTclUnitsConvert    _ANSI_ARGS_((   ClientData cdata,
    26                                                 Tcl_Interp *interp,
    27                                                 int argc,
    28                                                 const char *argv[]    ));
    29 
    30 static int RpTclUnitsDesc       _ANSI_ARGS_((   ClientData cdata,
    31                                                 Tcl_Interp *interp,
    32                                                 int argc,
    33                                                 const char *argv[]    ));
    34 
    35 static int RpTclUnitsSysFor     _ANSI_ARGS_((   ClientData cdata,
    36                                                 Tcl_Interp *interp,
    37                                                 int argc,
    38                                                 const char *argv[]    ));
    39 
    40 static int RpTclUnitsSysAll     _ANSI_ARGS_((   ClientData cdata,
    41                                                 Tcl_Interp *interp,
    42                                                 int argc,
    43                                                 const char *argv[]    ));
    44 
    45 static int RpTclUnitsSearchFor  _ANSI_ARGS_((   ClientData cdata,
    46                                                 Tcl_Interp *interp,
    47                                                 int argc,
    48                                                 const char *argv[]    ));
    49 
    50 #ifdef __cplusplus
    51 }
    52 #endif
    53 
    54 
    55 
    56 
    57 
     17
     18extern "C" Tcl_AppInitProc RpUnits_Init;
     19
     20static Tcl_CmdProc RpTclUnitsConvert;
     21static Tcl_CmdProc RpTclUnitsDesc;
     22static Tcl_CmdProc RpTclUnitsSysFor;
     23static Tcl_CmdProc RpTclUnitsSysAll;
     24static Tcl_CmdProc RpTclUnitsSearchFor;
    5825
    5926
    6027/**********************************************************************/
    61 // FUNCTION: RapptureUnits_Init()
     28// FUNCTION: RpUnits_Init()
    6229/// Initializes the Rappture Units module and commands defined below
    6330/**
    64  * Called in RapptureGUI_Init() to initialize the Rappture Units module.
     31 * Called in Rappture_Init() to initialize the Rappture Units module.
    6532 * Initialized commands include:
    6633 * ::Rappture::Units::convert
     
    7138 */
    7239
    73 int
    74 RapptureUnits_Init(Tcl_Interp *interp)
     40extern "C" int
     41RpUnits_Init(Tcl_Interp *interp)
    7542{
    7643
  • trunk/lang/tcl/src/RpUtilsTclInterface.cc

    r665 r1018  
    1515#include <tcl.h>
    1616#include "RpUtils.h"
    17 #include "RpUtilsTclInterface.h"
    1817#include "stdlib.h"
    1918#include "string.h"
    2019
    21 #ifdef __cplusplus
    22 extern "C" {
    23 #endif
    24 
    25 // EXTERN int RapptureUnits_Init _ANSI_ARGS_((Tcl_Interp * interp));
    26 
    27 static int RpTclUtilsProgress   _ANSI_ARGS_((   ClientData cdata,
    28                                                 Tcl_Interp *interp,
    29                                                 int argc,
    30                                                 const char *argv[]    ));
    31 
    32 #ifdef __cplusplus
    33 }
    34 #endif
    35 
    36 
    37 
    38 
    39 
    40 
     20extern "C" Tcl_AppInitProc RpUtils_Init;
     21static Tcl_CmdProc RpTclUtilsProgress;
    4122
    4223/**********************************************************************/
    43 // FUNCTION: RapptureUtils_Init()
     24// FUNCTION: RpUtils_Init()
    4425/// Initializes the Rappture Utils module and commands defined below
    4526/**
     
    5031
    5132int
    52 RapptureUtils_Init(Tcl_Interp *interp)
     33RpUtils_Init(Tcl_Interp *interp)
    5334{
    5435
  • trunk/lang/tcl/tclconfig/mkindex.tcl

    r204 r1018  
    1414package require Itcl  ;# include itcl constructs in the index
    1515
    16 foreach dir $argv {
    17     auto_mkindex $dir *.tcl *.itcl
     16proc auto_mkindex { srcdir outfile patterns } {
     17    global errorCode errorInfo
     18
     19    if {[interp issafe]} {
     20        error "can't generate index within safe interpreter"
     21    }
     22
     23    set fid [open $outfile w]
     24
     25    set oldDir [pwd]
     26    cd $srcdir
     27    set srcdir [pwd]
     28
     29    append index "# Tcl autoload index file, version 2.0\n"
     30    append index "# This file is generated by the \"auto_mkindex\" command\n"
     31    append index "# and sourced to set up indexing information for one or\n"
     32    append index "# more commands.  Typically each line is a command that\n"
     33    append index "# sets an element in the auto_index array, where the\n"
     34    append index "# element name is the name of a command and the value is\n"
     35    append index "# a script that loads the command.\n\n"
     36    if {$patterns == ""} {
     37        set patterns *.tcl
     38    }
     39    auto_mkindex_parser::init
     40    foreach file [eval glob $patterns] {
     41        if {[catch {auto_mkindex_parser::mkindex $file} msg] == 0} {
     42            append index $msg
     43        } else {
     44            set code $errorCode
     45            set info $errorInfo
     46            cd $oldDir
     47            error $msg $info $code
     48        }
     49    }
     50    auto_mkindex_parser::cleanup
     51    puts -nonewline $fid $index
     52    close $fid
     53    cd $oldDir
    1854}
     55
     56set outfile "tclIndex"
     57set srcdir  "."
     58set args {}
     59for {set i 0} { $i < [llength $argv] } { incr i } {
     60    set arg [lindex $argv $i]
     61    if { $arg == "--outfile" } {
     62        incr i
     63        set outfile [lindex $argv $i]
     64        continue
     65    } elseif { $arg == "--srcdir" } {
     66        incr i
     67        set srcdir [lindex $argv $i]
     68        continue
     69    }
     70    lappend args $arg
     71}
     72
     73auto_mkindex $srcdir $outfile $args
     74if { ![file exists $outfile] } {
     75    exit 1
     76}
     77exit 0
  • trunk/lang/tcl/tclconfig/tcl.m4

    r618 r1018  
    1 # tcl.m4 --
    2 #
    3 #       This file provides a set of autoconf macros to help TEA-enable
    4 #       a Tcl extension.
    5 #
    6 # Copyright (c) 1999-2000 Ajuba Solutions.
    7 # Copyright (c) 2002-2005 ActiveState Corporation.
    8 #
    9 # See the file "license.terms" for information on usage and redistribution
    10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    11 #
    12 # RCS: @(#) $Id: tcl.m4,v 1.92 2006/05/26 19:15:38 das Exp $
    13 
    14 AC_PREREQ(2.50)
    15 
    16 dnl TEA extensions pass this us the version of TEA they think they
    17 dnl are compatible with (must be set in TEA_INIT below)
    18 dnl TEA_VERSION="3.5"
    19 
    20 # Possible values for key variables defined:
    21 #
    22 # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
    23 # TEA_PLATFORM        - windows unix
    24 #
    25 
    261#------------------------------------------------------------------------
    27 # TEA_PATH_TCLCONFIG --
     2# SC_PATH_TCLCONFIG --
    283#
    294#       Locate the tclConfig.sh file and perform a sanity check on
     
    4318#------------------------------------------------------------------------
    4419
    45 AC_DEFUN([TEA_PATH_TCLCONFIG], [
    46     dnl Make sure we are initialized
    47     AC_REQUIRE([TEA_INIT])
     20AC_DEFUN([SC_PATH_TCLCONFIG], [
    4821    #
    4922    # Ok, lets find the tcl configuration
     
    5528        # we reset no_tcl in case something fails here
    5629        no_tcl=true
    57         AC_ARG_WITH(tcl,
    58             AC_HELP_STRING([--with-tcl],
    59                 [directory containing tcl configuration (tclConfig.sh)]),
    60             with_tclconfig=${withval})
     30        AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
    6131        AC_MSG_CHECKING([for Tcl configuration])
    6232        AC_CACHE_VAL(ac_cv_c_tclconfig,[
     
    6434            # First check to see if --with-tcl was specified.
    6535            if test x"${with_tclconfig}" != x ; then
    66                 case ${with_tclconfig} in
    67                     */tclConfig.sh )
    68                         if test -f ${with_tclconfig}; then
    69                             AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
    70                             with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
    71                         fi ;;
    72                 esac
    7336                if test -f "${with_tclconfig}/tclConfig.sh" ; then
    7437                    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
     
    11477            fi
    11578
    116             # on Windows, check in common installation locations
    117             if test "${TEA_PLATFORM}" = "windows" \
    118                 -a x"${ac_cv_c_tclconfig}" = x ; then
    119                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
    120                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
    121                         ; do
    122                     if test -f "$i/tclConfig.sh" ; then
    123                         ac_cv_c_tclconfig=`(cd $i; pwd)`
    124                         break
    125                     fi
    126                 done
    127             fi
    128 
    12979            # check in a few common install locations
    13080            if test x"${ac_cv_c_tclconfig}" = x ; then
     
    171121
    172122#------------------------------------------------------------------------
    173 # TEA_PATH_TKCONFIG --
     123# SC_PATH_TKCONFIG --
    174124#
    175125#       Locate the tkConfig.sh file
     
    188138#------------------------------------------------------------------------
    189139
    190 AC_DEFUN([TEA_PATH_TKCONFIG], [
     140AC_DEFUN([SC_PATH_TKCONFIG], [
    191141    #
    192142    # Ok, lets find the tk configuration
     
    198148        # we reset no_tk in case something fails here
    199149        no_tk=true
    200         AC_ARG_WITH(tk,
    201             AC_HELP_STRING([--with-tk],
    202                 [directory containing tk configuration (tkConfig.sh)]),
    203             with_tkconfig=${withval})
     150        AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
    204151        AC_MSG_CHECKING([for Tk configuration])
    205152        AC_CACHE_VAL(ac_cv_c_tkconfig,[
     
    207154            # First check to see if --with-tkconfig was specified.
    208155            if test x"${with_tkconfig}" != x ; then
    209                 case ${with_tkconfig} in
    210                     */tkConfig.sh )
    211                         if test -f ${with_tkconfig}; then
    212                             AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
    213                             with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
    214                         fi ;;
    215                 esac
    216156                if test -f "${with_tkconfig}/tkConfig.sh" ; then
    217157                    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
     
    272212                done
    273213            fi
    274 
    275             # on Windows, check in common installation locations
    276             if test "${TEA_PLATFORM}" = "windows" \
    277                 -a x"${ac_cv_c_tkconfig}" = x ; then
    278                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
    279                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
    280                         ; do
    281                     if test -f "$i/tkConfig.sh" ; then
    282                         ac_cv_c_tkconfig=`(cd $i; pwd)`
    283                         break
    284                     fi
    285                 done
    286             fi
    287 
    288214            # check in a few other private locations
    289215            if test x"${ac_cv_c_tkconfig}" = x ; then
     
    314240
    315241#------------------------------------------------------------------------
    316 # TEA_LOAD_TCLCONFIG --
     242# SC_LOAD_TCLCONFIG --
    317243#
    318244#       Load the tclConfig.sh file
     
    332258#------------------------------------------------------------------------
    333259
    334 AC_DEFUN([TEA_LOAD_TCLCONFIG], [
     260AC_DEFUN([SC_LOAD_TCLCONFIG], [
    335261    AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])
    336262
     
    386312
    387313    AC_SUBST(TCL_VERSION)
     314    AC_SUBST(TCL_PATCH_LEVEL)
    388315    AC_SUBST(TCL_BIN_DIR)
    389316    AC_SUBST(TCL_SRC_DIR)
     
    396323    AC_SUBST(TCL_STUB_LIB_FLAG)
    397324    AC_SUBST(TCL_STUB_LIB_SPEC)
    398 
    399     AC_SUBST(TCL_LIBS)
    400     AC_SUBST(TCL_DEFS)
    401     AC_SUBST(TCL_EXTRA_CFLAGS)
    402     AC_SUBST(TCL_LD_FLAGS)
    403     AC_SUBST(TCL_SHLIB_LD_LIBS)
    404325])
    405326
    406327#------------------------------------------------------------------------
    407 # TEA_LOAD_TKCONFIG --
     328# SC_LOAD_TKCONFIG --
    408329#
    409330#       Load the tkConfig.sh file
     
    420341#------------------------------------------------------------------------
    421342
    422 AC_DEFUN([TEA_LOAD_TKCONFIG], [
     343AC_DEFUN([SC_LOAD_TKCONFIG], [
    423344    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
    424345
     
    473394    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
    474395
    475     # Ensure windowingsystem is defined
    476     if test "${TEA_PLATFORM}" = "unix" ; then
    477         case ${TK_DEFS} in
    478             *MAC_OSX_TK*)
    479                 AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
    480                 TEA_WINDOWINGSYSTEM="aqua"
    481                 ;;
    482             *)
    483                 TEA_WINDOWINGSYSTEM="x11"
    484                 ;;
    485         esac
    486     elif test "${TEA_PLATFORM}" = "windows" ; then
    487         TEA_WINDOWINGSYSTEM="win32"
    488     fi
    489 
    490396    AC_SUBST(TK_VERSION)
    491397    AC_SUBST(TK_BIN_DIR)
     
    499405    AC_SUBST(TK_STUB_LIB_FLAG)
    500406    AC_SUBST(TK_STUB_LIB_SPEC)
    501 
    502     AC_SUBST(TK_LIBS)
    503     AC_SUBST(TK_XINCLUDES)
    504407])
    505408
    506409#------------------------------------------------------------------------
    507 # TEA_ENABLE_SHARED --
     410# SC_PROG_TCLSH
     411#       Locate a tclsh shell installed on the system path. This macro
     412#       will only find a Tcl shell that already exists on the system.
     413#       It will not find a Tcl shell in the Tcl build directory or
     414#       a Tcl shell that has been installed from the Tcl build directory.
     415#       If a Tcl shell can't be located on the PATH, then TCLSH_PROG will
     416#       be set to "". Extensions should take care not to create Makefile
     417#       rules that are run by default and depend on TCLSH_PROG. An
     418#       extension can't assume that an executable Tcl shell exists at
     419#       build time.
     420#
     421# Arguments
     422#       none
     423#
     424# Results
     425#       Subst's the following values:
     426#               TCLSH_PROG
     427#------------------------------------------------------------------------
     428
     429AC_DEFUN([SC_PROG_TCLSH], [
     430    AC_MSG_CHECKING([for tclsh])
     431    AC_CACHE_VAL(ac_cv_path_tclsh, [
     432        search_path=`echo ${PATH} | sed -e 's/:/ /g'`
     433        for dir in $search_path ; do
     434            for j in `ls -r $dir/tclsh[[8-9]]* 2> /dev/null` \
     435                    `ls -r $dir/tclsh* 2> /dev/null` ; do
     436                if test x"$ac_cv_path_tclsh" = x ; then
     437                    if test -f "$j" ; then
     438                        ac_cv_path_tclsh=$j
     439                        break
     440                    fi
     441                fi
     442            done
     443        done
     444    ])
     445
     446    if test -f "$ac_cv_path_tclsh" ; then
     447        TCLSH_PROG="$ac_cv_path_tclsh"
     448        AC_MSG_RESULT([$TCLSH_PROG])
     449    else
     450        # It is not an error if an installed version of Tcl can't be located.
     451        TCLSH_PROG=""
     452        AC_MSG_RESULT([No tclsh found on PATH])
     453    fi
     454    AC_SUBST(TCLSH_PROG)
     455])
     456
     457#------------------------------------------------------------------------
     458# SC_BUILD_TCLSH
     459#       Determine the fully qualified path name of the tclsh executable
     460#       in the Tcl build directory. This macro will correctly determine
     461#       the name of the tclsh executable even if tclsh has not yet
     462#       been built in the build directory. The build tclsh must be used
     463#       when running tests from an extension build directory. It is not
     464#       correct to use the TCLSH_PROG in cases like this.
     465#
     466# Arguments
     467#       none
     468#
     469# Results
     470#       Subst's the following values:
     471#               BUILD_TCLSH
     472#------------------------------------------------------------------------
     473
     474AC_DEFUN([SC_BUILD_TCLSH], [
     475    AC_MSG_CHECKING([for tclsh in Tcl build directory])
     476    BUILD_TCLSH=${TCL_BIN_DIR}/tclsh
     477    AC_MSG_RESULT([$BUILD_TCLSH])
     478    AC_SUBST(BUILD_TCLSH)
     479])
     480
     481#------------------------------------------------------------------------
     482# SC_ENABLE_SHARED --
    508483#
    509484#       Allows the building of shared libraries
     
    525500#------------------------------------------------------------------------
    526501
    527 AC_DEFUN([TEA_ENABLE_SHARED], [
     502AC_DEFUN([SC_ENABLE_SHARED], [
    528503    AC_MSG_CHECKING([how to build libraries])
    529504    AC_ARG_ENABLE(shared,
    530         AC_HELP_STRING([--enable-shared],
    531             [build and link with shared libraries (default: on)]),
     505        [  --enable-shared         build and link with shared libraries [--enable-shared]],
    532506        [tcl_ok=$enableval], [tcl_ok=yes])
    533507
     
    545519        AC_MSG_RESULT([static])
    546520        SHARED_BUILD=0
    547         AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
    548     fi
    549     AC_SUBST(SHARED_BUILD)
     521        AC_DEFINE(STATIC_BUILD)
     522    fi
    550523])
    551524
    552525#------------------------------------------------------------------------
    553 # TEA_ENABLE_THREADS --
    554 #
    555 #       Specify if thread support should be enabled.  If "yes" is specified
    556 #       as an arg (optional), threads are enabled by default, "no" means
    557 #       threads are disabled.  "yes" is the default.
    558 #
    559 #       TCL_THREADS is checked so that if you are compiling an extension
    560 #       against a threaded core, your extension must be compiled threaded
    561 #       as well.
    562 #
    563 #       Note that it is legal to have a thread enabled extension run in a
    564 #       threaded or non-threaded Tcl core, but a non-threaded extension may
    565 #       only run in a non-threaded Tcl core.
     526# SC_ENABLE_FRAMEWORK --
     527#
     528#       Allows the building of shared libraries into frameworks
    566529#
    567530# Arguments:
     
    571534#
    572535#       Adds the following arguments to configure:
     536#               --enable-framework=yes|no
     537#
     538#       Sets the following vars:
     539#               FRAMEWORK_BUILD Value of 1 or 0
     540#------------------------------------------------------------------------
     541
     542AC_DEFUN([SC_ENABLE_FRAMEWORK], [
     543    if test "`uname -s`" = "Darwin" ; then
     544        AC_MSG_CHECKING([how to package libraries])
     545        AC_ARG_ENABLE(framework,
     546            [  --enable-framework      package shared libraries in MacOSX frameworks [--disable-framework]],
     547            [enable_framework=$enableval], [enable_framework=no])
     548        if test $enable_framework = yes; then
     549            if test $SHARED_BUILD = 0; then
     550                AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes])
     551                enable_framework=no
     552            fi
     553            if test $tcl_corefoundation = no; then
     554                AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available])
     555                enable_framework=no
     556            fi
     557        fi
     558        if test $enable_framework = yes; then
     559            AC_MSG_RESULT([framework])
     560            FRAMEWORK_BUILD=1
     561        else
     562            if test $SHARED_BUILD = 1; then
     563                AC_MSG_RESULT([shared library])
     564            else
     565                AC_MSG_RESULT([static library])
     566            fi
     567            FRAMEWORK_BUILD=0
     568        fi
     569    fi
     570])
     571
     572#------------------------------------------------------------------------
     573# SC_ENABLE_THREADS --
     574#
     575#       Specify if thread support should be enabled.  TCL_THREADS is
     576#       checked so that if you are compiling an extension against a
     577#       threaded core, your extension must be compiled threaded as well.
     578#
     579# Arguments:
     580#       none
     581#       
     582# Results:
     583#
     584#       Adds the following arguments to configure:
    573585#               --enable-threads
    574586#
     
    583595#------------------------------------------------------------------------
    584596
    585 AC_DEFUN([TEA_ENABLE_THREADS], [
    586     AC_ARG_ENABLE(threads,
    587         AC_HELP_STRING([--enable-threads],
    588             [build with threads]),
    589         [tcl_ok=$enableval], [tcl_ok=yes])
    590 
    591     if test "${enable_threads+set}" = set; then
    592         enableval="$enable_threads"
    593         tcl_ok=$enableval
    594     else
    595         tcl_ok=yes
     597AC_DEFUN([SC_ENABLE_THREADS], [
     598    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
     599        [tcl_ok=$enableval], [tcl_ok=no])
     600
     601    if test "${TCL_THREADS}" = 1; then
     602        tcl_threaded_core=1;
    596603    fi
    597604
    598605    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
    599606        TCL_THREADS=1
    600 
    601         if test "${TEA_PLATFORM}" != "windows" ; then
    602             # We are always OK on Windows, so check what this platform wants:
    603    
    604             # USE_THREAD_ALLOC tells us to try the special thread-based
    605             # allocator that significantly reduces lock contention
    606             AC_DEFINE(USE_THREAD_ALLOC, 1,
    607                 [Do we want to use the threaded memory allocator?])
    608             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    609             if test "`uname -s`" = "SunOS" ; then
    610                 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    611                         [Do we really want to follow the standard? Yes we do!])
    612             fi
    613             AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
    614             AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
    615             if test "$tcl_ok" = "no"; then
    616                 # Check a little harder for __pthread_mutex_init in the same
    617                 # library, as some systems hide it there until pthread.h is
    618                 # defined.  We could alternatively do an AC_TRY_COMPILE with
    619                 # pthread.h, but that will work with libpthread really doesn't
    620                 # exist, like AIX 4.2.  [Bug: 4359]
    621                 AC_CHECK_LIB(pthread, __pthread_mutex_init,
    622                     tcl_ok=yes, tcl_ok=no)
    623             fi
    624 
     607        # USE_THREAD_ALLOC tells us to try the special thread-based
     608        # allocator that significantly reduces lock contention
     609        AC_DEFINE(USE_THREAD_ALLOC)
     610        AC_DEFINE(_REENTRANT)
     611        if test "`uname -s`" = "SunOS" ; then
     612            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
     613        fi
     614        AC_DEFINE(_THREAD_SAFE)
     615        AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
     616        if test "$tcl_ok" = "no"; then
     617            # Check a little harder for __pthread_mutex_init in the same
     618            # library, as some systems hide it there until pthread.h is
     619            # defined.  We could alternatively do an AC_TRY_COMPILE with
     620            # pthread.h, but that will work with libpthread really doesn't
     621            # exist, like AIX 4.2.  [Bug: 4359]
     622            AC_CHECK_LIB(pthread, __pthread_mutex_init,
     623                tcl_ok=yes, tcl_ok=no)
     624        fi
     625
     626        if test "$tcl_ok" = "yes"; then
     627            # The space is needed
     628            THREADS_LIBS=" -lpthread"
     629        else
     630            AC_CHECK_LIB(pthreads, pthread_mutex_init,
     631                tcl_ok=yes, tcl_ok=no)
    625632            if test "$tcl_ok" = "yes"; then
    626633                # The space is needed
    627                 THREADS_LIBS=" -lpthread"
     634                THREADS_LIBS=" -lpthreads"
    628635            else
    629                 AC_CHECK_LIB(pthreads, pthread_mutex_init,
     636                AC_CHECK_LIB(c, pthread_mutex_init,
    630637                    tcl_ok=yes, tcl_ok=no)
    631                 if test "$tcl_ok" = "yes"; then
    632                     # The space is needed
    633                     THREADS_LIBS=" -lpthreads"
    634                 else
    635                     AC_CHECK_LIB(c, pthread_mutex_init,
     638                if test "$tcl_ok" = "no"; then
     639                    AC_CHECK_LIB(c_r, pthread_mutex_init,
    636640                        tcl_ok=yes, tcl_ok=no)
    637                     if test "$tcl_ok" = "no"; then
    638                         AC_CHECK_LIB(c_r, pthread_mutex_init,
    639                             tcl_ok=yes, tcl_ok=no)
    640                         if test "$tcl_ok" = "yes"; then
    641                             # The space is needed
    642                             THREADS_LIBS=" -pthread"
    643                         else
    644                             TCL_THREADS=0
    645                             AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled])
    646                         fi
     641                    if test "$tcl_ok" = "yes"; then
     642                        # The space is needed
     643                        THREADS_LIBS=" -pthread"
     644                    else
     645                        TCL_THREADS=0
     646                        AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
    647647                    fi
    648648                fi
    649649            fi
    650650        fi
     651
     652        # Does the pthread-implementation provide
     653        # 'pthread_attr_setstacksize' ?
     654
     655        ac_saved_libs=$LIBS
     656        LIBS="$LIBS $THREADS_LIBS"
     657        AC_CHECK_FUNCS(pthread_attr_setstacksize)
     658        AC_CHECK_FUNCS(pthread_atfork)
     659        LIBS=$ac_saved_libs
    651660    else
    652661        TCL_THREADS=0
     
    656665    if test "${TCL_THREADS}" = 1; then
    657666        AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
    658         AC_MSG_RESULT([yes (default)])
     667        if test "${tcl_threaded_core}" = 1; then
     668            AC_MSG_RESULT([yes (threaded core)])
     669        else
     670            AC_MSG_RESULT([yes])
     671        fi
    659672    else
    660         AC_MSG_RESULT([no])
    661     fi
    662     # TCL_THREADS sanity checking.  See if our request for building with
    663     # threads is the same as the way Tcl was built.  If not, warn the user.
    664     case ${TCL_DEFS} in
    665         *THREADS=1*)
    666             if test "${TCL_THREADS}" = "0"; then
    667                 AC_MSG_WARN([
    668     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
    669     that IS thread-enabled.  It is recommended to use --enable-threads.])
    670             fi
    671             ;;
    672         *)
    673             if test "${TCL_THREADS}" = "1"; then
    674                 AC_MSG_WARN([
    675     --enable-threads requested, but building against a Tcl that is NOT
    676     thread-enabled.  This is an OK configuration that will also run in
    677     a thread-enabled core.])
    678             fi
    679             ;;
    680     esac
     673        AC_MSG_RESULT([no (default)])
     674    fi
     675
    681676    AC_SUBST(TCL_THREADS)
    682677])
    683678
    684679#------------------------------------------------------------------------
    685 # TEA_ENABLE_SYMBOLS --
     680# SC_ENABLE_SYMBOLS --
    686681#
    687682#       Specify if debugging symbols should be used.
    688 #       Memory (TCL_MEM_DEBUG) debugging can also be enabled.
     683#       Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
     684#       can also be enabled.
    689685#
    690686# Arguments:
    691687#       none
    692688#       
    693 #       TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
    694 #       the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
    695689#       Requires the following vars to be set in the Makefile:
    696 #               CFLAGS_DEFAULT
    697 #               LDFLAGS_DEFAULT
     690#               CFLAGS_DEBUG
     691#               CFLAGS_OPTIMIZE
     692#               LDFLAGS_DEBUG
     693#               LDFLAGS_OPTIMIZE
    698694#       
    699695# Results:
     
    707703#               LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
    708704#                               Sets to $(LDFLAGS_OPTIMIZE) if false
    709 #               DBGX            Formerly used as debug library extension;
    710 #                               always blank now.
     705#               DBGX            Debug library extension
    711706#
    712707#------------------------------------------------------------------------
    713708
    714 AC_DEFUN([TEA_ENABLE_SYMBOLS], [
    715     dnl Make sure we are initialized
    716     AC_REQUIRE([TEA_CONFIG_CFLAGS])
     709AC_DEFUN([SC_ENABLE_SYMBOLS], [
    717710    AC_MSG_CHECKING([for build with symbols])
    718     AC_ARG_ENABLE(symbols,
    719         AC_HELP_STRING([--enable-symbols],
    720             [build with debugging symbols (default: off)]),
    721         [tcl_ok=$enableval], [tcl_ok=no])
    722     DBGX=""
     711    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
     712# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
    723713    if test "$tcl_ok" = "no"; then
    724         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
    725         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
     714        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
     715        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
     716        DBGX=""
    726717        AC_MSG_RESULT([no])
    727718    else
    728         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
    729         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
     719        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
     720        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
     721        DBGX=g
    730722        if test "$tcl_ok" = "yes"; then
    731723            AC_MSG_RESULT([yes (standard debugging)])
    732724        fi
    733725    fi
    734     if test "${TEA_PLATFORM}" != "windows" ; then
    735         LDFLAGS_DEFAULT="${LDFLAGS}"
    736     fi
    737 
    738     AC_SUBST(TCL_DBGX)
    739726    AC_SUBST(CFLAGS_DEFAULT)
    740727    AC_SUBST(LDFLAGS_DEFAULT)
    741728
    742729    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
    743         AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
     730        AC_DEFINE(TCL_MEM_DEBUG)
     731    fi
     732
     733    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
     734        AC_DEFINE(TCL_COMPILE_DEBUG)
     735        AC_DEFINE(TCL_COMPILE_STATS)
    744736    fi
    745737
    746738    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
    747739        if test "$tcl_ok" = "all"; then
    748             AC_MSG_RESULT([enabled symbols mem debugging])
     740            AC_MSG_RESULT([enabled symbols mem compile debugging])
    749741        else
    750742            AC_MSG_RESULT([enabled $tcl_ok debugging])
     
    754746
    755747#------------------------------------------------------------------------
    756 # TEA_ENABLE_LANGINFO --
     748# SC_ENABLE_LANGINFO --
    757749#
    758750#       Allows use of modern nl_langinfo check for better l10n.
     
    772764#------------------------------------------------------------------------
    773765
    774 AC_DEFUN([TEA_ENABLE_LANGINFO], [
     766AC_DEFUN([SC_ENABLE_LANGINFO], [
    775767    AC_ARG_ENABLE(langinfo,
    776         AC_HELP_STRING([--enable-langinfo],
    777             [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
     768        [  --enable-langinfo      use nl_langinfo if possible to determine
     769                          encoding at startup, otherwise use old heuristic],
    778770        [langinfo_ok=$enableval], [langinfo_ok=yes])
    779771
     
    784776    AC_MSG_CHECKING([whether to use nl_langinfo])
    785777    if test "$langinfo_ok" = "yes"; then
    786         AC_CACHE_VAL(tcl_cv_langinfo_h,
     778        AC_CACHE_VAL(tcl_cv_langinfo_h, [
    787779            AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
    788                     [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no]))
     780                    [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
    789781        AC_MSG_RESULT([$tcl_cv_langinfo_h])
    790782        if test $tcl_cv_langinfo_h = yes; then
    791             AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
     783            AC_DEFINE(HAVE_LANGINFO)
    792784        fi
    793785    else
     
    797789
    798790#--------------------------------------------------------------------
    799 # TEA_CONFIG_SYSTEM
     791# SC_CONFIG_MANPAGES
     792#       
     793#       Decide whether to use symlinks for linking the manpages,
     794#       whether to compress the manpages after installation, and
     795#       whether to add a package name suffix to the installed
     796#       manpages to avoidfile name clashes.
     797#       If compression is enabled also find out what file name suffix
     798#       the given compression program is using.
     799#
     800# Arguments:
     801#       none
     802#
     803# Results:
     804#
     805#       Adds the following arguments to configure:
     806#               --enable-man-symlinks
     807#               --enable-man-compression=PROG
     808#               --enable-man-suffix[=STRING]
     809#
     810#       Defines the following variable:
     811#
     812#       MAN_FLAGS -     The apropriate flags for installManPage
     813#                       according to the user's selection.
     814#
     815#--------------------------------------------------------------------
     816
     817AC_DEFUN([SC_CONFIG_MANPAGES], [
     818    AC_MSG_CHECKING([whether to use symlinks for manpages])
     819    AC_ARG_ENABLE(man-symlinks,
     820            [  --enable-man-symlinks   use symlinks for the manpages],
     821        test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
     822        enableval="no")
     823    AC_MSG_RESULT([$enableval])
     824
     825    AC_MSG_CHECKING([whether to compress the manpages])
     826    AC_ARG_ENABLE(man-compression,
     827            [  --enable-man-compression=PROG
     828                      compress the manpages with PROG],
     829        [case $enableval in
     830            yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);;
     831            no)  ;;
     832            *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
     833        esac],
     834        enableval="no")
     835    AC_MSG_RESULT([$enableval])
     836    if test "$enableval" != "no"; then
     837        AC_MSG_CHECKING([for compressed file suffix])
     838        touch TeST
     839        $enableval TeST
     840        Z=`ls TeST* | sed 's/^....//'`
     841        rm -f TeST*
     842        MAN_FLAGS="$MAN_FLAGS --extension $Z"
     843        AC_MSG_RESULT([$Z])
     844    fi
     845
     846    AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
     847    AC_ARG_ENABLE(man-suffix,
     848            [  --enable-man-suffix=STRING
     849                      use STRING as a suffix to manpage file names
     850                      (default: $1)],
     851        [case $enableval in
     852            yes) enableval="$1" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
     853            no)  ;;
     854            *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
     855        esac],
     856        enableval="no")
     857    AC_MSG_RESULT([$enableval])
     858
     859    AC_SUBST(MAN_FLAGS)
     860])
     861
     862#--------------------------------------------------------------------
     863# SC_CONFIG_SYSTEM
    800864#
    801865#       Determine what the system is (some things cannot be easily checked
     
    814878#--------------------------------------------------------------------
    815879
    816 AC_DEFUN([TEA_CONFIG_SYSTEM], [
     880AC_DEFUN([SC_CONFIG_SYSTEM], [
    817881    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
    818         if test "${TEA_PLATFORM}" = "windows" ; then
    819             tcl_cv_sys_version=windows
    820         elif test -f /usr/lib/NextStep/software_version; then
     882        if test -f /usr/lib/NextStep/software_version; then
    821883            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
    822884        else
     
    830892
    831893                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
    832                     tcl_cv_sys_version=MP-RAS-`awk '{print [$]3}' /etc/.relid`
     894                    tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid`
    833895                fi
    834896                if test "`uname -s`" = "AIX" ; then
     
    842904
    843905#--------------------------------------------------------------------
    844 # TEA_CONFIG_CFLAGS
     906# SC_CONFIG_CFLAGS
    845907#
    846908#       Try to determine the proper flags to pass to the compiler
     
    870932#                       for shared libraries such as libtcl.so.  Depends on
    871933#                       the variable LIB_RUNTIME_DIR in the Makefile.
     934#       MAKE_LIB -      Command to execute to build the a library;
     935#                       differs when building shared or static.
     936#       MAKE_STUB_LIB -
     937#                       Command to execute to build a stub library.
     938#       INSTALL_LIB -   Command to execute to install a library;
     939#                       differs when building shared or static.
     940#       INSTALL_STUB_LIB -
     941#                       Command to execute to install a stub library.
     942#       STLIB_LD -      Base command to use for combining object files
     943#                       into a static library.
    872944#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
    873945#                       of a shared library (may request position-independent
     
    889961#                       extensions.  An empty string means we don't know how
    890962#                       to use shared libraries on this platform.
     963# TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
     964#  TK_SHLIB_LD_EXTRAS   for the build of Tcl and Tk, but not recorded in the
     965#                       tclConfig.sh, since they are only used for the build
     966#                       of Tcl and Tk.
     967#                       Examples: MacOS X records the library version and
     968#                       compatibility version in the shared library.  But
     969#                       of course the Tcl version of this is only used for Tcl.
    891970#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
    892971#                       in a static or shared library name, using the $VERSION variable
     
    917996#--------------------------------------------------------------------
    918997
    919 AC_DEFUN([TEA_CONFIG_CFLAGS], [
    920     dnl Make sure we are initialized
    921     AC_REQUIRE([TEA_INIT])
     998AC_DEFUN([SC_CONFIG_CFLAGS], [
    922999
    9231000    # Step 0.a: Enable 64 bit support?
    9241001
    9251002    AC_MSG_CHECKING([if 64bit support is requested])
    926     AC_ARG_ENABLE(64bit,
    927         AC_HELP_STRING([--enable-64bit],
    928             [enable 64bit support (default: off)]),
     1003    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)],
    9291004        [do64bit=$enableval], [do64bit=no])
    9301005    AC_MSG_RESULT([$do64bit])
     
    9331008
    9341009    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
    935     AC_ARG_ENABLE(64bit-vis,
    936         AC_HELP_STRING([--enable-64bit-vis],
    937             [enable 64bit Sparc VIS support (default: off)]),
     1010    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support],
    9381011        [do64bitVIS=$enableval], [do64bitVIS=no])
    9391012    AC_MSG_RESULT([$do64bitVIS])
     
    9441017    fi
    9451018
    946     # Step 0.c: Cross-compiling options for Windows/CE builds?
    947 
    948     if test "${TEA_PLATFORM}" = "windows" ; then
    949         AC_MSG_CHECKING([if Windows/CE build is requested])
    950         AC_ARG_ENABLE(wince,[  --enable-wince          enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
    951         AC_MSG_RESULT([$doWince])
    952     fi
    953 
    9541019    # Step 1: set the variable "system" to hold the name and version number
    9551020    # for the system.
    9561021
    957     TEA_CONFIG_SYSTEM
     1022    SC_CONFIG_SYSTEM
    9581023
    9591024    # Step 2: check for existence of -ldl library.  This is needed because
     
    9671032
    9681033    # Step 3: set configuration options based on system name and version.
    969     # This is similar to Tcl's unix/tcl.m4 except that we've added a
    970     # "windows" case.
    9711034
    9721035    do64bit_ok=no
    9731036    LDFLAGS_ORIG="$LDFLAGS"
    974     # When ld needs options to work in 64-bit mode, put them in
    975     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
    976     # is disabled by the user. [Bug 1016796]
    977     LDFLAGS_ARCH=""
    9781037    TCL_EXPORT_FILE_SUFFIX=""
    9791038    UNSHARED_LIB_SUFFIX=""
    980     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
    981     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
     1039    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
     1040    ECHO_VERSION='`echo ${VERSION}`'
    9821041    TCL_LIB_VERSIONS_OK=ok
    9831042    CFLAGS_DEBUG=-g
    9841043    CFLAGS_OPTIMIZE=-O
    9851044    if test "$GCC" = "yes" ; then
    986         CFLAGS_OPTIMIZE=-O2
    987         CFLAGS_WARNING="-Wall -Wno-implicit-int"
     1045        CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
    9881046    else
    9891047        CFLAGS_WARNING=""
     
    9951053dnl AC_CHECK_TOOL(AR, ar)
    9961054    AC_CHECK_PROG(AR, ar, ar)
     1055    if test "${AR}" = "" ; then
     1056        AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
     1057    fi
    9971058    STLIB_LD='${AR} cr'
    9981059    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     1060    PLAT_OBJS=""
     1061    PLAT_SRCS=""
    9991062    case $system in
    1000         windows)
    1001             # This is a 2-stage check to make sure we have the 64-bit SDK
    1002             # We have to know where the SDK is installed.
    1003             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
    1004             # MACHINE is IX86 for LINK, but this is used by the manifest,
    1005             # which requires x86|amd64|ia64.
    1006             MACHINE="X86"
    1007             if test "$do64bit" != "no" ; then
    1008                 if test "x${MSSDK}x" = "xx" ; then
    1009                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
    1010                 fi
    1011                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
    1012                 PATH64=""
    1013                 case "$do64bit" in
    1014                     amd64|x64|yes)
    1015                         MACHINE="AMD64" ; # default to AMD64 64-bit build
    1016                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
    1017                         ;;
    1018                     ia64)
    1019                         MACHINE="IA64"
    1020                         PATH64="${MSSDK}/Bin/Win64"
    1021                         ;;
    1022                 esac
    1023                 if test ! -d "${PATH64}" ; then
    1024                     AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
    1025                     AC_MSG_WARN([Ensure latest Platform SDK is installed])
    1026                     do64bit="no"
    1027                 else
    1028                     AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
    1029                     do64bit_ok="yes"
    1030                 fi
    1031             fi
    1032 
    1033             if test "$doWince" != "no" ; then
    1034                 if test "$do64bit" != "no" ; then
    1035                     AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
    1036                 fi
    1037                 if test "$GCC" = "yes" ; then
    1038                     AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
    1039                 fi
    1040                 TEA_PATH_CELIB
    1041                 # Set defaults for common evc4/PPC2003 setup
    1042                 # Currently Tcl requires 300+, possibly 420+ for sockets
    1043                 CEVERSION=420;          # could be 211 300 301 400 420 ...
    1044                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
    1045                 ARCH=ARM;               # could be ARM MIPS X86EM ...
    1046                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
    1047                 if test "$doWince" != "yes"; then
    1048                     # If !yes then the user specified something
    1049                     # Reset ARCH to allow user to skip specifying it
    1050                     ARCH=
    1051                     eval `echo $doWince | awk -F, '{ \
    1052             if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
    1053             if ([$]1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
    1054             if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
    1055             if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
    1056             if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
    1057                     }'`
    1058                     if test "x${ARCH}" = "x" ; then
    1059                         ARCH=$TARGETCPU;
    1060                     fi
    1061                 fi
    1062                 OSVERSION=WCE$CEVERSION;
    1063                 if test "x${WCEROOT}" = "x" ; then
    1064                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
    1065                     if test ! -d "${WCEROOT}" ; then
    1066                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
    1067                     fi
    1068                 fi
    1069                 if test "x${SDKROOT}" = "x" ; then
    1070                     SDKROOT="C:/Program Files/Windows CE Tools"
    1071                     if test ! -d "${SDKROOT}" ; then
    1072                         SDKROOT="C:/Windows CE Tools"
    1073                     fi
    1074                 fi
    1075                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
    1076                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
    1077                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
    1078                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
    1079                     AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
    1080                     doWince="no"
    1081                 else
    1082                     # We could PATH_NOSPACE these, but that's not important,
    1083                     # as long as we quote them when used.
    1084                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
    1085                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
    1086                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
    1087                     fi
    1088                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
    1089                 fi
    1090             fi
    1091 
    1092             if test "$GCC" != "yes" ; then
    1093                 if test "${SHARED_BUILD}" = "0" ; then
    1094                     runtime=-MT
    1095                 else
    1096                     runtime=-MD
    1097                 fi
    1098 
    1099                 if test "$do64bit" != "no" ; then
    1100                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
    1101                     CC="\"${PATH64}/cl.exe\""
    1102                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
    1103                     RC="\"${MSSDK}/bin/rc.exe\""
    1104                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
    1105                     LINKBIN="\"${PATH64}/link.exe\""
    1106                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
    1107                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
    1108                     # Avoid 'unresolved external symbol __security_cookie'
    1109                     # errors, c.f. http://support.microsoft.com/?id=894573
    1110                     TEA_ADD_LIBS([bufferoverflowU.lib])
    1111                 elif test "$doWince" != "no" ; then
    1112                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
    1113                     if test "${TARGETCPU}" = "X86"; then
    1114                         CC="\"${CEBINROOT}/cl.exe\""
    1115                     else
    1116                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
    1117                     fi
    1118                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
    1119                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
    1120                     arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
    1121                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
    1122                     if test "${SHARED_BUILD}" = "1" ; then
    1123                         # Static CE builds require static celib as well
    1124                         defs="${defs} _DLL"
    1125                     fi
    1126                     for i in $defs ; do
    1127                         AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i)
    1128                     done
    1129                     AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
    1130                     AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
    1131                     CFLAGS_DEBUG="-nologo -Zi -Od"
    1132                     CFLAGS_OPTIMIZE="-nologo -Ox"
    1133                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
    1134                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
    1135                     LINKBIN="\"${CEBINROOT}/link.exe\""
    1136                     AC_SUBST(CELIB_DIR)
    1137                 else
    1138                     RC="rc"
    1139                     lflags="-nologo"
    1140                     LINKBIN="link"
    1141                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
    1142                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
    1143                 fi
    1144             fi
    1145 
    1146             if test "$GCC" = "yes"; then
    1147                 # mingw gcc mode
    1148                 RC="windres"
    1149                 CFLAGS_DEBUG="-g"
    1150                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
    1151                 SHLIB_LD="$CC -shared"
    1152                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
    1153                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
    1154                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
    1155             else
    1156                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
    1157                 # link -lib only works when -lib is the first arg
    1158                 STLIB_LD="${LINKBIN} -lib ${lflags}"
    1159                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
    1160                 PATHTYPE=-w
    1161                 # For information on what debugtype is most useful, see:
    1162                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
    1163                 # This essentially turns it all on.
    1164                 LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
    1165                 LDFLAGS_OPTIMIZE="-release"
    1166                 if test "$doWince" != "no" ; then
    1167                     LDFLAGS_CONSOLE="-link ${lflags}"
    1168                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
    1169                 else
    1170                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
    1171                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
    1172                 fi
    1173             fi
    1174 
    1175             SHLIB_LD_LIBS='${LIBS}'
    1176             SHLIB_SUFFIX=".dll"
    1177             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
    1178 
    1179             TCL_LIB_VERSIONS_OK=nodots
    1180             # Bogus to avoid getting this turned off
    1181             DL_OBJS="tclLoadNone.obj"
    1182             ;;
    11831063        AIX-*)
    11841064            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
     
    11961076            LIBS="$LIBS -lc"
    11971077            SHLIB_CFLAGS=""
     1078            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     1079            # symbols when dynamically loaded into tclsh.
    11981080            SHLIB_LD_LIBS='${LIBS}'
    11991081            SHLIB_SUFFIX=".so"
     
    12091091                    do64bit_ok=yes
    12101092                    CFLAGS="$CFLAGS -q64"
    1211                     LDFLAGS_ARCH="-q64"
     1093                    LDFLAGS="$LDFLAGS -q64"
    12121094                    RANLIB="${RANLIB} -X64"
    12131095                    AR="${AR} -X64"
     
    12381120                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
    12391121                TCL_NEEDS_EXP_FILE=1
    1240                 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
     1122                TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
    12411123            fi
    12421124
    12431125            # AIX v<=4.1 has some different flags than 4.2+
    12441126            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
    1245                 AC_LIBOBJ([tclLoadAix])
     1127                LIBOBJS="$LIBOBJS tclLoadAix.o"
    12461128                DL_LIBS="-lld"
    12471129            fi
     
    12621144            if test $libbsd = yes; then
    12631145                MATH_LIBS="$MATH_LIBS -lbsd"
    1264                 AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?])
     1146                AC_DEFINE(USE_DELTA_FOR_TZ)
    12651147            fi
    12661148            ;;
     
    13131195        HP-UX-*.11.*)
    13141196            # Use updated header definitions where possible
    1315             AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
    1316             # Needed by Tcl, but not most extensions
    1317             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
    1318             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
    1319 
    1320             SHLIB_SUFFIX=".sl"
     1197            AC_DEFINE(_XOPEN_SOURCE)          # Use the XOPEN network library
     1198            AC_DEFINE(_XOPEN_SOURCE_EXTENDED) # Use the XOPEN network library
     1199            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
     1200
     1201            if test "`uname -m`" = "ia64" ; then
     1202                SHLIB_SUFFIX=".so"
     1203            else
     1204                SHLIB_SUFFIX=".sl"
     1205            fi
    13211206            AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
    13221207            if test "$tcl_ok" = yes; then
     
    13601245                    do64bit_ok=yes
    13611246                    CFLAGS="$CFLAGS +DD64"
    1362                     LDFLAGS_ARCH="+DD64"
     1247                    LDFLAGS="$LDFLAGS +DD64"
    13631248                fi
    13641249            fi
     
    13781263                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
    13791264            fi
     1265            ;;
     1266        IRIX-4.*)
     1267            SHLIB_CFLAGS="-G 0"
     1268            SHLIB_SUFFIX=".a"
     1269            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1270            SHLIB_LD_LIBS='${LIBS}'
     1271            DL_OBJS="tclLoadAout.o"
     1272            DL_LIBS=""
     1273            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1274            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1275            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1276            SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
    13801277            ;;
    13811278        IRIX-5.*)
     
    14331330                    SHLIB_LD="ld -64 -shared -rdata_shared"
    14341331                    CFLAGS="$CFLAGS -64"
    1435                     LDFLAGS_ARCH="-64"
     1332                    LDFLAGS="$LDFLAGS -64"
    14361333                fi
    14371334            fi
     
    14421339            SHLIB_SUFFIX=".so"
    14431340
    1444             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
     1341            CFLAGS_OPTIMIZE=-O2
    14451342            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
    14461343            # when you inline the string and math operations.  Turn this off to
     
    14481345            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
    14491346
    1450             SHLIB_LD="${CC} -shared"
    1451             DL_OBJS="tclLoadDl.o"
    1452             DL_LIBS="-ldl"
    1453             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
    1454             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1455             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1347            if test "$have_dl" = yes; then
     1348                SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
     1349                DL_OBJS="tclLoadDl.o"
     1350                DL_LIBS="-ldl"
     1351                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     1352                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1353                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1354            else
     1355                AC_CHECK_HEADER(dld.h, [
     1356                    SHLIB_LD="ld -shared"
     1357                    DL_OBJS="tclLoadDld.o"
     1358                    DL_LIBS="-ldld"
     1359                    CC_SEARCH_FLAGS=""
     1360                    LD_SEARCH_FLAGS=""])
     1361            fi
    14561362            if test "`uname -m`" = "alpha" ; then
    14571363                CFLAGS="$CFLAGS -mieee"
     1364            fi
     1365            if test $do64bit = yes; then
     1366                AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
     1367                    hold_cflags=$CFLAGS
     1368                    CFLAGS="$CFLAGS -m64"
     1369                    AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
     1370                    CFLAGS=$hold_cflags])
     1371                if test $tcl_cv_cc_m64 = yes; then
     1372                    CFLAGS="$CFLAGS -m64"
     1373                    do64bit_ok=yes
     1374                fi
    14581375            fi
    14591376
     
    14651382            # Disable inlining only when one of the
    14661383            # files in compat/*.c is being linked in.
    1467             if test x"${USE_COMPAT}" != x ; then
     1384            if test x"${LIBOBJS}" != x ; then
    14681385                CFLAGS="$CFLAGS -fno-inline"
    14691386            fi
     1387
     1388            # XIM peeking works under XFree86.
     1389            AC_DEFINE(PEEK_XCLOSEIM)
    14701390
    14711391            ;;
     
    14751395            SHLIB_SUFFIX=".so"
    14761396
    1477             SHLIB_LD="${CC} -shared"
    1478             DL_OBJS=""
    1479             DL_LIBS="-ldl"
    1480             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
    1481             CC_SEARCH_FLAGS=""
    1482             LD_SEARCH_FLAGS=""
     1397            if test "$have_dl" = yes; then
     1398                SHLIB_LD="${CC} -shared"
     1399                DL_OBJS=""
     1400                DL_LIBS="-ldl"
     1401                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     1402                CC_SEARCH_FLAGS=""
     1403                LD_SEARCH_FLAGS=""
     1404            else
     1405                AC_CHECK_HEADER(dld.h, [
     1406                    SHLIB_LD="ld -shared"
     1407                    DL_OBJS=""
     1408                    DL_LIBS="-ldld"
     1409                    CC_SEARCH_FLAGS=""
     1410                    LD_SEARCH_FLAGS=""])
     1411            fi
    14831412            if test "`uname -m`" = "alpha" ; then
    14841413                CFLAGS="$CFLAGS -mieee"
     
    15191448            ;;
    15201449        NetBSD-*|FreeBSD-[[1-2]].*)
    1521             # NetBSD/SPARC needs -fPIC, -fpic will not do.
    1522             SHLIB_CFLAGS="-fPIC"
    1523             SHLIB_LD="ld -Bshareable -x"
    1524             SHLIB_LD_LIBS='${LIBS}'
    1525             SHLIB_SUFFIX=".so"
    1526             DL_OBJS="tclLoadDl.o"
    1527             DL_LIBS=""
    1528             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1529             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
    1530             AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
    1531                 AC_EGREP_CPP(yes, [
     1450            # Not available on all versions:  check for include file.
     1451            AC_CHECK_HEADER(dlfcn.h, [
     1452                # NetBSD/SPARC needs -fPIC, -fpic will not do.
     1453                SHLIB_CFLAGS="-fPIC"
     1454                SHLIB_LD="ld -Bshareable -x"
     1455                SHLIB_LD_LIBS='${LIBS}'
     1456                SHLIB_SUFFIX=".so"
     1457                DL_OBJS="tclLoadDl.o"
     1458                DL_LIBS=""
     1459                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1460                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     1461                AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
     1462                    AC_EGREP_CPP(yes, [
    15321463#ifdef __ELF__
    15331464        yes
    15341465#endif
    1535                 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
    1536             if test $tcl_cv_ld_elf = yes; then
    1537                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
    1538             else
    1539                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1540             fi
    1541 
    1542             # Ancient FreeBSD doesn't handle version numbers with dots.
    1543 
    1544             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1466                    ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
     1467                if test $tcl_cv_ld_elf = yes; then
     1468                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     1469                else
     1470                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1471                fi
     1472            ], [
     1473                SHLIB_CFLAGS=""
     1474                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     1475                SHLIB_LD_LIBS='${LIBS}'
     1476                SHLIB_SUFFIX=".a"
     1477                DL_OBJS="tclLoadAout.o"
     1478                DL_LIBS=""
     1479                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1480                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1481                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1482            ])
     1483
     1484            # FreeBSD doesn't handle version numbers with dots.
     1485
     1486            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    15451487            TCL_LIB_VERSIONS_OK=nodots
    15461488            ;;
    15471489        OpenBSD-*)
    1548             # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
    1549             case `machine` in
    1550             sparc|sparc64)
    1551                 SHLIB_CFLAGS="-fPIC";;
     1490            case `arch -s` in
     1491            m88k|vax)
     1492                SHLIB_CFLAGS=""
     1493                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     1494                SHLIB_LD_LIBS='${LIBS}'
     1495                SHLIB_SUFFIX=".a"
     1496                DL_OBJS="tclLoadAout.o"
     1497                DL_LIBS=""
     1498                LDFLAGS=""
     1499                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1500                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1501                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1502                ;;
    15521503            *)
    1553                 SHLIB_CFLAGS="-fpic";;
    1554             esac
    1555             SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
    1556             SHLIB_LD_LIBS='${LIBS}'
    1557             SHLIB_SUFFIX=".so"
    1558             DL_OBJS="tclLoadDl.o"
    1559             DL_LIBS=""
    1560             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
    1561             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
    1562             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1563             AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
    1564                 AC_EGREP_CPP(yes, [
     1504                # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
     1505                case `machine` in
     1506                sparc|sparc64)
     1507                    SHLIB_CFLAGS="-fPIC";;
     1508                *)
     1509                    SHLIB_CFLAGS="-fpic";;
     1510                esac
     1511                SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
     1512                SHLIB_LD_LIBS='${LIBS}'
     1513                SHLIB_SUFFIX=".so"
     1514                DL_OBJS="tclLoadDl.o"
     1515                DL_LIBS=""
     1516                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     1517                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1518                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1519                AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
     1520                    AC_EGREP_CPP(yes, [
    15651521#ifdef __ELF__
    15661522        yes
    15671523#endif
    1568                 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
    1569             if test $tcl_cv_ld_elf = yes; then
    1570                 LDFLAGS=-Wl,-export-dynamic
    1571             else
    1572                 LDFLAGS=""
    1573             fi
     1524                    ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
     1525                if test $tcl_cv_ld_elf = yes; then
     1526                    LDFLAGS=-Wl,-export-dynamic
     1527                else
     1528                    LDFLAGS=""
     1529                fi
     1530                ;;
     1531            esac
    15741532
    15751533            # OpenBSD doesn't do version numbers with dots.
    1576             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1534            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    15771535            TCL_LIB_VERSIONS_OK=nodots
    15781536            ;;
     
    15971555            FreeBSD-3.*)
    15981556                # FreeBSD-3 doesn't handle version numbers with dots.
    1599                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
    1600                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
     1557                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     1558                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
    16011559                TCL_LIB_VERSIONS_OK=nodots
    16021560                ;;
     
    16061564            CFLAGS_OPTIMIZE="-Os"
    16071565            SHLIB_CFLAGS="-fno-common"
     1566            # To avoid discrepancies between what headers configure sees during
     1567            # preprocessing tests and compiling tests, move any -isysroot and
     1568            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
     1569            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
     1570                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     1571                if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
     1572            CFLAGS="`echo " ${CFLAGS}" | \
     1573                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     1574                if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
    16081575            if test $do64bit = yes; then
    1609                 do64bit_ok=yes
    1610                 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
    1611             fi
    1612             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
    1613             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
     1576                case `arch` in
     1577                    ppc)
     1578                        AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
     1579                                tcl_cv_cc_arch_ppc64, [
     1580                            hold_cflags=$CFLAGS
     1581                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     1582                            AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
     1583                                    tcl_cv_cc_arch_ppc64=no)
     1584                            CFLAGS=$hold_cflags])
     1585                        if test $tcl_cv_cc_arch_ppc64 = yes; then
     1586                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     1587                            do64bit_ok=yes
     1588                        fi;;
     1589                    i386)
     1590                        AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
     1591                                tcl_cv_cc_arch_x86_64, [
     1592                            hold_cflags=$CFLAGS
     1593                            CFLAGS="$CFLAGS -arch x86_64"
     1594                            AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
     1595                                    tcl_cv_cc_arch_x86_64=no)
     1596                            CFLAGS=$hold_cflags])
     1597                        if test $tcl_cv_cc_arch_x86_64 = yes; then
     1598                            CFLAGS="$CFLAGS -arch x86_64"
     1599                            do64bit_ok=yes
     1600                        fi;;
     1601                    *)
     1602                        AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
     1603                esac
     1604            else
     1605                # Check for combined 32-bit and 64-bit fat build
     1606                echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
     1607                    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
     1608                    fat_32_64=yes
     1609            fi
     1610            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
    16141611            AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
    1615                 hold_ldflags=$LDFLAGS
    1616                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
    1617                 AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
    1618                 LDFLAGS=$hold_ldflags])
     1612                hold_ldflags=$LDFLAGS
     1613                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
     1614                AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
     1615                LDFLAGS=$hold_ldflags])
    16191616            if test $tcl_cv_ld_single_module = yes; then
    1620                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
     1617                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
    16211618            fi
    16221619            SHLIB_LD_LIBS='${LIBS}'
     
    16251622            DL_LIBS=""
    16261623            # Don't use -prebind when building for Mac OS X 10.4 or later only:
    1627             test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
    1628                 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \
     1624            test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
     1625                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \
    16291626                LDFLAGS="$LDFLAGS -prebind"
    16301627            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
    16311628            AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
    1632                 hold_ldflags=$LDFLAGS
    1633                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    1634                 AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
    1635                 LDFLAGS=$hold_ldflags])
     1629                hold_ldflags=$LDFLAGS
     1630                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     1631                AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
     1632                LDFLAGS=$hold_ldflags])
    16361633            if test $tcl_cv_ld_search_paths_first = yes; then
    1637                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     1634                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    16381635            fi
    16391636            CC_SEARCH_FLAGS=""
    16401637            LD_SEARCH_FLAGS=""
    16411638            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
    1642 
    1643             # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS
    1644             # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit
    1645             # at present (no 64bit GUI libraries).
    1646             test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \
    1647                 CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
     1639            PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
     1640            PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
     1641            AC_MSG_CHECKING([whether to use CoreFoundation])
     1642            AC_ARG_ENABLE(corefoundation, [  --enable-corefoundation use CoreFoundation API [--enable-corefoundation]],
     1643                [tcl_corefoundation=$enableval], [tcl_corefoundation=yes])
     1644            AC_MSG_RESULT([$tcl_corefoundation])
     1645            if test $tcl_corefoundation = yes; then
     1646                AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [
     1647                    hold_libs=$LIBS
     1648                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     1649                        # On Tiger there is no 64-bit CF, so remove 64-bit archs
     1650                        # from CFLAGS et al. while testing for presence of CF.
     1651                        # 64-bit CF is disabled in tclUnixPort.h if necessary.
     1652                        eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
     1653                    done; fi
     1654                    LIBS="$LIBS -framework CoreFoundation"
     1655                    AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
     1656                        [CFBundleRef b = CFBundleGetMainBundle();],
     1657                        tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
     1658                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     1659                        eval $v'="$hold_'$v'"'
     1660                    done; fi; LIBS=$hold_libs])
     1661                if test $tcl_cv_lib_corefoundation = yes; then
     1662                    LIBS="$LIBS -framework CoreFoundation"
     1663                    AC_DEFINE(HAVE_COREFOUNDATION)
     1664                else
     1665                    tcl_corefoundation=no
     1666                fi
     1667                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
     1668                    AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [
     1669                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     1670                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
     1671                        done
     1672                        AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
     1673                            [CFBundleRef b = CFBundleGetMainBundle();],
     1674                            tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no)
     1675                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     1676                            eval $v'="$hold_'$v'"'
     1677                        done])
     1678                    if test $tcl_cv_lib_corefoundation_64 = no; then
     1679                        AC_DEFINE(NO_COREFOUNDATION_64)
     1680                    fi
     1681                fi
     1682            fi
     1683            AC_DEFINE(MAC_OSX_TCL)
    16481684            ;;
    16491685        NEXTSTEP-*)
     
    16591695        OS/390-*)
    16601696            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
    1661             AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
    1662                 [Should OS/390 do the right thing with sockets?])
     1697            AC_DEFINE(_OE_SOCKETS)      # needed in sys/socket.h
    16631698            ;;     
    16641699        OSF1-1.0|OSF1-1.1|OSF1-1.2)
     
    17351770            LD_SEARCH_FLAGS=""
    17361771            ;;
     1772        RISCos-*)
     1773            SHLIB_CFLAGS="-G 0"
     1774            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1775            SHLIB_LD_LIBS='${LIBS}'
     1776            SHLIB_SUFFIX=".a"
     1777            DL_OBJS="tclLoadAout.o"
     1778            DL_LIBS=""
     1779            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1780            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1781            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1782            ;;
    17371783        SCO_SV-3.2*)
    17381784            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
     
    17791825            # So, the library has to have a name like libtcl75.so.1.0
    17801826
    1781             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
    1782             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     1827            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     1828            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
    17831829            TCL_LIB_VERSIONS_OK=nodots
    17841830            ;;
     
    17891835            # won't define thread-safe library routines.
    17901836
    1791             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    1792             AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    1793                 [Do we really want to follow the standard? Yes we do!])
     1837            AC_DEFINE(_REENTRANT)
     1838            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
    17941839
    17951840            SHLIB_CFLAGS="-KPIC"
     
    18161861            # won't define thread-safe library routines.
    18171862
    1818             AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
    1819             AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
    1820                 [Do we really want to follow the standard? Yes we do!])
     1863            AC_DEFINE(_REENTRANT)
     1864            AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
    18211865
    18221866            SHLIB_CFLAGS="-KPIC"
     
    18391883                            if test "$do64bitVIS" = "yes" ; then
    18401884                                CFLAGS="$CFLAGS -xarch=v9a"
    1841                                 LDFLAGS_ARCH="-xarch=v9a"
     1885                                LDFLAGS="$LDFLAGS -xarch=v9a"
    18421886                            else
    18431887                                CFLAGS="$CFLAGS -xarch=v9"
    1844                                 LDFLAGS_ARCH="-xarch=v9"
     1888                                LDFLAGS="$LDFLAGS -xarch=v9"
    18451889                            fi
    18461890                            # Solaris 64 uses this as well
     
    18741918                    # We need to specify -static-libgcc or we need to
    18751919                    # add the path to the sparv9 libgcc.
    1876                     # JH: static-libgcc is necessary for core Tcl, but may
    1877                     # not be necessary for extensions.
    18781920                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
    18791921                    # for finding sparcv9 libgcc, get the regular libgcc
     
    18831925                fi
    18841926            else
    1885                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     1927                case $system in
     1928                    SunOS-5.[[1-9]][[0-9]]*)
     1929                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
     1930                    *)
     1931                        SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
     1932                esac
    18861933                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
    18871934                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     1935            fi
     1936            ;;
     1937        ULTRIX-4.*)
     1938            SHLIB_CFLAGS="-G 0"
     1939            SHLIB_SUFFIX=".a"
     1940            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     1941            SHLIB_LD_LIBS='${LIBS}'
     1942            DL_OBJS="tclLoadAout.o"
     1943            DL_LIBS=""
     1944            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     1945            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     1946            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     1947            if test "$GCC" != "yes" ; then
     1948                CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
    18881949            fi
    18891950            ;;
     
    19141975    fi
    19151976
    1916     # Step 4: disable dynamic loading if requested via a command-line switch.
    1917 
    1918     AC_ARG_ENABLE(load,
    1919         AC_HELP_STRING([--disable-load],
    1920             [disallow dynamic loading and "load" command (default: enabled)]),
     1977dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
     1978dnl # until the end of configure, as configure's compile and link tests use
     1979dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
     1980dnl # preprocessing tests use only CPPFLAGS.
     1981    SC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
     1982
     1983    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
     1984    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
     1985    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
     1986    # to determine which of several header files defines the a.out file
     1987    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
     1988    # support only a file format that is more or less version-7-compatible.
     1989    # In particular,
     1990    #   - a.out files must begin with `struct exec'.
     1991    #   - the N_TXTOFF on the `struct exec' must compute the seek address
     1992    #     of the text segment
     1993    #   - The `struct exec' must contain a_magic, a_text, a_data, a_bss
     1994    #     and a_entry fields.
     1995    # The following compilation should succeed if and only if either sys/exec.h
     1996    # or a.out.h is usable for the purpose.
     1997    #
     1998    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
     1999    # `struct exec' includes a second header that contains information that
     2000    # duplicates the v7 fields that are needed.
     2001
     2002    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
     2003        AC_CACHE_CHECK([sys/exec.h], tcl_cv_sysexec_h, [
     2004        AC_TRY_COMPILE([#include <sys/exec.h>],[
     2005            struct exec foo;
     2006            unsigned long seek;
     2007            int flag;
     2008#if defined(__mips) || defined(mips)
     2009            seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2010#else
     2011            seek = N_TXTOFF (foo);
     2012#endif
     2013            flag = (foo.a_magic == OMAGIC);
     2014            return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2015    ], tcl_cv_sysexec_h=usable, tcl_cv_sysexec_h=unusable)])
     2016        if test $tcl_cv_sysexec_h = usable; then
     2017            AC_DEFINE(USE_SYS_EXEC_H)
     2018        else
     2019            AC_CACHE_CHECK([a.out.h], tcl_cv_aout_h, [
     2020            AC_TRY_COMPILE([#include <a.out.h>],[
     2021                struct exec foo;
     2022                unsigned long seek;
     2023                int flag;
     2024#if defined(__mips) || defined(mips)
     2025                seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2026#else
     2027                seek = N_TXTOFF (foo);
     2028#endif
     2029                flag = (foo.a_magic == OMAGIC);
     2030                return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2031            ], tcl_cv_aout_h=usable, tcl_cv_aout_h=unusable)])
     2032            if test $tcl_cv_aout_h = usable; then
     2033                AC_DEFINE(USE_A_OUT_H)
     2034            else
     2035                AC_CACHE_CHECK([sys/exec_aout.h], tcl_cv_sysexecaout_h, [
     2036                AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
     2037                    struct exec foo;
     2038                    unsigned long seek;
     2039                    int flag;
     2040#if defined(__mips) || defined(mips)
     2041                    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     2042#else
     2043                    seek = N_TXTOFF (foo);
     2044#endif
     2045                    flag = (foo.a_midmag == OMAGIC);
     2046                    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     2047                ], tcl_cv_sysexecaout_h=usable, tcl_cv_sysexecaout_h=unusable)])
     2048                if test $tcl_cv_sysexecaout_h = usable; then
     2049                    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
     2050                else
     2051                    DL_OBJS=""
     2052                fi
     2053            fi
     2054        fi
     2055    fi
     2056
     2057    # Step 5: disable dynamic loading if requested via a command-line switch.
     2058
     2059    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
    19212060        [tcl_ok=$enableval], [tcl_ok=yes])
    19222061    if test "$tcl_ok" = "no"; then
     
    19392078        BUILD_DLTEST=""
    19402079    fi
    1941     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
    19422080
    19432081    # If we're running gcc, then change the C flags for compiling shared
     
    19542092                IRIX*)
    19552093                    ;;
    1956                 NetBSD-*|FreeBSD-*)
     2094                NetBSD-*|FreeBSD-*|OpenBSD-*)
    19572095                    ;;
    19582096                Darwin-*)
    19592097                    ;;
     2098                RISCos-*)
     2099                    ;;
    19602100                SCO_SV-3.2*)
    19612101                    ;;
    1962                 windows)
     2102                ULTRIX-4.*)
    19632103                    ;;
    19642104                *)
     
    19702110
    19712111    if test "$SHARED_LIB_SUFFIX" = "" ; then
    1972         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
     2112        SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    19732113    fi
    19742114    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
    1975         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
    1976     fi
     2115        UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     2116    fi
     2117
     2118    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
     2119        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
     2120        MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
     2121        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     2122    else
     2123        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
     2124
     2125        if test "$RANLIB" = "" ; then
     2126            MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
     2127            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     2128        else
     2129            MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
     2130            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
     2131        fi
     2132
     2133dnl        Not at all clear what this was doing in Tcl's configure.in
     2134dnl        or why it was needed was needed. In any event, this sort of
     2135dnl        things needs to be done in the big loop above.
     2136dnl        REMOVE THIS BLOCK LATER! (mdejong)
     2137dnl        case $system in
     2138dnl            BSD/OS*)
     2139dnl                ;;
     2140dnl            AIX-[[1-4]].*)
     2141dnl                ;;
     2142dnl            *)
     2143dnl                SHLIB_LD_LIBS=""
     2144dnl                ;;
     2145dnl        esac
     2146    fi
     2147
     2148
     2149    # Stub lib does not depend on shared/static configuration
     2150    if test "$RANLIB" = "" ; then
     2151        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
     2152        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
     2153    else
     2154        MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
     2155        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
     2156    fi
     2157
    19772158
    19782159    AC_SUBST(DL_LIBS)
    19792160
     2161    AC_SUBST(DL_OBJS)
     2162    AC_SUBST(PLAT_OBJS)
     2163    AC_SUBST(PLAT_SRCS)
     2164    AC_SUBST(CFLAGS)
    19802165    AC_SUBST(CFLAGS_DEBUG)
    19812166    AC_SUBST(CFLAGS_OPTIMIZE)
    19822167    AC_SUBST(CFLAGS_WARNING)
    19832168
     2169    AC_SUBST(LDFLAGS)
     2170    AC_SUBST(LDFLAGS_DEBUG)
     2171    AC_SUBST(LDFLAGS_OPTIMIZE)
     2172    AC_SUBST(CC_SEARCH_FLAGS)
     2173    AC_SUBST(LD_SEARCH_FLAGS)
     2174
    19842175    AC_SUBST(STLIB_LD)
    19852176    AC_SUBST(SHLIB_LD)
    1986 
     2177    AC_SUBST(TCL_SHLIB_LD_EXTRAS)
     2178    AC_SUBST(TK_SHLIB_LD_EXTRAS)
    19872179    AC_SUBST(SHLIB_LD_LIBS)
    19882180    AC_SUBST(SHLIB_CFLAGS)
    1989 
    1990     AC_SUBST(LD_LIBRARY_PATH_VAR)
    1991 
    1992     # These must be called after we do the basic CFLAGS checks and
    1993     # verify any possible 64-bit or similar switches are necessary
    1994     TEA_TCL_EARLY_FLAGS
    1995     TEA_TCL_64BIT_FLAGS
     2181    AC_SUBST(SHLIB_SUFFIX)
     2182
     2183    AC_SUBST(MAKE_LIB)
     2184    AC_SUBST(MAKE_STUB_LIB)
     2185    AC_SUBST(INSTALL_LIB)
     2186    AC_SUBST(INSTALL_STUB_LIB)
     2187    AC_SUBST(RANLIB)
    19962188])
    19972189
    19982190#--------------------------------------------------------------------
    1999 # TEA_SERIAL_PORT
     2191# SC_SERIAL_PORT
    20002192#
    20012193#       Determine which interface to use to talk to the serial port.
     
    20182210#--------------------------------------------------------------------
    20192211
    2020 AC_DEFUN([TEA_SERIAL_PORT], [
     2212AC_DEFUN([SC_SERIAL_PORT], [
    20212213    AC_CHECK_HEADERS(sys/modem.h)
    20222214    AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
     
    21082300    fi])
    21092301    case $tcl_cv_api_serial in
    2110         termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
    2111         termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
    2112         sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
     2302        termios) AC_DEFINE(USE_TERMIOS);;
     2303        termio)  AC_DEFINE(USE_TERMIO);;
     2304        sgtty)   AC_DEFINE(USE_SGTTY);;
    21132305    esac
    21142306])
    21152307
    21162308#--------------------------------------------------------------------
    2117 # TEA_MISSING_POSIX_HEADERS
     2309# SC_MISSING_POSIX_HEADERS
    21182310#
    21192311#       Supply substitutes for missing POSIX header files.  Special
     
    21382330#               NO_SYS_WAIT_H
    21392331#               NO_DLFCN_H
     2332#               HAVE_UNISTD_H
    21402333#               HAVE_SYS_PARAM_H
    21412334#
    21422335#               HAVE_STRING_H ?
    21432336#
    2144 # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
    2145 # CHECK on limits.h
    2146 #--------------------------------------------------------------------
    2147 
    2148 AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
    2149     AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h,
     2337#--------------------------------------------------------------------
     2338
     2339AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
     2340    AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
    21502341    AC_TRY_LINK([#include <sys/types.h>
    21512342#include <dirent.h>], [
     
    21672358p = entryPtr->d_name;
    21682359closedir(d);
    2169 ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no))
     2360], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
    21702361
    21712362    if test $tcl_cv_dirent_h = no; then
    2172         AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
    2173     fi
    2174 
    2175     AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
    2176     AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
    2177     AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
     2363        AC_DEFINE(NO_DIRENT_H)
     2364    fi
     2365
     2366    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
     2367    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
     2368    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
    21782369    AC_CHECK_HEADER(limits.h,
    2179         [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
    2180         [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
     2370        [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
    21812371    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
    21822372    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
     
    21842374    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
    21852375    if test $tcl_ok = 0; then
    2186         AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
     2376        AC_DEFINE(NO_STDLIB_H)
    21872377    fi
    21882378    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
     
    21942384
    21952385    if test $tcl_ok = 0; then
    2196         AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
    2197     fi
    2198 
    2199     AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
    2200     AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
     2386        AC_DEFINE(NO_STRING_H)
     2387    fi
     2388
     2389    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
     2390    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
    22012391
    22022392    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
    2203     AC_HAVE_HEADERS(sys/param.h)
     2393    AC_HAVE_HEADERS(unistd.h sys/param.h)
    22042394])
    22052395
    22062396#--------------------------------------------------------------------
    2207 # TEA_PATH_X
     2397# SC_PATH_X
    22082398#
    22092399#       Locate the X11 header files and the X11 library archive.  Try
     
    22142404#       no include files, so double-check its result just to be safe.
    22152405#
    2216 #       This should be called after TEA_CONFIG_CFLAGS as setting the
    2217 #       LIBS line can confuse some configure macro magic.
    2218 #
    22192406# Arguments:
    22202407#       none
     
    22222409# Results:
    22232410#
    2224 #       Sets the following vars:
     2411#       Sets the the following vars:
    22252412#               XINCLUDES
    22262413#               XLIBSW
    2227 #               PKG_LIBS (appends to)
    2228 #
    2229 #--------------------------------------------------------------------
    2230 
    2231 AC_DEFUN([TEA_PATH_X], [
    2232     if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
    2233         TEA_PATH_UNIX_X
    2234     fi
    2235 ])
    2236 
    2237 AC_DEFUN([TEA_PATH_UNIX_X], [
     2414#
     2415#--------------------------------------------------------------------
     2416
     2417AC_DEFUN([SC_PATH_X], [
    22382418    AC_PATH_X
    22392419    not_really_there=""
     
    22982478        XLIBSW=-lX11
    22992479    fi
    2300     if test x"${XLIBSW}" != x ; then
    2301         PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
    2302     fi
    23032480])
    23042481
    23052482#--------------------------------------------------------------------
    2306 # TEA_BLOCKING_STYLE
     2483# SC_BLOCKING_STYLE
    23072484#
    23082485#       The statements below check for systems where POSIX-style
     
    23242501#--------------------------------------------------------------------
    23252502
    2326 AC_DEFUN([TEA_BLOCKING_STYLE], [
     2503AC_DEFUN([SC_BLOCKING_STYLE], [
    23272504    AC_CHECK_HEADERS(sys/ioctl.h)
    23282505    AC_CHECK_HEADERS(sys/filio.h)
    2329     TEA_CONFIG_SYSTEM
     2506    SC_CONFIG_SYSTEM
    23302507    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
    23312508    case $system in
     
    23362513
    23372514        OSF*)
    2338             AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
     2515            AC_DEFINE(USE_FIONBIO)
    23392516            AC_MSG_RESULT([FIONBIO])
    23402517            ;;
    23412518        SunOS-4*)
    2342             AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
     2519            AC_DEFINE(USE_FIONBIO)
     2520            AC_MSG_RESULT([FIONBIO])
     2521            ;;
     2522        ULTRIX-4.*)
     2523            AC_DEFINE(USE_FIONBIO)
    23432524            AC_MSG_RESULT([FIONBIO])
    23442525            ;;
     
    23502531
    23512532#--------------------------------------------------------------------
    2352 # TEA_TIME_HANLDER
     2533# SC_TIME_HANLDER
    23532534#
    23542535#       Checks how the system deals with time.h, what time structures
     
    23682549#--------------------------------------------------------------------
    23692550
    2370 AC_DEFUN([TEA_TIME_HANDLER], [
     2551AC_DEFUN([SC_TIME_HANDLER], [
    23712552    AC_CHECK_HEADERS(sys/time.h)
    23722553    AC_HEADER_TIME
     
    23752556    AC_CHECK_FUNCS(gmtime_r localtime_r)
    23762557
    2377     AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj,
     2558    AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
    23782559        AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
    2379             tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
     2560            tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
    23802561    if test $tcl_cv_member_tm_tzadj = yes ; then
    2381         AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
    2382     fi
    2383 
    2384     AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff,
     2562        AC_DEFINE(HAVE_TM_TZADJ)
     2563    fi
     2564
     2565    AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
    23852566        AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
    2386             tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
     2567            tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
    23872568    if test $tcl_cv_member_tm_gmtoff = yes ; then
    2388         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
     2569        AC_DEFINE(HAVE_TM_GMTOFF)
    23892570    fi
    23902571
     
    23932574    # (like convex) have timezone functions, etc.
    23942575    #
    2395     AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long,
     2576    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
    23962577        AC_TRY_COMPILE([#include <time.h>],
    23972578            [extern long timezone;
    23982579            timezone += 1;
    23992580            exit (0);],
    2400             tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
     2581            tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
    24012582    if test $tcl_cv_timezone_long = yes ; then
    2402         AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
     2583        AC_DEFINE(HAVE_TIMEZONE_VAR)
    24032584    else
    24042585        #
    24052586        # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
    24062587        #
    2407         AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time,
     2588        AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
    24082589            AC_TRY_COMPILE([#include <time.h>],
    24092590                [extern time_t timezone;
    24102591                timezone += 1;
    24112592                exit (0);],
    2412                 tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
     2593                tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
    24132594        if test $tcl_cv_timezone_time = yes ; then
    2414             AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
     2595            AC_DEFINE(HAVE_TIMEZONE_VAR)
    24152596        fi
    24162597    fi
     
    24182599
    24192600#--------------------------------------------------------------------
    2420 # TEA_BUGGY_STRTOD
     2601# SC_BUGGY_STRTOD
    24212602#
    24222603#       Under Solaris 2.4, strtod returns the wrong value for the
     
    24372618#--------------------------------------------------------------------
    24382619
    2439 AC_DEFUN([TEA_BUGGY_STRTOD], [
     2620AC_DEFUN([SC_BUGGY_STRTOD], [
    24402621    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
    24412622    if test "$tcl_strtod" = 1; then
     
    24632644                    tcl_cv_strtod_buggy=buggy)])
    24642645        if test "$tcl_cv_strtod_buggy" = buggy; then
    2465             AC_LIBOBJ([fixstrtod])
    2466             USE_COMPAT=1
    2467             AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
     2646            LIBOBJS="$LIBOBJS fixstrtod.o"
     2647            AC_DEFINE(strtod, fixstrtod)
    24682648        fi
    24692649    fi
     
    24712651
    24722652#--------------------------------------------------------------------
    2473 # TEA_TCL_LINK_LIBS
     2653# SC_TCL_LINK_LIBS
    24742654#
    24752655#       Search for the libraries needed to link the Tcl shell.
     
    24972677#--------------------------------------------------------------------
    24982678
    2499 AC_DEFUN([TEA_TCL_LINK_LIBS], [
     2679AC_DEFUN([SC_TCL_LINK_LIBS], [
    25002680    #--------------------------------------------------------------------
    25012681    # On a few very rare systems, all of the libm.a stuff is
     
    25142694
    25152695    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
    2516     AC_CHECK_HEADER(net/errno.h, [
    2517         AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
     2696    AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)])
    25182697
    25192698    #--------------------------------------------------------------------
     
    25502729   
    25512730    # Don't perform the eval of the libraries here because DL_LIBS
    2552     # won't be set until we call TEA_CONFIG_CFLAGS
     2731    # won't be set until we call SC_CONFIG_CFLAGS
    25532732
    25542733    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
     
    25582737
    25592738#--------------------------------------------------------------------
    2560 # TEA_TCL_EARLY_FLAGS
     2739# SC_TCL_EARLY_FLAGS
    25612740#
    25622741#       Check for what flags are needed to be passed so the correct OS
     
    25752754#--------------------------------------------------------------------
    25762755
    2577 AC_DEFUN([TEA_TCL_EARLY_FLAG],[
     2756AC_DEFUN([SC_TCL_EARLY_FLAG],[
    25782757    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
    25792758        AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
     
    25832762                [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
    25842763    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
    2585         AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
     2764        AC_DEFINE($1)
    25862765        tcl_flags="$tcl_flags $1"
    25872766    fi
    25882767])
    25892768
    2590 AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
     2769AC_DEFUN([SC_TCL_EARLY_FLAGS],[
    25912770    AC_MSG_CHECKING([for required early compiler flags])
    25922771    tcl_flags=""
    2593     TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
     2772    SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
    25942773        [char *p = (char *)strtoll; char *q = (char *)strtoull;])
    2595     TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
     2774    SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
    25962775        [struct stat64 buf; int i = stat64("/", &buf);])
    2597     TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
     2776    SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
    25982777        [char *p = (char *)open64;])
    25992778    if test "x${tcl_flags}" = "x" ; then
     
    26052784
    26062785#--------------------------------------------------------------------
    2607 # TEA_TCL_64BIT_FLAGS
     2786# SC_TCL_64BIT_FLAGS
    26082787#
    26092788#       Check for what is defined in the way of 64-bit features.
     
    26232802#--------------------------------------------------------------------
    26242803
    2625 AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
     2804AC_DEFUN([SC_TCL_64BIT_FLAGS], [
    26262805    AC_MSG_CHECKING([for 64-bit integer type])
    26272806    AC_CACHE_VAL(tcl_cv_type_64bit,[
     
    26372816        }],tcl_cv_type_64bit=${tcl_type_64bit})])
    26382817    if test "${tcl_cv_type_64bit}" = none ; then
    2639         AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
     2818        AC_DEFINE(TCL_WIDE_INT_IS_LONG)
    26402819        AC_MSG_RESULT([using long])
    2641     elif test "${tcl_cv_type_64bit}" = "__int64" \
    2642                 -a "${TEA_PLATFORM}" = "windows" ; then
    2643         # We actually want to use the default tcl.h checks in this
    2644         # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
    2645         AC_MSG_RESULT([using Tcl header defaults])
    26462820    else
    2647         AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
    2648             [What type should be used to define wide integers?])
     2821        AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
    26492822        AC_MSG_RESULT([${tcl_cv_type_64bit}])
    26502823
     
    26552828                tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
    26562829        if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
    2657             AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
     2830            AC_DEFINE(HAVE_STRUCT_DIRENT64)
    26582831        fi
    26592832
     
    26632836                tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
    26642837        if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
    2665             AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
     2838            AC_DEFINE(HAVE_STRUCT_STAT64)
    26662839        fi
    26672840
     
    26772850                test "x${ac_cv_func_lseek64}" = "xyes" && \
    26782851                test "x${ac_cv_func_open64}" = "xyes" ; then
    2679             AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
     2852            AC_DEFINE(HAVE_TYPE_OFF64_T)
    26802853            AC_MSG_RESULT([yes])
    26812854        else
     
    26852858])
    26862859
    2687 ##
    2688 ## Here ends the standard Tcl configuration bits and starts the
    2689 ## TEA specific functions
    2690 ##
    2691 
    2692 #------------------------------------------------------------------------
    2693 # TEA_INIT --
    2694 #
    2695 #       Init various Tcl Extension Architecture (TEA) variables.
    2696 #       This should be the first called TEA_* macro.
     2860#--------------------------------------------------------------------
     2861# SC_TCL_GETHOSTBYADDR_R
     2862#
     2863#       Check if we have MT-safe variant of gethostbyaddr().
    26972864#
    26982865# Arguments:
    2699 #       none
    2700 #
     2866#       None
     2867#       
    27012868# Results:
    27022869#
    2703 #       Defines and substs the following vars:
    2704 #               CYGPATH
    2705 #               EXEEXT
    2706 #       Defines only:
    2707 #               TEA_VERSION
    2708 #               TEA_INITED
    2709 #               TEA_PLATFORM (windows or unix)
    2710 #
    2711 # "cygpath" is used on windows to generate native path names for include
    2712 # files. These variables should only be used with the compiler and linker
    2713 # since they generate native path names.
    2714 #
    2715 # EXEEXT
    2716 #       Select the executable extension based on the host type.  This
    2717 #       is a lightweight replacement for AC_EXEEXT that doesn't require
    2718 #       a compiler.
    2719 #------------------------------------------------------------------------
    2720 
    2721 AC_DEFUN([TEA_INIT], [
    2722     # TEA extensions pass this us the version of TEA they think they
    2723     # are compatible with.
    2724     TEA_VERSION="3.5"
    2725 
    2726     AC_MSG_CHECKING([for correct TEA configuration])
    2727     if test x"${PACKAGE_NAME}" = x ; then
    2728         AC_MSG_ERROR([
    2729 The PACKAGE_NAME variable must be defined by your TEA configure.in])
    2730     fi
    2731     if test x"$1" = x ; then
    2732         AC_MSG_ERROR([
    2733 TEA version not specified.])
    2734     elif test "$1" != "${TEA_VERSION}" ; then
    2735         AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
     2870#       Might define the following vars:
     2871#               HAVE_GETHOSTBYADDR_R
     2872#               HAVE_GETHOSTBYADDR_R_7
     2873#               HAVE_GETHOSTBYADDR_R_8
     2874#
     2875#--------------------------------------------------------------------
     2876
     2877AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
     2878    AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [
     2879    AC_TRY_COMPILE([
     2880        #include <netdb.h>
     2881    ], [
     2882        char *addr;
     2883        int length;
     2884        int type;
     2885        struct hostent *result;
     2886        char buffer[2048];
     2887        int buflen = 2048;
     2888        int h_errnop;
     2889
     2890        (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
     2891                               &h_errnop);
     2892    ], tcl_cv_api_gethostbyaddr_r_7=yes, tcl_cv_api_gethostbyaddr_r_7=no)])
     2893    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
     2894    if test "$tcl_ok" = yes; then
     2895        AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
    27362896    else
    2737         AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
    2738     fi
    2739     case "`uname -s`" in
    2740         *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*|*MSYS_NT*)
    2741             AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
    2742             EXEEXT=".exe"
    2743             TEA_PLATFORM="windows"
    2744             ;;
    2745         *)
    2746             CYGPATH=echo
    2747             EXEEXT=""
    2748             TEA_PLATFORM="unix"
    2749             ;;
    2750     esac
    2751 
    2752     # Check if exec_prefix is set. If not use fall back to prefix.
    2753     # Note when adjusted, so that TEA_PREFIX can correct for this.
    2754     # This is needed for recursive configures, since autoconf propagates
    2755     # $prefix, but not $exec_prefix (doh!).
    2756     if test x$exec_prefix = xNONE ; then
    2757         exec_prefix_default=yes
    2758         exec_prefix=$prefix
    2759     fi
    2760 
    2761     AC_SUBST(EXEEXT)
    2762     AC_SUBST(CYGPATH)
    2763 
    2764     # This package name must be replaced statically for AC_SUBST to work
    2765     AC_SUBST(PKG_LIB_FILE)
    2766     # Substitute STUB_LIB_FILE in case package creates a stub library too.
    2767     AC_SUBST(PKG_STUB_LIB_FILE)
    2768 
    2769     # We AC_SUBST these here to ensure they are subst'ed,
    2770     # in case the user doesn't call TEA_ADD_...
    2771     AC_SUBST(PKG_STUB_SOURCES)
    2772     AC_SUBST(PKG_STUB_OBJECTS)
    2773     AC_SUBST(PKG_TCL_SOURCES)
    2774     AC_SUBST(PKG_HEADERS)
    2775     AC_SUBST(PKG_INCLUDES)
    2776     AC_SUBST(PKG_LIBS)
    2777     AC_SUBST(PKG_CFLAGS)
    2778 ])
    2779 
    2780 #------------------------------------------------------------------------
    2781 # TEA_ADD_SOURCES --
    2782 #
    2783 #       Specify one or more source files.  Users should check for
    2784 #       the right platform before adding to their list.
    2785 #       It is not important to specify the directory, as long as it is
    2786 #       in the generic, win or unix subdirectory of $(srcdir).
     2897        AC_CACHE_CHECK([for gethostbyaddr_r with 8 args], tcl_cv_api_gethostbyaddr_r_8, [
     2898        AC_TRY_COMPILE([
     2899            #include <netdb.h>
     2900        ], [
     2901            char *addr;
     2902            int length;
     2903            int type;
     2904            struct hostent *result, *resultp;
     2905            char buffer[2048];
     2906            int buflen = 2048;
     2907            int h_errnop;
     2908
     2909            (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
     2910                                   &resultp, &h_errnop);
     2911        ], tcl_cv_api_gethostbyaddr_r_8=yes, tcl_cv_api_gethostbyaddr_r_8=no)])
     2912        tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
     2913        if test "$tcl_ok" = yes; then
     2914            AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
     2915        fi
     2916    fi
     2917    if test "$tcl_ok" = yes; then
     2918        AC_DEFINE(HAVE_GETHOSTBYADDR_R)
     2919    fi
     2920])])
     2921
     2922#--------------------------------------------------------------------
     2923# SC_TCL_GETHOSTBYNAME_R
     2924#
     2925#       Check to see what variant of gethostbyname_r() we have.
     2926#       Based on David Arnold's example from the comp.programming.threads
     2927#       FAQ Q213
    27872928#
    27882929# Arguments:
    2789 #       one or more file names
    2790 #
     2930#       None
     2931#       
    27912932# Results:
    27922933#
    2793 #       Defines and substs the following vars:
    2794 #               PKG_SOURCES
    2795 #               PKG_OBJECTS
    2796 #------------------------------------------------------------------------
    2797 AC_DEFUN([TEA_ADD_SOURCES], [
    2798     vars="$@"
    2799     for i in $vars; do
    2800         case $i in
    2801             [\$]*)
    2802                 # allow $-var names
    2803                 PKG_SOURCES="$PKG_SOURCES $i"
    2804                 PKG_OBJECTS="$PKG_OBJECTS $i"
    2805                 ;;
    2806             *)
    2807                 # check for existence - allows for generic/win/unix VPATH
    2808                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \
    2809                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
    2810                     ; then
    2811                     AC_MSG_ERROR([could not find source file '$i'])
    2812                 fi
    2813                 PKG_SOURCES="$PKG_SOURCES $i"
    2814                 # this assumes it is in a VPATH dir
    2815                 i=`basename $i`
    2816                 # handle user calling this before or after TEA_SETUP_COMPILER
    2817                 if test x"${OBJEXT}" != x ; then
    2818                     j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
    2819                 else
    2820                     j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
    2821                 fi
    2822                 PKG_OBJECTS="$PKG_OBJECTS $j"
    2823                 ;;
    2824         esac
    2825     done
    2826     AC_SUBST(PKG_SOURCES)
    2827     AC_SUBST(PKG_OBJECTS)
    2828 ])
    2829 
    2830 #------------------------------------------------------------------------
    2831 # TEA_ADD_STUB_SOURCES --
    2832 #
    2833 #       Specify one or more source files.  Users should check for
    2834 #       the right platform before adding to their list.
    2835 #       It is not important to specify the directory, as long as it is
    2836 #       in the generic, win or unix subdirectory of $(srcdir).
     2934#       Might define the following vars:
     2935#               HAVE_GETHOSTBYADDR_R
     2936#               HAVE_GETHOSTBYADDR_R_3
     2937#               HAVE_GETHOSTBYADDR_R_5
     2938#               HAVE_GETHOSTBYADDR_R_6
     2939#
     2940#--------------------------------------------------------------------
     2941
     2942AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [
     2943    AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [
     2944    AC_TRY_COMPILE([
     2945        #include <netdb.h>
     2946    ], [
     2947        char *name;
     2948        struct hostent *he, *res;
     2949        char buffer[2048];
     2950        int buflen = 2048;
     2951        int h_errnop;
     2952
     2953        (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
     2954    ], tcl_cv_api_gethostbyname_r_6=yes, tcl_cv_api_gethostbyname_r_6=no)])
     2955    tcl_ok=$tcl_cv_api_gethostbyname_r_6
     2956    if test "$tcl_ok" = yes; then
     2957        AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
     2958    else
     2959        AC_CACHE_CHECK([for gethostbyname_r with 5 args], tcl_cv_api_gethostbyname_r_5, [
     2960        AC_TRY_COMPILE([
     2961            #include <netdb.h>
     2962        ], [
     2963            char *name;
     2964            struct hostent *he;
     2965            char buffer[2048];
     2966            int buflen = 2048;
     2967            int h_errnop;
     2968
     2969            (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
     2970        ], tcl_cv_api_gethostbyname_r_5=yes, tcl_cv_api_gethostbyname_r_5=no)])
     2971        tcl_ok=$tcl_cv_api_gethostbyname_r_5
     2972        if test "$tcl_ok" = yes; then
     2973            AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
     2974        else
     2975            AC_CACHE_CHECK([for gethostbyname_r with 3 args], tcl_cv_api_gethostbyname_r_3, [
     2976            AC_TRY_COMPILE([
     2977                #include <netdb.h>
     2978            ], [
     2979                char *name;
     2980                struct hostent *he;
     2981                struct hostent_data data;
     2982
     2983                (void) gethostbyname_r(name, he, &data);
     2984            ], tcl_cv_api_gethostbyname_r_3=yes, tcl_cv_api_gethostbyname_r_3=no)])
     2985            tcl_ok=$tcl_cv_api_gethostbyname_r_3
     2986            if test "$tcl_ok" = yes; then
     2987                AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
     2988            fi
     2989        fi
     2990    fi
     2991    if test "$tcl_ok" = yes; then
     2992        AC_DEFINE(HAVE_GETHOSTBYNAME_R)
     2993    fi
     2994])])
     2995
     2996#--------------------------------------------------------------------
     2997# SC_TCL_GETPWUID_R
     2998#
     2999#       Check if we have MT-safe variant of getpwuid() and if yes,
     3000#       which one exactly.
    28373001#
    28383002# Arguments:
    2839 #       one or more file names
    2840 #
     3003#       None
     3004#       
    28413005# Results:
    28423006#
    2843 #       Defines and substs the following vars:
    2844 #               PKG_STUB_SOURCES
    2845 #               PKG_STUB_OBJECTS
    2846 #------------------------------------------------------------------------
    2847 AC_DEFUN([TEA_ADD_STUB_SOURCES], [
    2848     vars="$@"
    2849     for i in $vars; do
    2850         # check for existence - allows for generic/win/unix VPATH
    2851         if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
    2852             -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
    2853             ; then
    2854             AC_MSG_ERROR([could not find stub source file '$i'])
     3007#       Might define the following vars:
     3008#               HAVE_GETPWUID_R
     3009#               HAVE_GETPWUID_R_4
     3010#               HAVE_GETPWUID_R_5
     3011#
     3012#--------------------------------------------------------------------
     3013
     3014AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
     3015    AC_CACHE_CHECK([for getpwuid_r with 5 args], tcl_cv_api_getpwuid_r_5, [
     3016    AC_TRY_COMPILE([
     3017        #include <sys/types.h>
     3018        #include <pwd.h>
     3019    ], [
     3020        uid_t uid;
     3021        struct passwd pw, *pwp;
     3022        char buf[512];
     3023        int buflen = 512;
     3024
     3025        (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
     3026    ], tcl_cv_api_getpwuid_r_5=yes, tcl_cv_api_getpwuid_r_5=no)])
     3027    tcl_ok=$tcl_cv_api_getpwuid_r_5
     3028    if test "$tcl_ok" = yes; then
     3029        AC_DEFINE(HAVE_GETPWUID_R_5)
     3030    else
     3031        AC_CACHE_CHECK([for getpwuid_r with 4 args], tcl_cv_api_getpwuid_r_4, [
     3032        AC_TRY_COMPILE([
     3033            #include <sys/types.h>
     3034            #include <pwd.h>
     3035        ], [
     3036            uid_t uid;
     3037            struct passwd pw;
     3038            char buf[512];
     3039            int buflen = 512;
     3040
     3041            (void)getpwnam_r(uid, &pw, buf, buflen);
     3042        ], tcl_cv_api_getpwuid_r_4=yes, tcl_cv_api_getpwuid_r_4=no)])
     3043        tcl_ok=$tcl_cv_api_getpwuid_r_4
     3044        if test "$tcl_ok" = yes; then
     3045            AC_DEFINE(HAVE_GETPWUID_R_4)
    28553046        fi
    2856         PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
    2857         # this assumes it is in a VPATH dir
    2858         i=`basename $i`
    2859         # handle user calling this before or after TEA_SETUP_COMPILER
    2860         if test x"${OBJEXT}" != x ; then
    2861             j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
    2862         else
    2863             j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
     3047    fi
     3048    if test "$tcl_ok" = yes; then
     3049        AC_DEFINE(HAVE_GETPWUID_R)
     3050    fi
     3051])])
     3052
     3053#--------------------------------------------------------------------
     3054# SC_TCL_GETPWNAM_R
     3055#
     3056#       Check if we have MT-safe variant of getpwnam() and if yes,
     3057#       which one exactly.
     3058#
     3059# Arguments:
     3060#       None
     3061#       
     3062# Results:
     3063#
     3064#       Might define the following vars:
     3065#               HAVE_GETPWNAM_R
     3066#               HAVE_GETPWNAM_R_4
     3067#               HAVE_GETPWNAM_R_5
     3068#
     3069#--------------------------------------------------------------------
     3070
     3071AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
     3072    AC_CACHE_CHECK([for getpwnam_r with 5 args], tcl_cv_api_getpwnam_r_5, [
     3073    AC_TRY_COMPILE([
     3074        #include <sys/types.h>
     3075        #include <pwd.h>
     3076    ], [
     3077        char *name;
     3078        struct passwd pw, *pwp;
     3079        char buf[512];
     3080        int buflen = 512;
     3081
     3082        (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
     3083    ], tcl_cv_api_getpwnam_r_5=yes, tcl_cv_api_getpwnam_r_5=no)])
     3084    tcl_ok=$tcl_cv_api_getpwnam_r_5
     3085    if test "$tcl_ok" = yes; then
     3086        AC_DEFINE(HAVE_GETPWNAM_R_5)
     3087    else
     3088        AC_CACHE_CHECK([for getpwnam_r with 4 args], tcl_cv_api_getpwnam_r_4, [
     3089        AC_TRY_COMPILE([
     3090            #include <sys/types.h>
     3091            #include <pwd.h>
     3092        ], [
     3093            char *name;
     3094            struct passwd pw;
     3095            char buf[512];
     3096            int buflen = 512;
     3097
     3098            (void)getpwnam_r(name, &pw, buf, buflen);
     3099        ], tcl_cv_api_getpwnam_r_4=yes, tcl_cv_api_getpwnam_r_4=no)])
     3100        tcl_ok=$tcl_cv_api_getpwnam_r_4
     3101        if test "$tcl_ok" = yes; then
     3102            AC_DEFINE(HAVE_GETPWNAM_R_4)
    28643103        fi
    2865         PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
    2866     done
    2867     AC_SUBST(PKG_STUB_SOURCES)
    2868     AC_SUBST(PKG_STUB_OBJECTS)
    2869 ])
    2870 
    2871 #------------------------------------------------------------------------
    2872 # TEA_ADD_TCL_SOURCES --
    2873 #
    2874 #       Specify one or more Tcl source files.  These should be platform
    2875 #       independent runtime files.
     3104    fi
     3105    if test "$tcl_ok" = yes; then
     3106        AC_DEFINE(HAVE_GETPWNAM_R)
     3107    fi
     3108])])
     3109
     3110#--------------------------------------------------------------------
     3111# SC_TCL_GETGRGID_R
     3112#
     3113#       Check if we have MT-safe variant of getgrgid() and if yes,
     3114#       which one exactly.
    28763115#
    28773116# Arguments:
    2878 #       one or more file names
    2879 #
     3117#       None
     3118#       
    28803119# Results:
    28813120#
    2882 #       Defines and substs the following vars:
    2883 #               PKG_TCL_SOURCES
    2884 #------------------------------------------------------------------------
    2885 AC_DEFUN([TEA_ADD_TCL_SOURCES], [
    2886     vars="$@"
    2887     for i in $vars; do
    2888         # check for existence, be strict because it is installed
    2889         if test ! -f "${srcdir}/$i" ; then
    2890             AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
     3121#       Might define the following vars:
     3122#               HAVE_GETGRGID_R
     3123#               HAVE_GETGRGID_R_4
     3124#               HAVE_GETGRGID_R_5
     3125#
     3126#--------------------------------------------------------------------
     3127
     3128AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
     3129    AC_CACHE_CHECK([for getgrgid_r with 5 args], tcl_cv_api_getgrgid_r_5, [
     3130    AC_TRY_COMPILE([
     3131        #include <sys/types.h>
     3132        #include <grp.h>
     3133    ], [
     3134        gid_t gid;
     3135        struct group gr, *grp;
     3136        char buf[512];
     3137        int buflen = 512;
     3138
     3139        (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
     3140    ], tcl_cv_api_getgrgid_r_5=yes, tcl_cv_api_getgrgid_r_5=no)])
     3141    tcl_ok=$tcl_cv_api_getgrgid_r_5
     3142    if test "$tcl_ok" = yes; then
     3143        AC_DEFINE(HAVE_GETGRGID_R_5)
     3144    else
     3145        AC_CACHE_CHECK([for getgrgid_r with 4 args], tcl_cv_api_getgrgid_r_4, [
     3146        AC_TRY_COMPILE([
     3147            #include <sys/types.h>
     3148            #include <grp.h>
     3149        ], [
     3150            gid_t gid;
     3151            struct group gr;
     3152            char buf[512];
     3153            int buflen = 512;
     3154
     3155            (void)getgrgid_r(gid, &gr, buf, buflen);
     3156        ], tcl_cv_api_getgrgid_r_4=yes, tcl_cv_api_getgrgid_r_4=no)])
     3157        tcl_ok=$tcl_cv_api_getgrgid_r_4
     3158        if test "$tcl_ok" = yes; then
     3159            AC_DEFINE(HAVE_GETGRGID_R_4)
    28913160        fi
    2892         PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
    2893     done
    2894     AC_SUBST(PKG_TCL_SOURCES)
    2895 ])
    2896 
    2897 #------------------------------------------------------------------------
    2898 # TEA_ADD_HEADERS --
    2899 #
    2900 #       Specify one or more source headers.  Users should check for
    2901 #       the right platform before adding to their list.
     3161    fi
     3162    if test "$tcl_ok" = yes; then
     3163        AC_DEFINE(HAVE_GETGRGID_R)
     3164    fi
     3165])])
     3166
     3167#--------------------------------------------------------------------
     3168# SC_TCL_GETGRNAM_R
     3169#
     3170#       Check if we have MT-safe variant of getgrnam() and if yes,
     3171#       which one exactly.
    29023172#
    29033173# Arguments:
    2904 #       one or more file names
    2905 #
     3174#       None
     3175#       
    29063176# Results:
    29073177#
    2908 #       Defines and substs the following vars:
    2909 #               PKG_HEADERS
    2910 #------------------------------------------------------------------------
    2911 AC_DEFUN([TEA_ADD_HEADERS], [
    2912     vars="$@"
    2913     for i in $vars; do
    2914         # check for existence, be strict because it is installed
    2915         if test ! -f "${srcdir}/$i" ; then
    2916             AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
     3178#       Might define the following vars:
     3179#               HAVE_GETGRNAM_R
     3180#               HAVE_GETGRNAM_R_4
     3181#               HAVE_GETGRNAM_R_5
     3182#
     3183#--------------------------------------------------------------------
     3184
     3185AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
     3186    AC_CACHE_CHECK([for getgrnam_r with 5 args], tcl_cv_api_getgrnam_r_5, [
     3187    AC_TRY_COMPILE([
     3188        #include <sys/types.h>
     3189        #include <grp.h>
     3190    ], [
     3191        char *name;
     3192        struct group gr, *grp;
     3193        char buf[512];
     3194        int buflen = 512;
     3195
     3196        (void) getgrnam_r(name, &gr, buf, buflen, &grp);
     3197    ], tcl_cv_api_getgrnam_r_5=yes, tcl_cv_api_getgrnam_r_5=no)])
     3198    tcl_ok=$tcl_cv_api_getgrnam_r_5
     3199    if test "$tcl_ok" = yes; then
     3200        AC_DEFINE(HAVE_GETGRNAM_R_5)
     3201    else
     3202        AC_CACHE_CHECK([for getgrnam_r with 4 args], tcl_cv_api_getgrnam_r_4, [
     3203        AC_TRY_COMPILE([
     3204            #include <sys/types.h>
     3205            #include <grp.h>
     3206        ], [
     3207            char *name;
     3208            struct group gr;
     3209            char buf[512];
     3210            int buflen = 512;
     3211
     3212            (void)getgrnam_r(name, &gr, buf, buflen);
     3213        ], tcl_cv_api_getgrnam_r_4=yes, tcl_cv_api_getgrnam_r_4=no)])
     3214        tcl_ok=$tcl_cv_api_getgrnam_r_4
     3215        if test "$tcl_ok" = yes; then
     3216            AC_DEFINE(HAVE_GETGRNAM_R_4)
    29173217        fi
    2918         PKG_HEADERS="$PKG_HEADERS $i"
    2919     done
    2920     AC_SUBST(PKG_HEADERS)
    2921 ])
    2922 
    2923 #------------------------------------------------------------------------
    2924 # TEA_ADD_INCLUDES --
    2925 #
    2926 #       Specify one or more include dirs.  Users should check for
    2927 #       the right platform before adding to their list.
    2928 #
    2929 # Arguments:
    2930 #       one or more file names
    2931 #
    2932 # Results:
    2933 #
    2934 #       Defines and substs the following vars:
    2935 #               PKG_INCLUDES
    2936 #------------------------------------------------------------------------
    2937 AC_DEFUN([TEA_ADD_INCLUDES], [
    2938     vars="$@"
    2939     for i in $vars; do
    2940         PKG_INCLUDES="$PKG_INCLUDES $i"
    2941     done
    2942     AC_SUBST(PKG_INCLUDES)
    2943 ])
    2944 
    2945 #------------------------------------------------------------------------
    2946 # TEA_ADD_LIBS --
    2947 #
    2948 #       Specify one or more libraries.  Users should check for
    2949 #       the right platform before adding to their list.  For Windows,
    2950 #       libraries provided in "foo.lib" format will be converted to
    2951 #       "-lfoo" when using GCC (mingw).
    2952 #
    2953 # Arguments:
    2954 #       one or more file names
    2955 #
    2956 # Results:
    2957 #
    2958 #       Defines and substs the following vars:
    2959 #               PKG_LIBS
    2960 #------------------------------------------------------------------------
    2961 AC_DEFUN([TEA_ADD_LIBS], [
    2962     vars="$@"
    2963     for i in $vars; do
    2964         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
    2965             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
    2966             i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
    2967         fi
    2968         PKG_LIBS="$PKG_LIBS $i"
    2969     done
    2970     AC_SUBST(PKG_LIBS)
    2971 ])
    2972 
    2973 #------------------------------------------------------------------------
    2974 # TEA_ADD_CFLAGS --
    2975 #
    2976 #       Specify one or more CFLAGS.  Users should check for
    2977 #       the right platform before adding to their list.
    2978 #
    2979 # Arguments:
    2980 #       one or more file names
    2981 #
    2982 # Results:
    2983 #
    2984 #       Defines and substs the following vars:
    2985 #               PKG_CFLAGS
    2986 #------------------------------------------------------------------------
    2987 AC_DEFUN([TEA_ADD_CFLAGS], [
    2988     PKG_CFLAGS="$PKG_CFLAGS $@"
    2989     AC_SUBST(PKG_CFLAGS)
    2990 ])
    2991 
    2992 #------------------------------------------------------------------------
    2993 # TEA_PREFIX --
    2994 #
    2995 #       Handle the --prefix=... option by defaulting to what Tcl gave
    2996 #
    2997 # Arguments:
    2998 #       none
    2999 #
    3000 # Results:
    3001 #
    3002 #       If --prefix or --exec-prefix was not specified, $prefix and
    3003 #       $exec_prefix will be set to the values given to Tcl when it was
    3004 #       configured.
    3005 #------------------------------------------------------------------------
    3006 AC_DEFUN([TEA_PREFIX], [
    3007     if test "${prefix}" = "NONE"; then
    3008         prefix_default=yes
    3009         if test x"${TCL_PREFIX}" != x; then
    3010             AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
    3011             prefix=${TCL_PREFIX}
    3012         else
    3013             AC_MSG_NOTICE([--prefix defaulting to /usr/local])
    3014             prefix=/usr/local
    3015         fi
    3016     fi
    3017     if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
    3018         -o x"${exec_prefix_default}" = x"yes" ; then
    3019         if test x"${TCL_EXEC_PREFIX}" != x; then
    3020             AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
    3021             exec_prefix=${TCL_EXEC_PREFIX}
    3022         else
    3023             AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
    3024             exec_prefix=$prefix
    3025         fi
    3026     fi
    3027 ])
    3028 
    3029 #------------------------------------------------------------------------
    3030 # TEA_SETUP_COMPILER_CC --
    3031 #
    3032 #       Do compiler checks the way we want.  This is just a replacement
    3033 #       for AC_PROG_CC in TEA configure.in files to make them cleaner.
    3034 #
    3035 # Arguments:
    3036 #       none
    3037 #
    3038 # Results:
    3039 #
    3040 #       Sets up CC var and other standard bits we need to make executables.
    3041 #------------------------------------------------------------------------
    3042 AC_DEFUN([TEA_SETUP_COMPILER_CC], [
    3043     # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
    3044     # in this macro, they need to go into TEA_SETUP_COMPILER instead.
    3045 
    3046     # If the user did not set CFLAGS, set it now to keep
    3047     # the AC_PROG_CC macro from adding "-g -O2".
    3048     if test "${CFLAGS+set}" != "set" ; then
    3049         CFLAGS=""
    3050     fi
    3051 
    3052     AC_PROG_CC
    3053     AC_PROG_CXX
    3054     AC_PROG_CPP
    3055 
    3056     AC_PROG_INSTALL
    3057 
    3058     #--------------------------------------------------------------------
    3059     # Checks to see if the make program sets the $MAKE variable.
    3060     #--------------------------------------------------------------------
    3061 
    3062     AC_PROG_MAKE_SET
    3063 
    3064     #--------------------------------------------------------------------
    3065     # Find ranlib
    3066     #--------------------------------------------------------------------
    3067 
    3068     AC_PROG_RANLIB
    3069 
    3070     #--------------------------------------------------------------------
    3071     # Determines the correct binary file extension (.o, .obj, .exe etc.)
    3072     #--------------------------------------------------------------------
    3073 
    3074     AC_OBJEXT
    3075     AC_EXEEXT
    3076 ])
    3077 
    3078 #------------------------------------------------------------------------
    3079 # TEA_SETUP_COMPILER --
    3080 #
    3081 #       Do compiler checks that use the compiler.  This must go after
    3082 #       TEA_SETUP_COMPILER_CC, which does the actual compiler check.
    3083 #
    3084 # Arguments:
    3085 #       none
    3086 #
    3087 # Results:
    3088 #
    3089 #       Sets up CC var and other standard bits we need to make executables.
    3090 #------------------------------------------------------------------------
    3091 AC_DEFUN([TEA_SETUP_COMPILER], [
    3092     # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
    3093     AC_REQUIRE([TEA_SETUP_COMPILER_CC])
    3094 
    3095     #------------------------------------------------------------------------
    3096     # If we're using GCC, see if the compiler understands -pipe. If so, use it.
    3097     # It makes compiling go faster.  (This is only a performance feature.)
    3098     #------------------------------------------------------------------------
    3099 
    3100     if test -z "$no_pipe" -a -n "$GCC"; then
    3101         AC_MSG_CHECKING([if the compiler understands -pipe])
    3102         OLDCC="$CC"
    3103         CC="$CC -pipe"
    3104         AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
    3105             AC_MSG_RESULT([no]))
    3106     fi
    3107 
    3108     #--------------------------------------------------------------------
    3109     # Common compiler flag setup
    3110     #--------------------------------------------------------------------
    3111 
    3112     AC_C_BIGENDIAN
    3113     if test "${TEA_PLATFORM}" = "unix" ; then
    3114         TEA_TCL_LINK_LIBS
    3115         TEA_MISSING_POSIX_HEADERS
    3116         # Let the user call this, because if it triggers, they will
    3117         # need a compat/strtod.c that is correct.  Users can also
    3118         # use Tcl_GetDouble(FromObj) instead.
    3119         #TEA_BUGGY_STRTOD
    3120     fi
    3121 ])
    3122 
    3123 #------------------------------------------------------------------------
    3124 # TEA_MAKE_LIB --
    3125 #
    3126 #       Generate a line that can be used to build a shared/unshared library
    3127 #       in a platform independent manner.
    3128 #
    3129 # Arguments:
    3130 #       none
    3131 #
    3132 #       Requires:
    3133 #
    3134 # Results:
    3135 #
    3136 #       Defines the following vars:
    3137 #       CFLAGS -        Done late here to note disturb other AC macros
    3138 #       MAKE_LIB -      Command to execute to build the Tcl library;
    3139 #                       differs depending on whether or not Tcl is being
    3140 #                       compiled as a shared library.
    3141 #       MAKE_SHARED_LIB Makefile rule for building a shared library
    3142 #       MAKE_STATIC_LIB Makefile rule for building a static library
    3143 #       MAKE_STUB_LIB   Makefile rule for building a stub library
    3144 #------------------------------------------------------------------------
    3145 
    3146 AC_DEFUN([TEA_MAKE_LIB], [
    3147     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
    3148         MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
    3149         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
    3150         MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
    3151     else
    3152         MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
    3153         MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
    3154         MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
    3155     fi
    3156 
    3157     if test "${SHARED_BUILD}" = "1" ; then
    3158         MAKE_LIB="${MAKE_SHARED_LIB} "
    3159     else
    3160         MAKE_LIB="${MAKE_STATIC_LIB} "
    3161     fi
    3162 
    3163     #--------------------------------------------------------------------
    3164     # Shared libraries and static libraries have different names.
    3165     # Use the double eval to make sure any variables in the suffix is
    3166     # substituted. (@@@ Might not be necessary anymore)
    3167     #--------------------------------------------------------------------
    3168 
    3169     if test "${TEA_PLATFORM}" = "windows" ; then
    3170         if test "${SHARED_BUILD}" = "1" ; then
    3171             # We force the unresolved linking of symbols that are really in
    3172             # the private libraries of Tcl and Tk.
    3173             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
    3174             if test x"${TK_BIN_DIR}" != x ; then
    3175                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
    3176             fi
    3177             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
    3178         else
    3179             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    3180         fi
    3181         # Some packages build their own stubs libraries
    3182         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
    3183         if test "$GCC" = "yes"; then
    3184             PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
    3185         fi
    3186         # These aren't needed on Windows (either MSVC or gcc)
    3187         RANLIB="mt -manifest ${PKG_LIB_FILE}.manifest -outputresource:${PKG_LIB_FILE}\;2 ; test -f"
    3188         RANLIB_STUB=:
    3189     else
    3190         RANLIB_STUB="${RANLIB}"
    3191         if test "${SHARED_BUILD}" = "1" ; then
    3192             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
    3193             if test x"${TK_BIN_DIR}" != x ; then
    3194                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
    3195             fi
    3196             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
    3197             RANLIB=:
    3198         else
    3199             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
    3200         fi
    3201         # Some packages build their own stubs libraries
    3202         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
    3203     fi
    3204 
    3205     # These are escaped so that only CFLAGS is picked up at configure time.
    3206     # The other values will be substituted at make time.
    3207     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
    3208     if test "${SHARED_BUILD}" = "1" ; then
    3209         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
    3210     fi
    3211 
    3212     AC_SUBST(MAKE_LIB)
    3213     AC_SUBST(MAKE_SHARED_LIB)
    3214     AC_SUBST(MAKE_STATIC_LIB)
    3215     AC_SUBST(MAKE_STUB_LIB)
    3216     AC_SUBST(RANLIB_STUB)
    3217     AC_SUBST(RANLIB)
    3218 ])
    3219 
    3220 #------------------------------------------------------------------------
    3221 # TEA_LIB_SPEC --
    3222 #
    3223 #       Compute the name of an existing object library located in libdir
    3224 #       from the given base name and produce the appropriate linker flags.
    3225 #
    3226 # Arguments:
    3227 #       basename        The base name of the library without version
    3228 #                       numbers, extensions, or "lib" prefixes.
    3229 #       extra_dir       Extra directory in which to search for the
    3230 #                       library.  This location is used first, then
    3231 #                       $prefix/$exec-prefix, then some defaults.
    3232 #
    3233 # Requires:
    3234 #       TEA_INIT and TEA_PREFIX must be called first.
    3235 #
    3236 # Results:
    3237 #
    3238 #       Defines the following vars:
    3239 #               ${basename}_LIB_NAME    The computed library name.
    3240 #               ${basename}_LIB_SPEC    The computed linker flags.
    3241 #------------------------------------------------------------------------
    3242 
    3243 AC_DEFUN([TEA_LIB_SPEC], [
    3244     AC_MSG_CHECKING([for $1 library])
    3245 
    3246     # Look in exec-prefix for the library (defined by TEA_PREFIX).
    3247 
    3248     tea_lib_name_dir="${exec_prefix}/lib"
    3249 
    3250     # Or in a user-specified location.
    3251 
    3252     if test x"$2" != x ; then
    3253         tea_extra_lib_dir=$2
    3254     else
    3255         tea_extra_lib_dir=NONE
    3256     fi
    3257 
    3258     for i in \
    3259             `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
    3260             `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
    3261             `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
    3262             `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
    3263             `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
    3264             `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
    3265             `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
    3266             `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
    3267         if test -f "$i" ; then
    3268             tea_lib_name_dir=`dirname $i`
    3269             $1_LIB_NAME=`basename $i`
    3270             $1_LIB_PATH_NAME=$i
    3271             break
    3272         fi
    3273     done
    3274 
    3275     if test "${TEA_PLATFORM}" = "windows"; then
    3276         $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
    3277     else
    3278         # Strip off the leading "lib" and trailing ".a" or ".so"
    3279 
    3280         tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
    3281         $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
    3282     fi
    3283 
    3284     if test "x${$1_LIB_NAME}" = x ; then
    3285         AC_MSG_ERROR([not found])
    3286     else
    3287         AC_MSG_RESULT([${$1_LIB_SPEC}])
    3288     fi
    3289 ])
    3290 
    3291 #------------------------------------------------------------------------
    3292 # TEA_PRIVATE_TCL_HEADERS --
    3293 #
    3294 #       Locate the private Tcl include files
    3295 #
    3296 # Arguments:
    3297 #
    3298 #       Requires:
    3299 #               TCL_SRC_DIR     Assumes that TEA_LOAD_TCLCONFIG has
    3300 #                                already been called.
    3301 #
    3302 # Results:
    3303 #
    3304 #       Substs the following vars:
    3305 #               TCL_TOP_DIR_NATIVE
    3306 #               TCL_GENERIC_DIR_NATIVE
    3307 #               TCL_UNIX_DIR_NATIVE
    3308 #               TCL_WIN_DIR_NATIVE
    3309 #               TCL_BMAP_DIR_NATIVE
    3310 #               TCL_TOOL_DIR_NATIVE
    3311 #               TCL_PLATFORM_DIR_NATIVE
    3312 #               TCL_BIN_DIR_NATIVE
    3313 #               TCL_INCLUDES
    3314 #------------------------------------------------------------------------
    3315 
    3316 AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
    3317     AC_MSG_CHECKING([for Tcl private include files])
    3318 
    3319     TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
    3320     TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
    3321     TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
    3322     TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
    3323     TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
    3324     TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
    3325     TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
    3326     TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
    3327 
    3328     if test "${TEA_PLATFORM}" = "windows"; then
    3329         TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
    3330     else
    3331         TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
    3332     fi
    3333     # We want to ensure these are substituted so as not to require
    3334     # any *_NATIVE vars be defined in the Makefile
    3335     TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
    3336     if test "`uname -s`" = "Darwin"; then
    3337         # If Tcl was built as a framework, attempt to use
    3338         # the framework's Headers and PrivateHeaders directories
    3339         case ${TCL_DEFS} in
    3340             *TCL_FRAMEWORK*)
    3341                 if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
    3342                 TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
    3343                 TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
    3344                 ;;
    3345         esac
    3346     fi
    3347 
    3348     AC_SUBST(TCL_TOP_DIR_NATIVE)
    3349     AC_SUBST(TCL_GENERIC_DIR_NATIVE)
    3350     AC_SUBST(TCL_UNIX_DIR_NATIVE)
    3351     AC_SUBST(TCL_WIN_DIR_NATIVE)
    3352     AC_SUBST(TCL_BMAP_DIR_NATIVE)
    3353     AC_SUBST(TCL_TOOL_DIR_NATIVE)
    3354     AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
    3355 
    3356     AC_SUBST(TCL_INCLUDES)
    3357     AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
    3358 ])
    3359 
    3360 #------------------------------------------------------------------------
    3361 # TEA_PUBLIC_TCL_HEADERS --
    3362 #
    3363 #       Locate the installed public Tcl header files
    3364 #
    3365 # Arguments:
    3366 #       None.
    3367 #
    3368 # Requires:
    3369 #       CYGPATH must be set
    3370 #
    3371 # Results:
    3372 #
    3373 #       Adds a --with-tclinclude switch to configure.
    3374 #       Result is cached.
    3375 #
    3376 #       Substs the following vars:
    3377 #               TCL_INCLUDES
    3378 #------------------------------------------------------------------------
    3379 
    3380 AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
    3381     AC_MSG_CHECKING([for Tcl public headers])
    3382 
    3383     AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files], with_tclinclude=${withval})
    3384 
    3385     AC_CACHE_VAL(ac_cv_c_tclh, [
    3386         # Use the value from --with-tclinclude, if it was given
    3387 
    3388         if test x"${with_tclinclude}" != x ; then
    3389             if test -f "${with_tclinclude}/tcl.h" ; then
    3390                 ac_cv_c_tclh=${with_tclinclude}
    3391             else
    3392                 AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
    3393             fi
    3394         else
    3395             if test "`uname -s`" = "Darwin"; then
    3396                 # If Tcl was built as a framework, attempt to use
    3397                 # the framework's Headers directory
    3398                 case ${TCL_DEFS} in
    3399                     *TCL_FRAMEWORK*)
    3400                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
    3401                         ;;
    3402                 esac
    3403             fi
    3404 
    3405             # Look in the source dir only if Tcl is not installed,
    3406             # and in that situation, look there before installed locations.
    3407             if test -f "${TCL_BIN_DIR}/Makefile" ; then
    3408                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
    3409             fi
    3410 
    3411             # Check order: pkg --prefix location, Tcl's --prefix location,
    3412             # relative to directory of tclConfig.sh.
    3413 
    3414             eval "temp_includedir=${includedir}"
    3415             list="$list \
    3416                 `ls -d ${temp_includedir}        2>/dev/null` \
    3417                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
    3418                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
    3419             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
    3420                 list="$list /usr/local/include /usr/include"
    3421                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
    3422                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
    3423                     list="$list `ls -d ${d} 2>/dev/null`"
    3424                 fi
    3425             fi
    3426             for i in $list ; do
    3427                 if test -f "$i/tcl.h" ; then
    3428                     ac_cv_c_tclh=$i
    3429                     break
    3430                 fi
    3431             done
    3432         fi
    3433     ])
    3434 
    3435     # Print a message based on how we determined the include path
    3436 
    3437     if test x"${ac_cv_c_tclh}" = x ; then
    3438         AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
    3439     else
    3440         AC_MSG_RESULT([${ac_cv_c_tclh}])
    3441     fi
    3442 
    3443     # Convert to a native path and substitute into the output files.
    3444 
    3445     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
    3446 
    3447     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3448 
    3449     AC_SUBST(TCL_INCLUDES)
    3450 ])
    3451 
    3452 #------------------------------------------------------------------------
    3453 # TEA_PRIVATE_TK_HEADERS --
    3454 #
    3455 #       Locate the private Tk include files
    3456 #
    3457 # Arguments:
    3458 #
    3459 #       Requires:
    3460 #               TK_SRC_DIR      Assumes that TEA_LOAD_TKCONFIG has
    3461 #                                already been called.
    3462 #
    3463 # Results:
    3464 #
    3465 #       Substs the following vars:
    3466 #               TK_INCLUDES
    3467 #------------------------------------------------------------------------
    3468 
    3469 AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
    3470     AC_MSG_CHECKING([for Tk private include files])
    3471 
    3472     TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
    3473     TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
    3474     TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
    3475     TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
    3476     TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
    3477     TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
    3478     if test "${TEA_PLATFORM}" = "windows"; then
    3479         TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
    3480     else
    3481         TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
    3482     fi
    3483     # We want to ensure these are substituted so as not to require
    3484     # any *_NATIVE vars be defined in the Makefile
    3485     TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
    3486     if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
    3487         -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3488         TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
    3489     fi
    3490     if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3491         TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx"
    3492     fi
    3493     if test "`uname -s`" = "Darwin"; then
    3494         # If Tk was built as a framework, attempt to use
    3495         # the framework's Headers and PrivateHeaders directories
    3496         case ${TK_DEFS} in
    3497             *TK_FRAMEWORK*)
    3498                 if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then
    3499                 TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
    3500                 ;;
    3501         esac
    3502     fi
    3503 
    3504     AC_SUBST(TK_TOP_DIR_NATIVE)
    3505     AC_SUBST(TK_UNIX_DIR_NATIVE)
    3506     AC_SUBST(TK_WIN_DIR_NATIVE)
    3507     AC_SUBST(TK_GENERIC_DIR_NATIVE)
    3508     AC_SUBST(TK_XLIB_DIR_NATIVE)
    3509     AC_SUBST(TK_PLATFORM_DIR_NATIVE)
    3510 
    3511     AC_SUBST(TK_INCLUDES)
    3512     AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
    3513 ])
    3514 
    3515 #------------------------------------------------------------------------
    3516 # TEA_PUBLIC_TK_HEADERS --
    3517 #
    3518 #       Locate the installed public Tk header files
    3519 #
    3520 # Arguments:
    3521 #       None.
    3522 #
    3523 # Requires:
    3524 #       CYGPATH must be set
    3525 #
    3526 # Results:
    3527 #
    3528 #       Adds a --with-tkinclude switch to configure.
    3529 #       Result is cached.
    3530 #
    3531 #       Substs the following vars:
    3532 #               TK_INCLUDES
    3533 #------------------------------------------------------------------------
    3534 
    3535 AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
    3536     AC_MSG_CHECKING([for Tk public headers])
    3537 
    3538     AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
    3539 
    3540     AC_CACHE_VAL(ac_cv_c_tkh, [
    3541         # Use the value from --with-tkinclude, if it was given
    3542 
    3543         if test x"${with_tkinclude}" != x ; then
    3544             if test -f "${with_tkinclude}/tk.h" ; then
    3545                 ac_cv_c_tkh=${with_tkinclude}
    3546             else
    3547                 AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
    3548             fi
    3549         else
    3550             if test "`uname -s`" = "Darwin"; then
    3551                 # If Tk was built as a framework, attempt to use
    3552                 # the framework's Headers directory.
    3553                 case ${TK_DEFS} in
    3554                     *TK_FRAMEWORK*)
    3555                         list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
    3556                         ;;
    3557                 esac
    3558             fi
    3559 
    3560             # Look in the source dir only if Tk is not installed,
    3561             # and in that situation, look there before installed locations.
    3562             if test -f "${TK_BIN_DIR}/Makefile" ; then
    3563                 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
    3564             fi
    3565 
    3566             # Check order: pkg --prefix location, Tk's --prefix location,
    3567             # relative to directory of tkConfig.sh, Tcl's --prefix location,
    3568             # relative to directory of tclConfig.sh.
    3569 
    3570             eval "temp_includedir=${includedir}"
    3571             list="$list \
    3572                 `ls -d ${temp_includedir}        2>/dev/null` \
    3573                 `ls -d ${TK_PREFIX}/include      2>/dev/null` \
    3574                 `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
    3575                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
    3576                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
    3577             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
    3578                 list="$list /usr/local/include /usr/include"
    3579             fi
    3580             for i in $list ; do
    3581                 if test -f "$i/tk.h" ; then
    3582                     ac_cv_c_tkh=$i
    3583                     break
    3584                 fi
    3585             done
    3586         fi
    3587     ])
    3588 
    3589     # Print a message based on how we determined the include path
    3590 
    3591     if test x"${ac_cv_c_tkh}" = x ; then
    3592         AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
    3593     else
    3594         AC_MSG_RESULT([${ac_cv_c_tkh}])
    3595     fi
    3596 
    3597     # Convert to a native path and substitute into the output files.
    3598 
    3599     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
    3600 
    3601     TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3602 
    3603     AC_SUBST(TK_INCLUDES)
    3604 
    3605     if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
    3606         -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
    3607         # On Windows and Aqua, we need the X compat headers
    3608         AC_MSG_CHECKING([for X11 header files])
    3609         if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
    3610             INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
    3611             TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
    3612             AC_SUBST(TK_XINCLUDES)
    3613         fi
    3614         AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
    3615     fi
    3616 ])
    3617 
    3618 #------------------------------------------------------------------------
    3619 # TEA_PROG_TCLSH
    3620 #       Determine the fully qualified path name of the tclsh executable
    3621 #       in the Tcl build directory or the tclsh installed in a bin
    3622 #       directory. This macro will correctly determine the name
    3623 #       of the tclsh executable even if tclsh has not yet been
    3624 #       built in the build directory. The tclsh found is always
    3625 #       associated with a tclConfig.sh file. This tclsh should be used
    3626 #       only for running extension test cases. It should never be
    3627 #       or generation of files (like pkgIndex.tcl) at build time.
    3628 #
    3629 # Arguments
    3630 #       none
    3631 #
    3632 # Results
    3633 #       Subst's the following values:
    3634 #               TCLSH_PROG
    3635 #------------------------------------------------------------------------
    3636 
    3637 AC_DEFUN([TEA_PROG_TCLSH], [
    3638     AC_MSG_CHECKING([for tclsh])
    3639     if test -f "${TCL_BIN_DIR}/Makefile" ; then
    3640         # tclConfig.sh is in Tcl build directory
    3641         if test "${TEA_PLATFORM}" = "windows"; then
    3642             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
    3643         else
    3644             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
    3645         fi
    3646     else
    3647         # tclConfig.sh is in install location
    3648         if test "${TEA_PLATFORM}" = "windows"; then
    3649             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
    3650         else
    3651             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
    3652         fi
    3653         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
    3654               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
    3655               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
    3656         for i in $list ; do
    3657             if test -f "$i/${TCLSH_PROG}" ; then
    3658                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
    3659                 break
    3660             fi
    3661         done
    3662         TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
    3663     fi
    3664     AC_MSG_RESULT([${TCLSH_PROG}])
    3665     AC_SUBST(TCLSH_PROG)
    3666 ])
    3667 
    3668 #------------------------------------------------------------------------
    3669 # TEA_PROG_WISH
    3670 #       Determine the fully qualified path name of the wish executable
    3671 #       in the Tk build directory or the wish installed in a bin
    3672 #       directory. This macro will correctly determine the name
    3673 #       of the wish executable even if wish has not yet been
    3674 #       built in the build directory. The wish found is always
    3675 #       associated with a tkConfig.sh file. This wish should be used
    3676 #       only for running extension test cases. It should never be
    3677 #       or generation of files (like pkgIndex.tcl) at build time.
    3678 #
    3679 # Arguments
    3680 #       none
    3681 #
    3682 # Results
    3683 #       Subst's the following values:
    3684 #               WISH_PROG
    3685 #------------------------------------------------------------------------
    3686 
    3687 AC_DEFUN([TEA_PROG_WISH], [
    3688     AC_MSG_CHECKING([for wish])
    3689     if test -f "${TK_BIN_DIR}/Makefile" ; then
    3690         # tkConfig.sh is in Tk build directory
    3691         if test "${TEA_PLATFORM}" = "windows"; then
    3692             WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
    3693         else
    3694             WISH_PROG="${TK_BIN_DIR}/wish"
    3695         fi
    3696     else
    3697         # tkConfig.sh is in install location
    3698         if test "${TEA_PLATFORM}" = "windows"; then
    3699             WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
    3700         else
    3701             WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
    3702         fi
    3703         list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
    3704               `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
    3705               `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
    3706         for i in $list ; do
    3707             if test -f "$i/${WISH_PROG}" ; then
    3708                 REAL_TK_BIN_DIR="`cd "$i"; pwd`"
    3709                 break
    3710             fi
    3711         done
    3712         WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}"
    3713     fi
    3714     AC_MSG_RESULT([${WISH_PROG}])
    3715     AC_SUBST(WISH_PROG)
    3716 ])
    3717 
    3718 #------------------------------------------------------------------------
    3719 # TEA_PATH_CONFIG --
    3720 #
    3721 #       Locate the ${1}Config.sh file and perform a sanity check on
    3722 #       the ${1} compile flags.  These are used by packages like
    3723 #       [incr Tk] that load *Config.sh files from more than Tcl and Tk.
    3724 #
    3725 # Arguments:
    3726 #       none
    3727 #
    3728 # Results:
    3729 #
    3730 #       Adds the following arguments to configure:
    3731 #               --with-$1=...
    3732 #
    3733 #       Defines the following vars:
    3734 #               $1_BIN_DIR      Full path to the directory containing
    3735 #                               the $1Config.sh file
    3736 #------------------------------------------------------------------------
    3737 
    3738 AC_DEFUN([TEA_PATH_CONFIG], [
    3739     #
    3740     # Ok, lets find the $1 configuration
    3741     # First, look for one uninstalled.
    3742     # the alternative search directory is invoked by --with-$1
    3743     #
    3744 
    3745     if test x"${no_$1}" = x ; then
    3746         # we reset no_$1 in case something fails here
    3747         no_$1=true
    3748         AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
    3749         AC_MSG_CHECKING([for $1 configuration])
    3750         AC_CACHE_VAL(ac_cv_c_$1config,[
    3751 
    3752             # First check to see if --with-$1 was specified.
    3753             if test x"${with_$1config}" != x ; then
    3754                 case ${with_$1config} in
    3755                     */$1Config.sh )
    3756                         if test -f ${with_$1config}; then
    3757                             AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
    3758                             with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
    3759                         fi;;
    3760                 esac
    3761                 if test -f "${with_$1config}/$1Config.sh" ; then
    3762                     ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
    3763                 else
    3764                     AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
    3765                 fi
    3766             fi
    3767 
    3768             # then check for a private $1 installation
    3769             if test x"${ac_cv_c_$1config}" = x ; then
    3770                 for i in \
    3771                         ../$1 \
    3772                         `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3773                         `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3774                         `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3775                         `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3776                         ../../$1 \
    3777                         `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3778                         `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3779                         `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3780                         `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3781                         ../../../$1 \
    3782                         `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3783                         `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3784                         `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3785                         `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3786                         ${srcdir}/../$1 \
    3787                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
    3788                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
    3789                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
    3790                         `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
    3791                         ; do
    3792                     if test -f "$i/$1Config.sh" ; then
    3793                         ac_cv_c_$1config=`(cd $i; pwd)`
    3794                         break
    3795                     fi
    3796                     if test -f "$i/unix/$1Config.sh" ; then
    3797                         ac_cv_c_$1config=`(cd $i/unix; pwd)`
    3798                         break
    3799                     fi
    3800                 done
    3801             fi
    3802 
    3803             # check in a few common install locations
    3804             if test x"${ac_cv_c_$1config}" = x ; then
    3805                 for i in `ls -d ${libdir} 2>/dev/null` \
    3806                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
    3807                         `ls -d ${prefix}/lib 2>/dev/null` \
    3808                         `ls -d /usr/local/lib 2>/dev/null` \
    3809                         `ls -d /usr/contrib/lib 2>/dev/null` \
    3810                         `ls -d /usr/lib 2>/dev/null` \
    3811                         ; do
    3812                     if test -f "$i/$1Config.sh" ; then
    3813                         ac_cv_c_$1config=`(cd $i; pwd)`
    3814                         break
    3815                     fi
    3816                 done
    3817             fi
    3818         ])
    3819 
    3820         if test x"${ac_cv_c_$1config}" = x ; then
    3821             $1_BIN_DIR="# no $1 configs found"
    3822             AC_MSG_WARN([Cannot find $1 configuration definitions])
    3823             exit 0
    3824         else
    3825             no_$1=
    3826             $1_BIN_DIR=${ac_cv_c_$1config}
    3827             AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
    3828         fi
    3829     fi
    3830 ])
    3831 
    3832 #------------------------------------------------------------------------
    3833 # TEA_LOAD_CONFIG --
    3834 #
    3835 #       Load the $1Config.sh file
    3836 #
    3837 # Arguments:
    3838 #       
    3839 #       Requires the following vars to be set:
    3840 #               $1_BIN_DIR
    3841 #
    3842 # Results:
    3843 #
    3844 #       Subst the following vars:
    3845 #               $1_SRC_DIR
    3846 #               $1_LIB_FILE
    3847 #               $1_LIB_SPEC
    3848 #
    3849 #------------------------------------------------------------------------
    3850 
    3851 AC_DEFUN([TEA_LOAD_CONFIG], [
    3852     AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
    3853 
    3854     if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
    3855         AC_MSG_RESULT([loading])
    3856         . ${$1_BIN_DIR}/$1Config.sh
    3857     else
    3858         AC_MSG_RESULT([file not found])
    3859     fi
    3860 
    3861     #
    3862     # If the $1_BIN_DIR is the build directory (not the install directory),
    3863     # then set the common variable name to the value of the build variables.
    3864     # For example, the variable $1_LIB_SPEC will be set to the value
    3865     # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
    3866     # instead of $1_BUILD_LIB_SPEC since it will work with both an
    3867     # installed and uninstalled version of Tcl.
    3868     #
    3869 
    3870     if test -f ${$1_BIN_DIR}/Makefile ; then
    3871         AC_MSG_WARN([Found Makefile - using build library specs for $1])
    3872         $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
    3873         $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
    3874         $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
    3875     fi
    3876 
    3877     AC_SUBST($1_VERSION)
    3878     AC_SUBST($1_BIN_DIR)
    3879     AC_SUBST($1_SRC_DIR)
    3880 
    3881     AC_SUBST($1_LIB_FILE)
    3882     AC_SUBST($1_LIB_SPEC)
    3883 
    3884     AC_SUBST($1_STUB_LIB_FILE)
    3885     AC_SUBST($1_STUB_LIB_SPEC)
    3886     AC_SUBST($1_STUB_LIB_PATH)
    3887 ])
    3888 
    3889 #------------------------------------------------------------------------
    3890 # TEA_PATH_CELIB --
    3891 #
    3892 #       Locate Keuchel's celib emulation layer for targeting Win/CE
    3893 #
    3894 # Arguments:
    3895 #       none
    3896 #
    3897 # Results:
    3898 #
    3899 #       Adds the following arguments to configure:
    3900 #               --with-celib=...
    3901 #
    3902 #       Defines the following vars:
    3903 #               CELIB_DIR       Full path to the directory containing
    3904 #                               the include and platform lib files
    3905 #------------------------------------------------------------------------
    3906 
    3907 AC_DEFUN([TEA_PATH_CELIB], [
    3908     # First, look for one uninstalled.
    3909     # the alternative search directory is invoked by --with-celib
    3910 
    3911     if test x"${no_celib}" = x ; then
    3912         # we reset no_celib in case something fails here
    3913         no_celib=true
    3914         AC_ARG_WITH(celib,[  --with-celib=DIR        use Windows/CE support library from DIR], with_celibconfig=${withval})
    3915         AC_MSG_CHECKING([for Windows/CE celib directory])
    3916         AC_CACHE_VAL(ac_cv_c_celibconfig,[
    3917             # First check to see if --with-celibconfig was specified.
    3918             if test x"${with_celibconfig}" != x ; then
    3919                 if test -d "${with_celibconfig}/inc" ; then
    3920                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
    3921                 else
    3922                     AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
    3923                 fi
    3924             fi
    3925 
    3926             # then check for a celib library
    3927             if test x"${ac_cv_c_celibconfig}" = x ; then
    3928                 for i in \
    3929                         ../celib-palm-3.0 \
    3930                         ../celib \
    3931                         ../../celib-palm-3.0 \
    3932                         ../../celib \
    3933                         `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
    3934                         ${srcdir}/../celib-palm-3.0 \
    3935                         ${srcdir}/../celib \
    3936                         `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
    3937                         ; do
    3938                     if test -d "$i/inc" ; then
    3939                         ac_cv_c_celibconfig=`(cd $i; pwd)`
    3940                         break
    3941                     fi
    3942                 done
    3943             fi
    3944         ])
    3945         if test x"${ac_cv_c_celibconfig}" = x ; then
    3946             AC_MSG_ERROR([Cannot find celib support library directory])
    3947         else
    3948             no_celib=
    3949             CELIB_DIR=${ac_cv_c_celibconfig}
    3950             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
    3951             AC_MSG_RESULT([found $CELIB_DIR])
    3952         fi
    3953     fi
    3954 ])
    3955 
    3956 
    3957 # Local Variables:
    3958 # mode: autoconf
    3959 # End:
     3218    fi
     3219    if test "$tcl_ok" = yes; then
     3220        AC_DEFINE(HAVE_GETGRNAM_R)
     3221    fi
     3222])])
     3223
     3224#--------------------------------------------------------------------
     3225# SC_CONFIG_COMMANDS_PRE(CMDS)
     3226#
     3227#       Replacement for autoconf 2.5x AC_COMMANDS_PRE:
     3228#               Commands to run right before config.status is
     3229#               created. Accumulates.
     3230#
     3231#       Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
     3232#       of configure.in (right before AC_OUTPUT).
     3233#
     3234#--------------------------------------------------------------------
     3235
     3236AC_DEFUN([SC_CONFIG_COMMANDS_PRE], [
     3237    define([SC_OUTPUT_COMMANDS_PRE], defn([SC_OUTPUT_COMMANDS_PRE])[$1
     3238])])
     3239AC_DEFUN([SC_OUTPUT_COMMANDS_PRE])
     3240
  • trunk/lang/tcl/tests/all.tcl

    r403 r1018  
    1818if {$tcl_platform(platform) == "macintosh"} {
    1919        tcltest::singleProcess 1
     20    set env(LD_LIBRARY_PATH) /usr/local/rappture/lib
     21    load [pwd]/../src/Rappture1.1.so
     22} else {
     23    set env(LD_LIBRARY_PATH) /usr/local/rappture/lib
     24    load [pwd]/../src/Rappture1.1.so
    2025}
     26lappend auto_path [pwd]/../../../tcl/scripts/tmp.build \
     27        [pwd]/../../../gui/scripts/tmp.build
    2128
    2229tcltest::testsDirectory [file dir [info script]]
  • trunk/src/Makefile.in

    r1002 r1018  
    1414INSTALL_SCRIPT  = ${INSTALL}
    1515
     16CXX             = @CXX@
     17CC              = @CC@
     18CFLAGS_DEBUG    = @CFLAGS_DEBUG@
     19CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
     20STLIB_LD        = @STLIB_LD@
     21SHLIB_LD        = @SHLIB_LD@
     22SHLIB_CFLAGS    = @SHLIB_CFLAGS@
     23SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
     24SHLIB_SUFFIX    = @SHLIB_SUFFIX@
     25CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
     26LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
     27CFLAGS          = @CFLAGS@
    1628
    17 # tell make where to find the expat & libscew headers
    18 INCL_RP_DEPS    = -I$(includedir)
     29RANLIB          = @RANLIB@
     30AR              = ar
     31RM              = rm -f
    1932
    20 EXTERNAL_RP_LIBS   = @LIB_SEARCH_DIRS@ -lexpat -lscew -lz -lb64 -lm
     33.PHONY: core core2 objects
    2134
     35all:    core core2 objects
    2236
    23 # define the top of the rappture directory structure
    24 RP_BASE   = @RP_BASE@
     37core:
     38        $(MAKE) -C core all
     39core2:
     40        $(MAKE) -C core2 all
     41objects:
     42        $(MAKE) -C objects all
    2543
    26 # define which programs can be made
    27 PROGS           =   librappture    \
    28                     libRpObjects
    29 
    30 # define our compiling environment
    31 #
    32 CC              = @CC@
    33 CXX             = @CXX@
    34 DEBUG           = -g -Wall -pg
    35 LN              = ln
    36 CFLAGS = -fPIC
    37 
    38 # define our directories
    39 #
    40 INCLUDES_DIR    = $(RP_BASE)/include
    41 BIN_DIR         = $(RP_BASE)/bin
    42 LIB_DIR         = $(RP_BASE)/src
    43 SRC_DIR         = $(RP_BASE)/src
    44 SRC2_DIR        = $(RP_BASE)/src2
    45 TEST_DIR        = $(RP_BASE)/test
    46 
    47 CORE_SRC        = $(SRC_DIR)/core
    48 CORE2_SRC       = $(SRC2_DIR)/core
    49 FORT_SRC        = $(SRC_DIR)/fortran
    50 CEE_SRC         = $(SRC_DIR)/cee
    51 
    52 INCL_CORE       = -I$(CORE_SRC)
    53 INCL_CORE2      = -I$(CORE2_SRC)
    54 INCL_CEE        = -I$(CEE_SRC)
    55 INCL_FORTRAN    = -I$(FORT_SRC)
    56 INCL_MATLAB     = -I$(MATLAB_SRC)
    57 INCL_OCTAVE     = -I$(OCTAVE_SRC)
    58 
    59 # default:
    60 
    61 all: ${PROGS}
    62 install:        install_rappture \
    63                         install_rpobjs
    64 
    65 RP_IO_DEPS      = RpLibrary.o RpLibraryCInterface.o RpLibraryFInterface.o \
    66                   scew_extras.o RpEntityRef.o RpUtils.o
    67 RP_UNITS_DEPS   = RpUnitsStd.o RpUnits.o RpUnitsCInterface.o RpUnitsFInterface.o
    68 RP_UTILS_DEPS   = RpUtils.o RpUtilsCInterface.o RpUtilsFInterface.o
    69 RP_OTHER_DEPS   = RpFortranCommon.o RpBindingsDict.o \
    70                   RpBufferCInterface.o RpOutcomeCInterface.o
    71 RP_OBJS_DEP     = RpVariable.o RpAbout.o RpNumber.o RpString.o RpBoolean.o \
    72                   RpChoice.o RpOption.o RpUnitsStd.o RpUnits.o
    73                   #RpValue.o RpValueDouble.o RpValueString.o
    74 RP2_OBJ_DEP     = $(CORE2_SRC)/Outcome.o $(CORE2_SRC)/Ptr.o $(CORE2_SRC)/RpSimpleBuffer.o $(CORE2_SRC)/RpBuffer.o $(CORE2_SRC)/RpEncode.o
    75 
    76 
    77 LDLIB_MACOSX = -dynamiclib -o $(LIB_DIR)/$@.dylib
    78 LDLIB_LINUX = -shared -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0
    79 
    80 # include rappture library definitions
    81 
    82 #### librappture shared object ###########################################
    83 
    84 librappture: $(RP_IO_DEPS) $(RP_UTILS_DEPS) $(RP_UNITS_DEPS) $(RP_OTHER_DEPS)
    85         (cd ../src2/core/; make Outcome.o Ptr.o RpSimpleBuffer.o RpBuffer.o RpEncode.o)
    86         $(INSTALL_DATA) $(CORE_SRC)/*.h $(INCLUDES_DIR)
    87         $(INSTALL_DATA) $(CEE_SRC)/*.h $(INCLUDES_DIR)
    88         $(INSTALL_DATA) $(FORT_SRC)/*.h $(INCLUDES_DIR)
    89         $(INSTALL_DATA) $(CORE2_SRC)/Outcome.h $(INCLUDES_DIR)
    90         $(INSTALL_DATA) $(CORE2_SRC)/Ptr.h $(INCLUDES_DIR)
    91         $(INSTALL_DATA) $(CORE2_SRC)/RpSimpleBuffer.h $(INCLUDES_DIR)
    92         $(INSTALL_DATA) $(CORE2_SRC)/RpBuffer.h $(INCLUDES_DIR)
    93         $(INSTALL_DATA) $(CORE2_SRC)/RpEncode.h $(INCLUDES_DIR)
    94         $(INSTALL_DATA) $(CORE2_SRC)/rappture2.h $(INCLUDES_DIR)
    95         @if test "`uname`" == "Darwin"; then \
    96                 $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
    97                 ar -r $@.a $^ $(RP2_OBJ_DEP); \
    98                 ranlib -s $@.a; \
    99         else \
    100                 $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
    101                 /sbin/ldconfig -n $(LIB_DIR); \
    102                 ar -r $@.a $^ $(RP2_OBJ_DEP); \
    103                 ranlib $@.a; \
    104         fi
    105 
    106 install_rappture: librappture
    107         @if test "`uname`" == "Darwin"; then \
    108                 cp $<.dylib $(libdir); \
    109                 cp $<.a $(libdir); \
    110         else \
    111                 cp -d $<.so* $(libdir); \
    112                 cp -d $<.a $(libdir); \
    113         fi
    114         $(INSTALL_DATA) $(INCLUDES_DIR)/* $(includedir)
    115 
    116 #### libRpObjects ########################################################
    117 libRpObjects: $(RP_OBJS_DEP)
    118         @if test "`uname`" == "Darwin"; then \
    119                 $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ -lstdc++; \
    120         else \
    121                 $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ -lstdc++; \
    122                 /sbin/ldconfig -n $(LIB_DIR); \
    123         fi
    124 
    125 install_rpobjs: libRpObjects
    126         @if test "`uname`" == "Darwin"; then \
    127                 cp $<.dylib $(libdir); \
    128         else \
    129                 cp -d $<.so* $(libdir); \
    130         fi
    131 
    132 ####################################################################
    133 
    134 # include core source files
    135 
    136 RpLibrary.o: $(CORE_SRC)/RpLibrary.cc
    137         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_RP_DEPS)
    138 
    139 scew_extras.o: $(CORE_SRC)/scew_extras.c
    140         $(CC) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_RP_DEPS)
    141 
    142 RpEntityRef.o: $(CORE_SRC)/RpEntityRef.cc
    143         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2)
    144 
    145 RpUtils.o: $(CORE_SRC)/RpUtils.cc
    146         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    147 
    148 RpUnitsStd.o: $(CORE_SRC)/RpUnitsStd.cc
    149         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    150 
    151 RpUnits.o: $(CORE_SRC)/RpUnits.cc
    152         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    153 
    154 RpBindingsDict.o: $(CORE_SRC)/RpBindingsDict.cc
    155         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    156 
    157 
    158 # objects for rappture 2 developement
    159 
    160 RpVariable.o: $(CORE_SRC)/RpVariable.cc
    161         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    162 
    163 RpAbout.o: $(CORE_SRC)/RpAbout.cc
    164         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    165 
    166 RpNumber.o: $(CORE_SRC)/RpNumber.cc
    167         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    168 
    169 RpString.o: $(CORE_SRC)/RpString.cc
    170         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    171 
    172 RpBoolean.o: $(CORE_SRC)/RpBoolean.cc
    173         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    174 
    175 RpChoice.o: $(CORE_SRC)/RpChoice.cc
    176         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    177 
    178 RpOption.o: $(CORE_SRC)/RpOption.cc
    179         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    180 
    181 RpValue.o: $(CORE_SRC)/RpValue.cc
    182         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    183 
    184 RpValueDouble.o: $(CORE_SRC)/RpValueDouble.cc
    185         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    186 
    187 RpValueString.o: $(CORE_SRC)/RpValueString.cc
    188         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
    189 
    190 
    191 # include cee binding definitions
    192 
    193 RpUtilsCInterface.o: $(CEE_SRC)/RpUtilsCInterface.cc
    194         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
    195 
    196 RpUnitsCInterface.o: $(CEE_SRC)/RpUnitsCInterface.cc
    197         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
    198 
    199 RpLibraryCInterface.o: $(CEE_SRC)/RpLibraryCInterface.cc $(CEE_SRC)/RpLibraryCInterface.h $(CEE_SRC)/RpBufferCInterface.h
    200         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
    201 
    202 RpBufferCInterface.o: $(CEE_SRC)/RpBufferCInterface.cc $(CEE_SRC)/RpBufferCInterface.h $(CEE_SRC)/RpOutcomeCInterface.h
    203         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
    204 
    205 RpOutcomeCInterface.o: $(CEE_SRC)/RpOutcomeCInterface.cc
    206         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
    207 
    208 
    209 
    210 # include fortran binding definitions
    211 
    212 RpUtilsFInterface.o: $(FORT_SRC)/RpUtilsFInterface.cc
    213         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
    214 
    215 RpUnitsFInterface.o: $(FORT_SRC)/RpUnitsFInterface.cc
    216         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
    217 
    218 RpFortranCommon.o: $(FORT_SRC)/RpFortranCommon.cc
    219         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_FORTRAN)
    220 
    221 RpLibraryFInterface.o: $(FORT_SRC)/RpLibraryFInterface.cc
    222         $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_FORTRAN) $(INCL_RP_DEPS)
    223 
     44install:
     45        $(MAKE) -C core install
     46        $(MAKE) -C core2 install
     47        $(MAKE) -C objects install
    22448
    22549docs:
    226         if test ! -d docs; then \
    227                 mkdir docs; \
    228         fi
    229         if test ! -d docs/doxygen; then \
    230                 mkdir docs/doxygen; \
    231         fi
     50        $(INSTALL) -d docs/doxygen
    23251        doxygen
    23352
    234 #### CLEAN UP ############################################################
    23553clean:
    236         - rm -f *.o librappture.* libRp*.so*
    237         - rm -rf build
     54        $(MAKE) -C core clean
     55        $(MAKE) -C core2 clean
     56        $(MAKE) -C objects clean
    23857
    23958distclean: clean
    240         - rm Makefile
     59        $(MAKE) -C core distclean
     60        $(MAKE) -C core2 distclean
     61        $(MAKE) -C objects distclean
     62        $(RM) Makefile
  • trunk/src/core/RpBuffer.cc

    r1017 r1018  
    55 *  AUTHOR:  Derrick Kearney, Purdue University
    66 *
    7  *  Copyright (c) 2004-2008  Purdue Research Foundation
     7 *  Copyright (c) 2004-2007  Purdue Research Foundation
    88 * ----------------------------------------------------------------------
    99 *  See the file "license.terms" for information on usage and
    1010 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     11 * ======================================================================
     12 *
     13 *  This code is based on the Tcl_DString facility included in the
     14 *  Tcl source release, which includes the following copyright:
     15 *
     16 *  Copyright (c) 1987-1993 The Regents of the University of California.
     17 *  Copyright (c) 1994-1998 Sun Microsystems, Inc.
     18 *  Copyright (c) 2001 by Kevin B. Kenny.  All rights reserved.
     19 *
     20 *  This software is copyrighted by the Regents of the University of
     21 *  California, Sun Microsystems, Inc., Scriptics Corporation,
     22 *  and other parties.  The following terms apply to all files associated
     23 *  with the software unless explicitly disclaimed in individual files.
     24 *
     25 *  The authors hereby grant permission to use, copy, modify, distribute,
     26 *  and license this software and its documentation for any purpose, provided
     27 *  that existing copyright notices are retained in all copies and that this
     28 *  notice is included verbatim in any distributions. No written agreement,
     29 *  license, or royalty fee is required for any of the authorized uses.
     30 *  Modifications to this software may be copyrighted by their authors
     31 *  and need not follow the licensing terms described here, provided that
     32 *  the new terms are clearly indicated on the first page of each file where
     33 *  they apply.
     34 *
     35 *  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
     36 *  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
     37 *  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
     38 *  DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
     39 *  POSSIBILITY OF SUCH DAMAGE.
     40 *
     41 *  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
     42 *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
     43 *  FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
     44 *  IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
     45 *  NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
     46 *  MODIFICATIONS.
     47 *
     48 *  GOVERNMENT USE: If you are acquiring this software on behalf of the
     49 *  U.S. government, the Government shall have only "Restricted Rights"
     50 *  in the software and related documentation as defined in the Federal·
     51 *  Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
     52 *  are acquiring the software on behalf of the Department of Defense, the
     53 *  software shall be classified as "Commercial Computer Software" and the
     54 *  Government shall have only "Restricted Rights" as defined in Clause
     55 *  252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
     56 *  authors grant the U.S. Government and others acting in its behalf
     57 *  permission to use and distribute the software in accordance with the
     58 *  terms specified in this license.·
     59 *
    1160 * ======================================================================
    1261 */
     
    2776
    2877/**
     78 * Construct an empty SimpleBuffer.
     79 */
     80SimpleBuffer::SimpleBuffer()
     81{
     82    bufferInit();
     83}
     84
     85
     86/**
     87 * Construct a SimpleBuffer loaded with initial data.
     88 *
     89 * @param bytes pointer to bytes being stored.
     90 * @param nbytes number of bytes being stored.
     91 */
     92SimpleBuffer::SimpleBuffer(const char* bytes, int nbytes)
     93{
     94    bufferInit();
     95    append(bytes,nbytes);
     96}
     97
     98
     99/**
     100 * Copy constructor
     101 * @param SimpleBuffer object to copy
     102 */
     103SimpleBuffer::SimpleBuffer(const SimpleBuffer& b)
     104{
     105    bufferInit();
     106    append(b.bytes(),b.size());
     107}
     108
     109
     110/**
     111 * Assignment operator
     112 * @param SimpleBuffer object to copy
     113 */
     114SimpleBuffer&
     115SimpleBuffer::operator=(const SimpleBuffer& b)
     116{
     117    bufferFree();
     118    bufferInit();
     119    append(b.bytes(),b.size());
     120    return *this;
     121}
     122
     123
     124/**
     125 * Operator +
     126 * @param SimpleBuffer object to add
     127 */
     128SimpleBuffer
     129SimpleBuffer::operator+(const SimpleBuffer& b) const
     130{
     131    SimpleBuffer newBuffer(*this);
     132    newBuffer.operator+=(b);
     133    return newBuffer;
     134}
     135
     136
     137/**
     138 * Operator +=
     139 * @param SimpleBuffer object to add
     140 */
     141SimpleBuffer&
     142SimpleBuffer::operator+=(const SimpleBuffer& b)
     143{
     144    append(b.bytes(),b.size());
     145    return *this;
     146}
     147
     148
     149/**
     150 * Destructor
     151 */
     152SimpleBuffer::~SimpleBuffer()
     153{
     154    bufferFree();
     155}
     156
     157
     158/**
     159 * Get the bytes currently stored in the buffer.  These bytes can
     160 * be stored, and used later to construct another Buffer to
     161 * decode the information.
     162 *
     163 * @return Pointer to the bytes in the buffer.
     164 */
     165const char*
     166SimpleBuffer::bytes() const
     167{
     168    return _buf;
     169}
     170
     171
     172/**
     173 * Get the number of bytes currently stored in the buffer.
     174 * @return Number of the bytes used in the buffer.
     175 */
     176unsigned int
     177SimpleBuffer::size() const
     178{
     179    return _size;
     180}
     181
     182
     183/**
     184 * Clear the buffer, making it empty.
     185 * @return Reference to this buffer.
     186 */
     187SimpleBuffer&
     188SimpleBuffer::clear()
     189{
     190    bufferFree();
     191    bufferInit();
     192
     193    return *this;
     194}
     195
     196
     197/**
     198 * Append bytes to the end of this buffer
     199 * @param Buffer object to copy
     200 * @return Reference to this buffer.
     201 */
     202int
     203SimpleBuffer::append(const char* bytes, int nbytes)
     204{
     205    unsigned int newSize = 0;
     206    char *newBuffer = NULL;
     207
     208    // User specified NULL buffer to append
     209    if ( (bytes == NULL) && (nbytes < 1) ) {
     210        return 0;
     211    }
     212
     213    if (nbytes == -1) {
     214        // user signaled null terminated string
     215        nbytes = strlen(bytes);
     216    }
     217
     218    if (nbytes <= 0) {
     219        // no data written, invalid option
     220        return nbytes;
     221    }
     222
     223    // Empty internal buffer, make sure its properly initialized.
     224    if (_buf == NULL) {
     225        bufferInit();
     226    }
     227
     228    newSize = (unsigned int)(_size + nbytes);
     229
     230    // ensure that our smallest buffer is 200 bytes
     231    if (newSize < (RP_BUFFER_MIN_SIZE/2)) {
     232        newSize = (RP_BUFFER_MIN_SIZE/2);
     233    }
     234
     235    /*
     236     * Allocate a larger buffer for the string if the current one isn't
     237     * large enough. Allocate extra space in the new buffer so that there
     238     * will be room to grow before we have to allocate again.
     239     */
     240
     241    if (newSize >= _spaceAvl) {
     242        _spaceAvl = newSize * 2;
     243        newBuffer = new char[_spaceAvl];
     244        if (newBuffer == NULL) {
     245            // return memory error
     246            return -1;
     247        }
     248        if (_buf != NULL) {
     249            memcpy((void*) newBuffer, (void*) _buf, (size_t) _size);
     250            delete [] _buf;
     251            _buf = NULL;
     252        }
     253        _buf = newBuffer;
     254    }
     255
     256    memcpy((void*) (_buf + _size), (void*) bytes, (size_t) nbytes);
     257
     258    _size = _size + (unsigned int) nbytes;
     259
     260    return nbytes;
     261}
     262
     263
     264/**
     265 * Read data from the buffer into a memory location provided by caller
     266 * @param Pointer locating where to place read bytes.
     267 * @param Size of the memory location.
     268 * @return Number of bytes written to memory location
     269 */
     270int
     271SimpleBuffer::read(const char* bytes, int nbytes)
     272{
     273    unsigned int bytesRead = 0;
     274
     275    // SimpleBuffer is empty.
     276    if (_buf == NULL) {
     277        return 0;
     278    }
     279
     280    // User specified NULL buffer.
     281    if (bytes == NULL) {
     282        return 0;
     283    }
     284
     285    // User specified negative buffer size
     286    if (nbytes <= 0) {
     287        return 0;
     288    }
     289
     290    // make sure we don't read off the end of our buffer
     291    if ( (_pos + nbytes) >= _size ) {
     292        bytesRead = (_size - _pos);
     293    }
     294    else {
     295        bytesRead = (unsigned int) nbytes;
     296    }
     297
     298    if (bytesRead <= 0) {
     299        return 0;
     300    }
     301
     302    if (bytesRead > 0) {
     303        memcpy((void*) bytes, (void*) (_buf+_pos), (size_t) bytesRead);
     304    }
     305
     306    _pos = (_pos + bytesRead);
     307
     308    return (int)bytesRead;
     309}
     310
     311
     312/**
     313 * Set buffer position indicator to spot within the buffer
     314 * @param Offset from whence location in buffer.
     315 * @param Place from where offset is added or subtracted.
     316 * @return 0 on success, anything else is failure
     317 */
     318int
     319SimpleBuffer::seek(int offset, int whence)
     320{
     321    int retVal = 0;
     322
     323    if (_buf == NULL) {
     324        return -1 ;
     325    }
     326
     327    if (whence == SEEK_SET) {
     328        if (offset < 0) {
     329            /* dont go off the beginning of data */
     330            _pos = 0;
     331        }
     332        else if (offset >= (int)_size) {
     333            /* dont go off the end of data */
     334            _pos = _size - 1;
     335        }
     336        else {
     337            _pos = (unsigned int)(_pos + offset);
     338        }
     339    }
     340    else if (whence == SEEK_CUR) {
     341        if ( (_pos + offset) < 0) {
     342            /* dont go off the beginning of data */
     343            _pos = 0;
     344        }
     345        else if ((_pos + offset) >= _size) {
     346            /* dont go off the end of data */
     347            _pos = _size - 1;
     348        }
     349        else {
     350            _pos = (unsigned int)(_pos + offset);
     351        }
     352    }
     353    else if (whence == SEEK_END) {
     354        if (offset <= (-1*((int)_size))) {
     355            /* dont go off the beginning of data */
     356            _pos = 0;
     357        }
     358        else if (offset >= 0) {
     359            /* dont go off the end of data */
     360            _pos = _size - 1;
     361        }
     362        else {
     363            _pos = (unsigned int)((_size - 1) + offset);
     364        }
     365    }
     366    else {
     367        retVal = -1;
     368    }
     369
     370    return retVal;
     371}
     372
     373
     374/**
     375 * Tell caller the offset of the position indicator from the start of buffer
     376 * @return Number of bytes the position indicator is from start of buffer
     377 */
     378int
     379SimpleBuffer::tell()
     380{
     381   return (int)_pos;
     382}
     383
     384
     385/**
     386 * Read data from the buffer into a memory location provided by caller
     387 */
     388SimpleBuffer&
     389SimpleBuffer::rewind()
     390{
     391    _pos = 0;
     392    return *this;
     393}
     394
     395
     396/**
     397 * Tell if the last file like operation (ie. read()) was successful
     398 * or if there was a failure like eof, or bad memory
     399 * @return True or false boolean value
     400 */
     401bool
     402SimpleBuffer::good() const
     403{
     404    return (_fileState);
     405}
     406
     407
     408/**
     409 * Tell if the last file like operation (ie. read()) failed
     410 * Opposite of good()
     411 * @return True or false boolean value
     412 */
     413bool
     414SimpleBuffer::bad() const
     415{
     416    return (!_fileState);
     417}
     418
     419
     420/**
     421 * Tell if the position flag is at the end of the buffer
     422 * @return True or false boolean value
     423 */
     424bool
     425SimpleBuffer::eof() const
     426{
     427    return (_pos >= _size);
     428}
     429
     430
     431/**
     432 * Move the data from this SimpleBuffer to the SimpleBuffer provided by
     433 * the caller. All data except the _pos is moved and this SimpleBuffer is
     434 * re-initialized with bufferInit().
     435 * @param SimpleBuffer to move the information to
     436 * @return reference to this SimpleBuffer object.
     437 */
     438SimpleBuffer&
     439SimpleBuffer::move(SimpleBuffer& b)
     440{
     441    bufferFree();
     442
     443    _buf = b._buf;
     444    _pos = b._pos;
     445    _size = b._size;
     446    _spaceAvl = b._spaceAvl;
     447    _fileState = b._fileState;
     448
     449    b.bufferInit();
     450
     451    return *this;
     452}
     453
     454
     455 /**
     456  *  Initializes a dynamic buffer, discarding any previous contents
     457  *  of the buffer. bufferFree() should have been called already
     458  *  if the dynamic buffer was previously in use.
     459  */
     460void
     461SimpleBuffer::bufferInit()
     462{
     463    _buf = NULL;
     464    _pos = 0;
     465    _size = 0;
     466    _spaceAvl = 0;
     467    _fileState = true;
     468}
     469
     470
     471/**
     472 *  Frees up any memory allocated for the dynamic buffer and
     473 *  reinitializes the buffer to an empty state.
     474 */
     475void
     476SimpleBuffer::bufferFree()
     477{
     478    if (_buf != NULL) {
     479        delete [] _buf;
     480        _buf = NULL;
     481    }
     482    bufferInit();
     483}
     484
     485
     486/**
    29487 * Construct an empty Buffer.
    30488 */
    31489Buffer::Buffer()
    32490  : SimpleBuffer(),
    33     _level(6),
    34     _compressionType(RPCOMPRESS_GZIP),
    35     _windowBits(15)
    36 {}
    37 
    38 
    39 /**
    40  * Construct an empty Buffer of specified size.
    41  */
    42 Buffer::Buffer(int nbytes)
    43   : SimpleBuffer(nbytes),
    44491    _level(6),
    45492    _compressionType(RPCOMPRESS_GZIP),
  • trunk/src/core/RpBuffer.h

    r1017 r1018  
    55 *  AUTHOR:  Derrick Kearney, Purdue University
    66 *
    7  *  Copyright (c) 2004-2008  Purdue Research Foundation
     7 *  Copyright (c) 2004-2007  Purdue Research Foundation
    88 * ----------------------------------------------------------------------
    99 *  See the file "license.terms" for information on usage and
    1010 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     11 * ======================================================================
     12 *
     13 *  This code is based on the Tcl_DString facility included in the
     14 *  Tcl source release, which includes the following copyright:
     15 *
     16 *  Copyright (c) 1987-1993 The Regents of the University of California.
     17 *  Copyright (c) 1994-1998 Sun Microsystems, Inc.
     18 *  Copyright (c) 2001 by Kevin B. Kenny.  All rights reserved.
     19 *
     20 *  This software is copyrighted by the Regents of the University of
     21 *  California, Sun Microsystems, Inc., Scriptics Corporation,
     22 *  and other parties.  The following terms apply to all files associated
     23 *  with the software unless explicitly disclaimed in individual files.
     24 *
     25 *  The authors hereby grant permission to use, copy, modify, distribute,
     26 *  and license this software and its documentation for any purpose, provided
     27 *  that existing copyright notices are retained in all copies and that this
     28 *  notice is included verbatim in any distributions. No written agreement,
     29 *  license, or royalty fee is required for any of the authorized uses.
     30 *  Modifications to this software may be copyrighted by their authors
     31 *  and need not follow the licensing terms described here, provided that
     32 *  the new terms are clearly indicated on the first page of each file where
     33 *  they apply.
     34 *
     35 *  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
     36 *  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
     37 *  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
     38 *  DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
     39 *  POSSIBILITY OF SUCH DAMAGE.
     40 *
     41 *  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
     42 *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
     43 *  FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
     44 *  IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
     45 *  NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
     46 *  MODIFICATIONS.
     47 *
     48 *  GOVERNMENT USE: If you are acquiring this software on behalf of the
     49 *  U.S. government, the Government shall have only "Restricted Rights"
     50 *  in the software and related documentation as defined in the Federal·
     51 *  Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
     52 *  are acquiring the software on behalf of the Department of Defense, the
     53 *  software shall be classified as "Commercial Computer Software" and the
     54 *  Government shall have only "Restricted Rights" as defined in Clause
     55 *  252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
     56 *  authors grant the U.S. Government and others acting in its behalf
     57 *  permission to use and distribute the software in accordance with the
     58 *  terms specified in this license.·
     59 *
    1160 * ======================================================================
    1261 */
     
    1564#define RAPPTURE_BUFFER_H
    1665
    17 #include "Outcome.h"
    18 #include "RpSimpleBuffer.h"
     66#define RP_BUFFER_MIN_SIZE    200
     67
     68#include "RpOutcome.h"
    1969
    2070#ifdef __cplusplus
     
    2979namespace Rappture {
    3080
     81class SimpleBuffer {
     82public:
     83    SimpleBuffer();
     84    SimpleBuffer(const char* bytes, int nbytes=-1);
     85    SimpleBuffer(const SimpleBuffer& b);
     86    SimpleBuffer& operator=(const SimpleBuffer& b);
     87    SimpleBuffer  operator+(const SimpleBuffer& b) const;
     88    SimpleBuffer& operator+=(const SimpleBuffer& b);
     89    virtual ~SimpleBuffer();
     90
     91    const char* bytes() const;
     92    unsigned int size() const;
     93
     94    SimpleBuffer& clear();
     95    int append(const char* bytes, int nbytes=-1);
     96    int read(const char* bytes, int nbytes);
     97    int seek(int offset, int whence);
     98    int tell();
     99    SimpleBuffer& rewind();
     100
     101    bool good() const;
     102    bool bad() const;
     103    bool eof() const;
     104
     105    SimpleBuffer& move(SimpleBuffer& b);
     106
     107protected:
     108
     109    void bufferInit();
     110    void bufferFree();
     111
     112private:
     113
     114    /// Pointer to the memory that holds our buffer's data
     115    char* _buf;
     116
     117    /// Position offset within the buffer's memory
     118    unsigned int _pos;
     119
     120    /// Size of the used memory in the buffer
     121    unsigned int _size;
     122
     123    /// Total space available in the buffer
     124    unsigned int _spaceAvl;
     125
     126    /// State of the last file like operation.
     127    bool _fileState;
     128};
    31129
    32130/**
     
    40138public:
    41139    Buffer();
    42     Buffer(int nbytes);
    43140    Buffer(const char* bytes, int nbytes=-1);
    44141    Buffer(const Buffer& buffer);
  • trunk/src/core/RpEncode.h

    r1017 r1018  
    1717// #include "rappture.h"
    1818#include "RpBuffer.h"
    19 #include "Outcome.h"
     19#include "RpOutcome.h"
    2020
    2121#define RPENC_Z      1
  • trunk/src/core/RpLibrary.cc

    r962 r1018  
    14491449
    14501450RpLibrary&
    1451 RpLibrary::childCount ( std::string path,
    1452                         int* childCount )
    1453 {
    1454     scew_element* parentNode;
    1455     int myChildCount = 0;
    1456 
     1451RpLibrary::childCount(std::string path, int* childCount)
     1452{
    14571453    if (this->root) {
    1458 
     1454        scew_element* parentNode;
     1455        int myChildCount = 0;
     1456
     1457        parentNode = NULL;
    14591458        if (path.empty()) {
    14601459            // an empty path uses the current RpLibrary as parent
     
    14691468            *childCount = myChildCount;
    14701469        }
    1471 
    1472     }
    1473 
     1470    }
    14741471    return *this;
    14751472}
  • trunk/src/core/RpLibrary.h

    r759 r1018  
    3131#include <list>
    3232#include "RpBuffer.h"
    33 #include "Outcome.h"
     33#include "RpOutcome.h"
    3434
    3535/* indentation size (in whitespaces) */
  • trunk/src/core/RpOutcome.cc

    r1017 r1018  
    11/*
     2 * ======================================================================
     3 *  Rappture::Outcome
     4 *
     5 *  AUTHOR:  Michael McLennan, Purdue University
     6 *  Copyright (c) 2004-2007  Purdue Research Foundation
    27 * ----------------------------------------------------------------------
    3  *  Rappture::Outcome
    4  *    This object represents the result of any Rappture call.  It acts
    5  *    like a boolean, so it can be tested for success/failure.  But
    6  *    it can also contain information about failure, including a trace
    7  *    back of messages indicating the cause.
    8  *
    9  * ======================================================================
    10  *  AUTHOR:  Michael McLennan, Purdue University
    11  *  Copyright (c) 2004-2006  Purdue Research Foundation
    12  *
    138 *  See the file "license.terms" for information on usage and
    149 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     
    1611 */
    1712#include "RpOutcome.h"
    18 
     13#include <stdarg.h>
    1914using namespace Rappture;
    2015
    21 Outcome::Outcome(const char *errmsg)
    22   : _status(0),
     16/**
     17 *  Create a negative outcome, with the given error message.
     18 */
     19Outcome::Outcome(const char *errmsg) :
     20    _status(0),
    2321    _remarkPtr(NULL),
    2422    _contextPtr(NULL)
     
    2927}
    3028
    31 Outcome::Outcome(const Outcome& oc)
    32   : _status(oc._status),
     29/// Copy constructor
     30Outcome::Outcome(const Outcome& oc) :
     31    _status(oc._status),
    3332    _remarkPtr(oc._remarkPtr),
    3433    _contextPtr(oc._contextPtr)
     
    3635}
    3736
     37/// Assignment operator
    3838Outcome&
    3939Outcome::operator=(const Outcome& oc)
     
    4545}
    4646
     47/// Destructor
     48Outcome::~Outcome()
     49{}
     50
     51/**
     52 *  Assign an error condition to the outcome.
     53 */
    4754Outcome&
    4855Outcome::error(const char* errmsg, int status)
     
    5562
    5663Outcome&
     64Outcome::AddError(const char* format, ...)
     65{
     66    char stackSpace[1024];
     67    va_list lst;
     68    size_t n;
     69    char *bufPtr;
     70
     71    va_start(lst, format);
     72    bufPtr = stackSpace;
     73    n = vsnprintf(bufPtr, 1024, format, lst);
     74    if (n >= 1024) {
     75        bufPtr = (char *)malloc(n);
     76        vsnprintf(bufPtr, n, format, lst);
     77    }
     78    if (_remarkPtr.isNull()) {
     79        _remarkPtr = Ptr<std::string>(new std::string(bufPtr));
     80    } else {
     81        _remarkPtr->append("\n");
     82        _remarkPtr->append(bufPtr);
     83    }
     84    _contextPtr.clear();
     85    _status = 1;                /* Set to error */
     86    if (bufPtr != stackSpace) {
     87        free(bufPtr);
     88    }
     89    return *this;
     90}
     91
     92/**
     93 *  Clear the status of this outcome.
     94 */
     95Outcome&
    5796Outcome::clear()
    5897{
     
    63102}
    64103
     104/**
     105 *  Returns the status of this outcome as an integer.
     106 *  As in Unix systems, 0 = okay.
     107 */
    65108Outcome::operator int() const
    66109{
     
    68111}
    69112
     113/**
     114 *  For !error tests.
     115 */
    70116int
    71117Outcome::operator!() const
     
    74120}
    75121
     122/**
     123 *  Use this to concatenate many different outcomes.
     124 */
    76125Outcome&
    77126Outcome::operator&=(Outcome oc)
     
    85134}
    86135
     136/**
     137 *  Query the error remark from an outcome.
     138 */
    87139std::string
    88140Outcome::remark() const
     
    94146}
    95147
     148/**
     149 *  Add information to the context stack for an outcome.
     150 */
    96151Outcome&
    97152Outcome::addContext(const char *rem)
     
    105160}
    106161
     162/**
     163 *  Query the context stack from an outcome.
     164 */
    107165std::string
    108166Outcome::context() const
  • trunk/src/core/RpOutcome.h

    r1017 r1018  
    11/*
     2 * ======================================================================
     3 *  Rappture::Outcome
     4 *
     5 *  AUTHOR:  Michael McLennan, Purdue University
     6 *  Copyright (c) 2004-2007  Purdue Research Foundation
    27 * ----------------------------------------------------------------------
    3  *  Rappture::Outcome
    4  *    This object represents the result of any Rappture call.  It acts
    5  *    like a boolean, so it can be tested for success/failure.  But
    6  *    it can also contain information about failure, including a trace
    7  *    back of messages indicating the cause.
    8  *
    9  * ======================================================================
    10  *  AUTHOR:  Michael McLennan, Purdue University
    11  *  Copyright (c) 2004-2006  Purdue Research Foundation
    12  *
    138 *  See the file "license.terms" for information on usage and
    149 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     
    1914
    2015#include <string>
    21 #include "RpPtr.h"
     16#include <RpPtr.h>
    2217
    2318namespace Rappture {
    2419
     20/**
     21 *  This object represents the result of any Rappture call.  It acts
     22 *  like a boolean, so it can be tested for success/failure.  But
     23 *  it can also contain information about failure, including a trace
     24 *  back of messages indicating the cause.
     25 */
    2526class Outcome {
    2627public:
     
    2829    Outcome(const Outcome& status);
    2930    Outcome& operator=(const Outcome& status);
     31    virtual ~Outcome();
    3032
    3133    virtual Outcome& error(const char* errmsg, int status=1);
     
    4143
    4244private:
    43     int _status;                   // overall pass/fail status
    44     Ptr<std::string>_remarkPtr;    // error message
    45     Ptr<std::string>_contextPtr;   // stack trace
     45    /// overall pass/fail status
     46    int _status;
     47
     48    /// error message
     49    Ptr<std::string>_remarkPtr;
     50
     51    /// stack trace
     52    Ptr<std::string>_contextPtr;
    4653};
    4754
  • trunk/src/core/RpOutcomeCInterface.cc

    r1017 r1018  
    1212 */
    1313
    14 #include "Outcome.h"
     14#include "RpOutcome.h"
    1515#include "RpOutcomeCInterface.h"
    1616#include "RpOutcomeCHelper.h"
     
    134134RapptureOutcomeCheck(RapptureOutcome* status)
    135135{
    136     return ((int)(*((Rappture::Outcome*)status)));
     136    return ((int)((Rappture::Outcome*)status->_status));
    137137}
    138138
  • trunk/src/core/RpPtr.h

    r1017 r1018  
    11/*
    2  * ----------------------------------------------------------------------
     2 * ======================================================================
    33 *  Rappture::Ptr<type>
    4  *    This is a smart pointer with reference counting.  Once one of
    5  *    these pointers is constructed with an object of the underlying
    6  *    type, that object becomes property of the pointer.  Other
    7  *    pointers can point to the same object.  When all such pointers
    8  *    have been destroyed, the underlying object goes away.
    94 *
    10  * ======================================================================
    115 *  AUTHOR:  Michael McLennan, Purdue University
    126 *  Copyright (c) 2004-2006  Purdue Research Foundation
    13  *
     7 * ----------------------------------------------------------------------
    148 *  See the file "license.terms" for information on usage and
    159 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    1610 * ======================================================================
    1711 */
    18 #ifndef RAPPTURE_POINTER_H
    19 #define RAPPTURE_POINTER_H
     12#ifndef RAPPTURE_PTR_H
     13#define RAPPTURE_PTR_H
    2014
    2115#include <assert.h>
    2216
    23 #ifndef NULL
    24 #  define NULL 0
    25 #endif
    26 
    2717namespace Rappture {
    2818
    29 template <class Type>
     19/**
     20 *  This is the core of a smart pointer, built to keep a reference
     21 *  count and do most of the work, so the template class can be lean
     22 *  and mean.
     23 */
    3024class PtrCore {
    3125public:
    32     explicit PtrCore(Type* ptr=NULL);
     26    explicit PtrCore(void* ptr=NULL);
    3327    ~PtrCore();
    3428
     29    void* pointer() const;
     30    void attach();
     31    void* detach();
     32
     33private:
    3534    // copying the core is not allowed
    3635    PtrCore(const PtrCore& pc) { assert(0); }
    37     PtrCore& operator=(const PtrCore& pc) { assert(0); }
     36    PtrCore& operator=(const PtrCore& pc) { assert(0); return *this; }
    3837
    39     Type* pointer() const;
    40     void attach();
    41     void detach();
    42 
    43 private:
    44     Type *_ptr;
     38    void *_ptr;
    4539    int _refcount;
    4640};
    4741
    48 template <class Type>
    49 PtrCore<Type>::PtrCore(Type* ptr)
    50   : _ptr(ptr),
    51     _refcount(1)
    52 {
    53 }
    54 
    55 template <class Type>
    56 PtrCore<Type>::~PtrCore()
    57 {
    58     assert(_refcount <= 0);
    59 }
    60 
    61 template <class Type>
    62 Type*
    63 PtrCore<Type>::pointer() const
    64 {
    65     return _ptr;
    66 }
    67 
    68 template <class Type>
    69 void
    70 PtrCore<Type>::attach()
    71 {
    72     _refcount++;
    73 }
    74 
    75 template <class Type>
    76 void
    77 PtrCore<Type>::detach()
    78 {
    79     if (--_refcount <= 0 && _ptr != NULL) {
    80         delete _ptr;
    81         delete this;
    82     }
    83 }
    84 
    85 
     42/**
     43 *  This is a smart pointer with reference counting.  Once one of
     44 *  these pointers is constructed with an object of the underlying
     45 *  type, that object becomes property of the pointer.  Other
     46 *  pointers can point to the same object.  When all such pointers
     47 *  have been destroyed, the underlying object goes away.
     48 */
    8649template <class Type>
    8750class Ptr {
     
    10063
    10164private:
    102     PtrCore<Type> *_pc;
     65    PtrCore *_pc;
    10366};
    10467
     
    10871{
    10972    if (ptr) {
    110         _pc = new PtrCore<Type>(ptr);
     73        _pc = new PtrCore(ptr);
    11174    }
    11275}
     
    12588Ptr<Type>::~Ptr()
    12689{
    127     if (_pc) {
    128         _pc->detach();
    129     }
     90    clear();
    13091}
    13192
     
    13495Ptr<Type>::operator=(Type* ptr)
    13596{
    136     if (_pc) {
    137         _pc->detach();
    138     }
    139     _pc = new PtrCore<Type>(ptr);
     97    clear();
     98    _pc = new PtrCore(ptr);
     99    return *this;
    140100}
    141101
     
    147107        ptr._pc->attach();
    148108    }
    149     if (_pc) {
    150         _pc->detach();
    151     }
     109    clear();
    152110    _pc = ptr._pc;
    153111    return *this;
     
    169127{
    170128    if (_pc) {
    171         return _pc->pointer();
     129        return static_cast<Type*>(_pc->pointer());
    172130    }
    173131    return NULL;
     
    179137{
    180138    if (_pc) {
    181         return _pc->pointer();
     139        return (Type*)_pc->pointer();
    182140    }
    183141    return NULL;
     
    197155{
    198156    if (_pc) {
    199         _pc->detach();
     157        Type* ptr = (Type*)_pc->detach();
     158        if (ptr) {
     159            // If we get back a pointer, then it is fully detached.
     160            // Clean it up.
     161            delete ptr;
     162            delete _pc;
     163        }
    200164        _pc = NULL;
    201165    }
     
    204168} // namespace Rappture
    205169
    206 #endif
     170#endif // RAPPTURE_PTR_H
  • trunk/src/core/RpResult.cc

    r115 r1018  
    1717#include <stdlib.h>
    1818#include <time.h>
     19#include <RpLibrary.h>
     20#include <errno.h>
    1921
    2022void
    21 rpResult(PyObject* lib) {
     23rpResult(RpLibrary* lib)
     24{
    2225    char outputFile[100];
    23     char* xtext;
     26    std::string xtext;
    2427    FILE* fp;
    2528    time_t t;
    2629
    27     xtext = rpXml(lib);
     30    xtext = lib->xml();
    2831
    2932    // create output filename
     
    3639        return;
    3740    }
    38     int fsize = fwrite(xtext, strlen(xtext), sizeof(char), fp);
     41    int fsize = fwrite(xtext.c_str(), xtext.length(), sizeof(char), fp);
     42    if (fsize != (int)xtext.length()) {
     43        fprintf(stderr, "short write: can't save results (err=%d)\n", errno);
     44        fclose(fp);
     45        return;
     46    }
    3947    fclose(fp);
    40 
    4148    // tell Rappture the file name
    4249    printf("=RAPPTURE-RUN=>%s\n", outputFile);
  • trunk/src/core/RpUnitsCInterface.cc

    r1017 r1018  
    1414#include "RpUnits.h"
    1515#include "RpUnitsCInterface.h"
    16 
    17 #ifdef __cplusplus
    18 extern "C" {
    19 #endif
    2016
    2117const RpUnits*
     
    133129}
    134130
    135 #ifdef __cplusplus
    136 }
    137 #endif
  • trunk/src/core/RpUnitsFInterface.cc

    r1017 r1018  
    3333
    3434    if (basisName && *basisName) {
    35         long int basisNameKey = *basisName;
    36         basisStrName = ObjDictUnits.find(basisNameKey);
     35        basisStrName = ObjDictUnits.find(*basisName);
    3736
    3837        if (basisStrName != "") {
  • trunk/src/core/RpUnitsStd.cc

    r999 r1018  
    1010#include <math.h>
    1111
    12 #ifdef __cplusplus
    13 extern "C" {
    14 #endif
    15 
    1612double invert (double inVal)
    1713{
     
    2218 * METRIC CONVERSIONS
    2319 ****************************************/
    24 
    2520
    2621double deci2base (double deci)
     
    572567}
    573568
    574 #ifdef __cplusplus
    575 }
    576 #endif
  • trunk/src/core/scew_extras.c

    r583 r1018  
    1111 * ======================================================================
    1212 */
     13
    1314#include "scew/scew.h"
    1415#include "scew/xelement.h"
     
    1617#include "scew/xerror.h"
    1718#include "scew/str.h"
    18 
     19#include "scew_extras.h"
    1920#include <assert.h>
    20 
    21 #include "scew_extras.h"
    2221
    2322scew_element*
  • trunk/src/core2/Lookup.h

    r443 r1018  
    304304Lookup2<KeyType,ValType>::operator=(const Lookup2<KeyType,ValType>& dict)
    305305{
     306#ifdef notdef
     307        /* How did this ever compile? --gah */
    306308    _corePtr->clear();
     309#endif
    307310
    308311    LookupEntry2<KeyType,ValType> entry;
  • trunk/src/core2/Makefile.in

    r1001 r1018  
    1212#    make install prefix=$HOME
    1313
     14bindir          = @bindir@
     15datadir         = @datadir@
     16datarootdir     = @datarootdir@
     17exec_prefix     = @exec_prefix@
     18includedir      = @includedir@
     19libdir          = @libdir@
     20man3dir         = ${mandir}/man3
     21mandir          = @mandir@
     22prefix          = @prefix@
     23scriptdir       = $(exec_prefix)/lib
     24srcdir          = @srcdir@
     25incdir          = $(prefix)/include
     26
    1427CXX             = @CXX@
     28CC              = @CXX@
     29CFLAGS_DEBUG    = @CFLAGS_DEBUG@
     30CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
     31STLIB_LD        = @STLIB_LD@
     32SHLIB_LD        = @SHLIB_LD@
     33SHLIB_CFLAGS    = @SHLIB_CFLAGS@
     34SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
     35SHLIB_SUFFIX    = @SHLIB_SUFFIX@
     36CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
     37LIB_SEARCH_DIRS = -L../core @LIB_SEARCH_DIRS@
     38CFLAGS          = @CFLAGS@
     39CPP             = @CPP@
    1540
    16 CFLAGS=-g -Wall -pg -fPIC
    17 #CFLAGS=-O
    18 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
    19 #CFLAGS=-g -DDEBUG
    20 #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    21 #           -Wstrict-prototypes -Wmissing-prototypes
     41INSTALL         = @INSTALL@
     42INSTALL_DATA    = @INSTALL_DATA@
     43VPATH           = $(srcdir)
    2244
    23 LDFLAGS=librappture2.a
    24 LDSHARED=$(CXX)
    25 CPP=$(CC) -E
     45name            = rappture2
     46libname         = lib$(name)
     47lib             = $(libname).a
     48shared_lib      = $(libname)$(SHLIB_SUFFIX)
    2649
    27 LIBS=librappture2.a
    28 SHAREDLIB=librappture2.so
    29 SHAREDLIBV=librappture2.so.0.0
    30 SHAREDLIBM=librappture2.so.1
     50AR              = ar rcv
     51RANLIB          = @RANLIB@
     52SHELL           = @SHELL@
     53VPATH           = $(srcdir)
    3154
    32 AR=ar rcv
    33 RANLIB=ranlib
    34 TAR=tar
    35 SHELL=/bin/sh
    36 EXE=
     55LIBS            = -lrappture -lb64 -lz
    3756
    38 prefix = @prefix@
    39 datadir = @datadir@
    40 datarootdir = @datarootdir@
    41 exec_prefix = ${prefix}
    42 libdir = ${exec_prefix}/lib
    43 includedir = ${prefix}/include
    44 mandir = ${prefix}/share/man
    45 man3dir = ${mandir}/man3
     57INCLUDES        = \
     58                -I$(srcdir) \
     59                -I$(srcdir)/../core \
     60                -I$(includedir)
    4661
    47 OBJS = RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o \
    48        RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o \
    49        RpSerializer.o RpSerializable.o RpSimpleBuffer.o RpBuffer.o \
    50            RpEncode.o Ptr.o Outcome.o
    51        # Lookup.o
     62OBJS            = \
     63                RpMesh1D.o \
     64                RpField1D.o \
     65                RpMeshTri2D.o \
     66                RpMeshRect3D.o \
     67                RpFieldRect3D.o \
     68                RpMeshPrism3D.o \
     69                RpFieldPrism3D.o \
     70                RpSerialBuffer.o \
     71                RpSerializer.o \
     72                RpSerializable.o
    5273
    53 OBJA =
    54 # to use the asm code: make OBJA=match.o
     74HEADERS         = \
     75                RpField1D.h \
     76                RpFieldPrism3D.h \
     77                RpFieldRect3D.h \
     78                RpFieldTri2D.h \
     79                RpMesh1D.h \
     80                RpMeshPrism3D.h \
     81                RpMeshRect3D.h \
     82                RpMeshTri2D.h \
     83                RpNode.h \
     84                RpSerialBuffer.h \
     85                RpSerializable.h \
     86                RpSerializer.h \
     87                rappture2.h
    5588
    56 TEST_OBJS = test.o RpBuffer_test.o
     89all: $(lib) $(shared_lib)
    5790
    58 all: test$(EXE) RpBuffer_test$(EXE)
     91$(lib): $(OBJS)
     92        $(RM) $@
     93        $(AR) $@ $(OBJS)
     94        $(RANLIB) $@
    5995
    60 check: testall
    61 testall: all
    62         @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
    63         if ./test; then \
    64           echo '                *** test test OK ***'; \
    65         else \
    66           echo '                *** test test FAILED ***'; \
    67         fi
    68         if ./RpBuffer_test; then \
    69           echo '                *** RpBuffer_test test OK ***'; \
    70         else \
    71           echo '                *** RpBuffer_test test FAILED ***'; \
    72         fi
     96$(shared_lib): $(OBJS)
     97        $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) $(LIB_SEARCH_DIRS) $(LIBS)
    7398
    74 librappture2.a: $(OBJS) $(OBJA)
    75         $(AR) $@ $(OBJS) $(OBJA)
    76         -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
     99install: install_libs install_headers
    77100
    78 $(SHAREDLIBV): $(OBJS)
    79         $(LDSHARED) -shared -o $@ $(OBJS) @LIB_SEARCH_DIRS@ -lz -lb64
    80         rm -f $(SHAREDLIB) $(SHAREDLIBM)
    81         ln -s $@ $(SHAREDLIB)
    82         ln -s $@ $(SHAREDLIBM)
     101install_libs: $(lib) $(shared_lib)
     102        $(INSTALL) -d $(libdir)
     103        $(INSTALL) -m 444 $(lib) $(libdir)
     104        $(INSTALL) -m 555 $(shared_lib) $(libdir)
    83105
    84 test(EXE): test.o Ptr.o Outcome.o Lookup.o
    85         $(CXX) $(CFLAGS) -o $@ test.o Ptr.o Outcome.o Lookup.o
     106# This is no manual page for rappture yet.
     107install_man:
     108        $(INSTALL) -d $(man3dir)
     109        $(INSTALL) -m 444 rappture.3 $(man3dir)
     110
     111install_headers:
     112        $(INSTALL) -d $(includedir)/rappture2
     113        for i in $(HEADERS) ; do \
     114          $(INSTALL) -m 444 $(srcdir)/$$i $(includedir)/rappture2; \
     115        done
     116
     117uninstall: uninstall_libs uninstall_man uninstall_headers
     118
     119uninstall_libs: $(lib) $(shared_lib)
     120        $(RM) $(libdir)/$(lib) $(libdir)/$(shared_lib)
     121
     122uninstall_man:
     123        $(RM) $(man3dir)/rappture.3
     124
     125uninstall_headers:
     126        for i in $(HEADERS) ; do \
     127          $(RM) $(includedir)/rappture2/$$i; \
     128        done
     129.cc.o:
     130        $(CXX) $(CFLAGS) $(INCLUDES) $(DEBUG) -c $?
     131.c.o:
     132        $(CC) $(CFLAGS) $(INCLUDES) $(DEBUG) -c $?
    86133
    87134
    88 RpBuffer_test$(EXE): RpBuffer_test.o $(LIBS)
    89         $(CXX) $(CFLAGS) -o $@ RpBuffer_test.o $(LDFLAGS) @LIB_SEARCH_DIRS@ -lz -lb64
     135clean:
     136        $(RM) $(OBJS) $(lib) $(shared_lib)
     137        $(RM) buffer1.txt RpBuffer_test$(EXE)
    90138
    91 install: $(LIBS) $(SHAREDLIBV)
    92         -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
    93         -@if [ ! -d $(includedir)/rappture2  ]; then mkdir -p $(includedir)/rappture2; fi
    94         -@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
    95         -@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
    96         cp *.h $(includedir)/rappture2
    97         chmod 644 $(includedir)/rappture2/*.h
    98         cp $(LIBS) $(libdir)
    99         cp $(SHAREDLIBV) $(libdir)
    100         cd $(libdir); chmod 755 $(LIBS)
    101         -@(cd $(libdir); $(RANLIB) librappture2.a || true) >/dev/null 2>&1
    102         cd $(libdir); if test -f $(SHAREDLIBV); then \
    103           rm -f $(SHAREDLIB) $(SHAREDLIBM); \
    104           ln -s $(SHAREDLIBV) $(SHAREDLIB); \
    105           ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
    106           (ldconfig || true)  >/dev/null 2>&1; \
    107         fi
    108 #       cp rappture.3 $(man3dir)
    109 #       chmod 644 $(man3dir)/rappture.3
    110 # The ranlib in install is needed on NeXTSTEP which checks file times
    111 # ldconfig is for Linux
    112 
    113 uninstall:
    114         cd $(includedir)/rappture2; rm *.h; \
    115         cd $(libdir); rm -f librappture2.a; \
    116         if test -f $(SHAREDLIBV); then \
    117           rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
    118         fi
    119         cd $(man3dir); rm -f rappture.3
    120 
    121 mostlyclean: clean
    122 clean:
    123         rm -f *.o *~ viz buffer1.txt test$(EXE) RpBuffer_test$(EXE) librappture2.*
    124 
    125 maintainer-clean: distclean
    126139distclean: clean
    127         rm Makefile
    128 
    129 depend:
    130         makedepend -- $(CFLAGS) -- *.[ch]
    131 
    132 # DO NOT DELETE THIS LINE -- make depend depends on it.
    133 
    134 viz: viz.o librappture2.a
    135         $(CXX) $(CFLAGS) -o viz $^
    136 
    137 libviz.a: Outcome.o RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o RpSerializer.o RpSerializable.o RpSimpleBuffer.o RpBuffer.o
    138         $(AR) $@ $^
    139 
    140 viz.o: viz.cc
    141         $(CXX) $(CFLAGS) -c -o viz.o viz.cc
    142 
    143 test: test.o Ptr.o Outcome.o Lookup.o
    144         $(CXX) $(CFLAGS) -o test test.o Ptr.o Outcome.o Lookup.o
     140        $(RM) Makefile *~
    145141
    146142docs:
    147         if test ! -d ../../docs/rappture2; then \
    148           mkdir ../../docs; \
    149           mkdir ../../docs/rappture2; \
    150         fi
     143        $(INSTALL) -d ../../docs/rappture2
    151144        doxygen
    152145
    153 test.o: test.cc Ptr.h
    154         $(CXX) $(CFLAGS) -c -o test.o test.cc
    155 
    156 Ptr.o: Ptr.h Ptr.cpp
    157         $(CXX) $(CFLAGS) -c -o Ptr.o Ptr.cpp
    158 
    159 Outcome.o: Outcome.cpp Ptr.h
    160         $(CXX) $(CFLAGS) -c -o Outcome.o Outcome.cpp
    161 
    162 Lookup.o: Lookup.cpp Ptr.h
    163         $(CXX) $(CFLAGS) -c -o Lookup.o Lookup.cpp
    164 
    165 RpMesh1D.o: RpMesh1D.cc RpMesh1D.h RpNode.h
    166         $(CXX) $(CFLAGS) -c -o RpMesh1D.o RpMesh1D.cc
    167 
    168 RpField1D.o: RpField1D.cc RpField1D.h RpMesh1D.h RpNode.h
    169         $(CXX) $(CFLAGS) -c -o RpField1D.o RpField1D.cc
    170 
    171 RpMeshTri2D.o: RpMeshTri2D.cc RpMeshTri2D.h RpNode.h
    172         $(CXX) $(CFLAGS) -c -o RpMeshTri2D.o RpMeshTri2D.cc
    173 
    174 RpFieldTri2D.o: RpFieldTri2D.cc RpFieldTri2D.h RpNode.h
    175         $(CXX) $(CFLAGS) -c -o RpFieldTri2D.o RpFieldTri2D.cc
    176 
    177 RpMeshRect3D.o: RpMeshRect3D.cc RpMeshRect3D.h RpNode.h
    178         $(CXX) $(CFLAGS) -c -o RpMeshRect3D.o RpMeshRect3D.cc
    179 
    180 RpFieldRect3D.o: RpFieldRect3D.cc RpFieldRect3D.h RpNode.h
    181         $(CXX) $(CFLAGS) -c -o RpFieldRect3D.o RpFieldRect3D.cc
    182 
    183 RpMeshPrism3D.o: RpMeshPrism3D.cc RpMeshPrism3D.h RpNode.h
    184         $(CXX) $(CFLAGS) -c -o RpMeshPrism3D.o RpMeshPrism3D.cc
    185 
    186 RpFieldPrism3D.o: RpFieldPrism3D.cc RpFieldPrism3D.h RpNode.h
    187         $(CXX) $(CFLAGS) -c -o RpFieldPrism3D.o RpFieldPrism3D.cc
    188 
    189 RpSerialBuffer.o: RpSerialBuffer.cc RpSerialBuffer.h
    190         $(CXX) $(CFLAGS) -c -o RpSerialBuffer.o RpSerialBuffer.cc
    191 
    192 RpSerializer.o: RpSerializer.cc RpSerializer.h
    193         $(CXX) $(CFLAGS) -c -o RpSerializer.o RpSerializer.cc
    194 
    195 RpSerializable.o: RpSerializable.cc RpSerializable.h
    196         $(CXX) $(CFLAGS) -c -o RpSerializable.o RpSerializable.cc
    197 
    198 RpEncode.o: RpEncode.cc RpEncode.h
    199         $(CXX) $(CFLAGS) -c -o RpEncode.o RpEncode.cc
    200 
    201 RpBuffer.o: RpBuffer.cc RpBuffer.h
    202         $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer.cc
    203 
    204 RpBuffer_test.o: RpBuffer_test.cc
    205         $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer_test.cc
    206 
    207 RpSimpleBuffer.o: RpSimpleBuffer.cc RpSimpleBuffer.h
    208         $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpSimpleBuffer.cc
  • trunk/src/core2/rappture2.h

    r576 r1018  
    2323#endif
    2424
    25 #include "Ptr.h"
    26 #include "Outcome.h"
     25#include "RpPtr.h"
     26#include "RpOutcome.h"
    2727
    2828#endif
  • trunk/test/Makefile.in

    r515 r1018  
    33RP_INSTALL_BASE = @prefix@
    44
    5 # tell make where to find the rappture dependency include files
    6 INCL_RP_DEPS    = -I $(RP_INSTALL_BASE)/include
    7 
    85# define the top of the rappture directory structure
    96RP_BASE         = @RP_BASE@
    107
    11 # define which programs can be made
    128
    13 TEST_PROGS      = RpBoolean_test    \
    14                   RpChoice_test     \
    15                   RpNumber_test     \
    16                   RpString_test     \
    17                   RpUnits_test      \
    18                   RpVariable_test   \
    19                   RpUnitsC_test     \
    20                   RpUnitsF_test     \
    21                   RpLibrary_test    \
    22                   RpLibraryC_test   \
    23                   RpLibraryF_test
    24 
    25 # define our compiling environment
    26 #
    279CC              = @CC@
    2810CXX             = @CXX@
     
    3012DEBUG_PLUS      = -g -DDEBUG
    3113
    32 PY              = python
    33 
    34 F77             = @F77@
    35 
    36 LN              = ln
     14LN              = @LN@
    3715
    3816# define our directories
     
    4422TEST_DIR        = $(RP_BASE)/test
    4523
    46 LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
    47 
    48 LIB_RP_OBJECTS  = $(LIB_INC_PREFIX) -lRpObjects
    4924LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
    5025
     
    5429
    5530
    56 default: $(TEST_PROGS)
    57 all: $(TEST_PROGS)
    58 test: $(TEST_PROGS)
     31.PHONY: src jobs
     32       
     33all: src jobs
    5934
    60 # include test programs
     35src:
     36        $(MAKE) -C src all
     37jobs:
     38        $(MAKE) -C jobs all
    6139
    62 SRC_TEST            = $(TEST_DIR)/src
    63 
    64 
    65 RpBoolean_test: $(SRC_TEST)/RpBoolean_test.cc
    66         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    67    
    68 RpChoice_test: $(SRC_TEST)/RpChoice_test.cc
    69         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    70    
    71 RpNumber_test: $(SRC_TEST)/RpNumber_test.cc
    72         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    73 
    74 RpString_test: $(SRC_TEST)/RpString_test.cc
    75         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    76 
    77 RpUnits_test: $(SRC_TEST)/RpUnits_test.cc
    78         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RAPPTURE)
    79 
    80 RpVariable_test: $(SRC_TEST)/RpVariable_test.cc
    81         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    82 
    83 RpUnitsC_test: $(SRC_TEST)/RpUnitsC_test.c
    84         $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) -o $@ $^ $(LIB_RAPPTURE)
    85 
    86 RpLibrary_test: $(SRC_TEST)/RpLibrary_test.cc
    87         $(CXX) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $^ $(LIB_RAPPTURE)
    88 
    89 RpLibraryC_test: $(SRC_TEST)/RpLibraryC_test.c
    90         $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $^ $(LIB_RAPPTURE)
    91 
    92 RpLibraryF_test: $(SRC_TEST)/RpLibraryF_test.f
    93         $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
    94 
    95 RpUnitsF_test: $(SRC_TEST)/RpUnitsF_test.f
    96         $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
    97 
    98 RpValue_test: $(SRC_TEST)/RpValue_test.cc
    99         $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
    100 
    101 RpFortranDocExamples: $(SRC_TEST)/RpFortranDocExamples.f
    102         $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
    103 
    104 
    105 #### CLEAN UP ############################################################
    10640clean:
    107         - rm -f *.o $(TEST_PROGS) run*.xml
    108 
     41       
    10942distclean: clean
    110         - rm Makefile
     43        $(RM) Makefile
Note: See TracChangeset for help on using the changeset viewer.