Changeset 2170


Ignore:
Timestamp:
Mar 30, 2011, 12:34:02 PM (14 years ago)
Author:
gah
Message:
 
Location:
branches/blt4
Files:
94 added
13 deleted
45 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/Makefile.in

    r1948 r2170  
    3535
    3636ifneq ($(ENABLE_GUI),)
    37   TARGETS += gui lang lib instant examples
     37  TARGETS += gui lang lib builder tester examples
    3838endif
    3939
  • branches/blt4/README

    r217 r2170  
    2727----------------------------------------------------------------------
    2828
    29  Developed by Michael McLennan, Derrick Kearney, and Carol Song.
     29 Developed by Michael McLennan, George Howlett, and Derrick Kearney.
     30 Special thanks to Ben Rafferty for Java bindings and the Rappture
     31 tester, and Ben Haley for Ruby bindings.
    3032
  • branches/blt4/configure.in

    r2060 r2170  
    55AC_CONFIG_HEADER(src/core/config.h)
    66
     7with_tclsh=yes
     8
    79#------------------------------------------------------------------------
    810# Handle the --prefix=... option
     
    1517    exec_prefix=$prefix
    1618fi
     19
     20AC_ARG_WITH(
     21    [install],
     22    [AS_HELP_STRING([--with-install[=DIR]],
     23        [location of installation @<:@default=yes@:>@])],
     24    [],
     25    [with_install=yes])
     26if test "$with_install" != "yes"; then
     27    INSTALL_PREFIX=$with_install
     28else
     29    INSTALL_PREFIX=$prefix
     30fi
     31AC_SUBST(INSTALL_PREFIX)
     32
    1733
    1834if test "${libdir}" != "${prefix}/lib"; then
     
    115131AC_SUBST(ENABLE_GUI)
    116132
    117 rp_with_tclsh="yes"
    118 AC_ARG_WITH(
    119     [tclsh],
    120     [AS_HELP_STRING([--with-tclsh[=DIR]],
    121         [location of tclsh @<:@default=yes@:>@])],
    122     [],
    123     [rp_with_tclsh=$withval])
    124 
    125 TCLSH=
    126 if test "${rp_with_tclsh}" != "no" ; then
    127   AC_MSG_CHECKING([for tclsh])
    128   if test -x "${rp_with_tclsh}/bin/tclsh"
    129   then
    130     TCLSH="${rp_with_tclsh}/bin/tclsh"
    131   else
    132     if test -x "${rp_with_tclsh}"
    133     then
    134       TCLSH="${rp_with_tclsh}"
    135     else
    136       if test -x "${exec_prefix}/bin/tclsh"
    137       then
    138         TCLSH="${exec_prefix}/bin/tclsh"
    139       else
    140         for v in 8.4 8.5 8.6 ; do
    141           if test -x "${exec_prefix}/bin/tclsh${v}"
    142           then
    143             TCLSH="${exec_prefix}/bin/tclsh${v}"
    144             break
    145           fi
    146         done
    147       fi
    148     fi
    149   fi
    150   if ! test -x ${TCLSH} ; then
    151     AC_PATH_PROG(TCLSH, tclsh)
    152   fi
    153 fi
    154 AC_MSG_RESULT([${TCLSH}])
    155 AC_SUBST(TCLSH)
    156 
    157133TCL_VERSION="8.4"
    158134for dir in \
     
    165141  fi
    166142done
     143
     144
     145rp_with_tclsh="yes"
     146AC_ARG_WITH(
     147    [tclsh],
     148    [AS_HELP_STRING([--with-tclsh[=DIR]],
     149        [location of tclsh @<:@default=yes@:>@])],
     150    [rp_with_tclsh=$withval],
     151    [rp_with_tclsh=yes])
     152
     153TCLSH=""
     154if test "${rp_with_tclsh}" != "no" ; then
     155  tclsh="tclsh${TCL_VERSION}"
     156  if test "${rp_with_tclsh}" = "yes" ; then
     157    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}])
     158  else
     159    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${rp_with_tclsh}/bin:${rp_with_tclsh}])
     160  fi
     161  if test "x${TCLSH}" = "x" ; then
     162    AC_ERROR([can't find tclsh])
     163  fi
     164fi
     165AC_SUBST(TCLSH)
     166
     167 
    167168TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
    168 
    169 if test "x$rp_with_tcllib" != "x" ; then
    170    tclconfig="${rp_with_tcllib}/tclConfig.sh"
    171    if test -f "$tclconfig" ; then
    172     . $tclconfig
    173    fi
    174    TCL_LIB_SPEC="-L${rp_with_tcllib} -ltcl${TCL_VERSION}"
    175 fi
    176 if test "x$rp_with_tclinclude" != "x" ; then
    177    TCL_INC_SPEC="-I${rp_with_tclinclude}"
    178 fi
    179169
    180170AC_SUBST(TCL_VERSION)
     
    747737    gui/pkgIndex.tcl
    748738    gui/scripts/Makefile
    749     instant/Makefile
    750     instant/irappture
     739    gui/src/Makefile
     740    builder/Makefile
     741    builder/pkgIndex.tcl
     742    builder/scripts/Makefile
     743    tester/Makefile
     744    tester/pkgIndex.tcl
     745    tester/scripts/Makefile
    751746    lang/Makefile
    752747    lang/java/Makefile
  • branches/blt4/gui/Makefile.in

    r1948 r2170  
    2828.PHONY: src scripts apps
    2929
    30 all: scripts apps
     30SUBDIRS         = src scripts apps
    3131
    32 scripts:
    33         $(MAKE) -C scripts all
    34 src:
    35         $(MAKE) -C all
    36 apps:
    37         $(MAKE) -C apps all
     32all:
     33        for i in $(SUBDIRS) ; do \
     34          $(MAKE) -C $$i all || exit 1 ;\
     35        done
    3836
    39 install: install_scripts install_apps
     37install:
    4038        $(MKDIR_P) -m 0755 $(destdir)
    41         @for i in $(FILES); do \
     39        for i in $(FILES); do \
    4240            echo "Installing $$i" ; \
    4341            $(INSTALL) -m 0444 $$i $(destdir) ; \
    4442        done
    45         $(INSTALL) -m 0444 pkgIndex.tcl $(destdir)
    46 
    47 install_scripts: scripts
    48         $(MAKE) -C scripts install
    49 install_apps: apps
    50         $(MAKE) -C apps install
     43        for i in $(SUBDIRS) ; do \
     44          $(MAKE) -C $$i install || exit 1 ;\
     45        done
    5146
    5247test:
     
    5449
    5550clean:
    56         $(MAKE) -C scripts clean
    57         $(MAKE) -C apps clean
     51        for i in $(SUBDIRS) ; do \
     52          $(MAKE) -C $$i clean ;\
     53        done
    5854
    5955distclean:
    60         $(MAKE) -C scripts distclean
    61         $(MAKE) -C apps distclean
     56        for i in $(SUBDIRS) ; do \
     57          $(MAKE) -C $$i distclean ;\
     58        done
    6259        $(RM) Makefile pkgIndex.tcl
    6360        $(RM) config.cache config.log config.status
  • branches/blt4/gui/apps/Makefile.in

    r1948 r2170  
    2222SCRIPTS = \
    2323                encodedata \
    24                 $(srcdir)/driver \
     24                $(srcdir)/launcher.tcl \
    2525                $(srcdir)/grabdata \
    2626                $(srcdir)/nanovis-test \
     27                $(srcdir)/vtkcontour-test \
    2728                $(srcdir)/flowvis-test \
    2829                rappture \
  • branches/blt4/gui/apps/flowvis-test

    r1897 r2170  
    1616# ======================================================================
    1717#\
    18 bindir=`basename $0` ; \
     18bindir=`dirname $0` ; \
    1919. $bindir/rappture.env ; \
    2020exec wish "$0" $*
  • branches/blt4/gui/apps/rappture-csh.env.in

    r1988 r2170  
    1717
    1818# If you install Rappture elsewhere, edit the line below:
    19 set exec_prefix=@exec_prefix@
     19set exec_prefix=@INSTALL_PREFIX@
    2020
    2121set bindir=@bindir@
     
    5252endif
    5353
    54 # This depends upon the hacked version of octave that we install on the hubs.
    5554if ( $?OCTAVE_LOADPATH ) then
    5655  setenv OCTAVE_LOADPATH "${libdir}/octave3:$OCTAVE_LOADPATH"
  • branches/blt4/gui/apps/rappture.env.in

    r1988 r2170  
    1616#
    1717# If you install Rappture elsewhere, edit the line below:
    18 exec_prefix=@prefix@
     18exec_prefix=@INSTALL_PREFIX@
    1919
    2020libdir=@libdir@
     
    3636
    3737MATLABPATH=${libdir}/matlab:$MATLABPATH
    38 # This depends upon the hacked version of octave that we install
    3938OCTAVE_LOADPATH=:${libdir}/octave3:$OCTAVE_LOADPATH
    4039OCTAVE_PATH=:${libdir}/octave${octave_version}:$OCTAVE_PATH
  • branches/blt4/gui/apps/rappture.in

    r1980 r2170  
    99# ======================================================================
    1010#  AUTHOR:  Michael McLennan, Purdue University
    11 #  Copyright (c) 2004-2007  Purdue Research Foundation
     11#  Copyright (c) 2004-2011  Purdue Research Foundation
    1212#
    1313#  See the file "license.terms" for information on usage and
     
    1616dir=`dirname $0`
    1717. $dir/rappture.env
    18 exec $dir/driver $*
     18exec tclsh $dir/launcher.tcl $*
  • branches/blt4/gui/apps/rerun.in

    r2060 r2170  
    3232dir=`dirname $0`
    3333. $dir/rappture.env
    34 exec $dir/driver -nosim true -load "$*"
     34exec $dir/rappture -nosim true -load $*
  • branches/blt4/gui/apps/simsim.in

    r1897 r2170  
    88# ======================================================================
    99#\
    10 . rappture.env \
    11 exec wish "$0" $*
     10dir=`dirname $0` ; \
     11. $dir/rappture.env ; \
     12exec $dir/tclsh "$0" $*
    1213
    1314package require Rappture
     
    414415 -compare <path>     - compare the results with the run.xml
    415416                       file at <path>.
     417 -runfile <path>     - move the run file to <path>
    416418 -nosim              - no simulation.
    417419 -help               - print this help menu.
     
    632634                set params(--driver) [lindex $argv $i]
    633635                # need to check to see if file exists, if not raise error
     636            } else {
     637                printHelp
     638            }
     639        } elseif {  ("-r" == $opt)      ||
     640                    ("-runfile" == $opt) ||
     641                    ("--runfile" == $opt)    } {
     642            if {[expr {$i + 1}] < $argc} {
     643                incr i
     644                set params(--runfile) [lindex $argv $i]
    634645            } else {
    635646                printHelp
     
    686697        --nosim false
    687698        --driver ""
     699        --runfile ""
    688700        --tool "./tool.xml"
    689701        oParams {}
     
    691703
    692704    parseOptions argv params
    693 
    694     # keep the wish window from popping up
    695     wm withdraw .
    696705
    697706    # parse out path=val combinations from the list of orphaned parameters
     
    739748    }
    740749
     750
     751
     752
    741753    set tool [Rappture::Tool ::#auto $xmlobj $installdir]
    742754
     
    748760    foreach {status result} [eval $tool run] break
    749761
    750     # read back the result from run.xml
     762    if {[string compare "" $params(--runfile)] != 0} {
     763        set runfilename [$tool getRunFile]
     764        set err [catch {file rename $runfilename $params(--runfile)} out]
     765        if {$err} {
     766            puts stderr $out
     767        }
     768    }
     769
     770    # if run was successful, check to see if we should compare
    751771    if {$status == 0 && $result != "ABORT"} {
    752772        if {[Rappture::library isvalid $result]} {
  • branches/blt4/gui/configure

    r1884 r2170  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.65 for RapptureGUI 1.1.
     3# Generated by GNU Autoconf 2.68 for RapptureGUI 1.1.
    44#
    55# Report bugs to <rappture@nanohub.org>.
     
    77#
    88# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
    9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
    10 # Inc.
     9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
     10# Foundation, Inc.
    1111#
    1212#
     
    9292
    9393# Find who we are.  Look in the path if we contain no directory separator.
     94as_myself=
    9495case $0 in #((
    9596  *[\\/]* ) as_myself=$0 ;;
     
    173174  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
    174175  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
    175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
     176  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
     177test \$(( 1 + 1 )) = 2 || exit 1"
    176178  if (eval "$as_required") 2>/dev/null; then :
    177179  as_have_required=yes
     
    216218        # neutralization value for shells without unset; and this also
    217219        # works around shells that cannot unset nonexistent variables.
     220        # Preserve -v and -x to the replacement shell.
    218221        BASH_ENV=/dev/null
    219222        ENV=/dev/null
    220223        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
    221224        export CONFIG_SHELL
    222         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
     225        case $- in # ((((
     226          *v*x* | *x*v* ) as_opts=-vx ;;
     227          *v* ) as_opts=-v ;;
     228          *x* ) as_opts=-x ;;
     229          * ) as_opts= ;;
     230        esac
     231        exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
    223232fi
    224233
     
    319328    done
    320329    test -z "$as_dirs" || eval "mkdir $as_dirs"
    321   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
     330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
    322331
    323332
     
    359368
    360369
    361 # as_fn_error ERROR [LINENO LOG_FD]
    362 # ---------------------------------
     370# as_fn_error STATUS ERROR [LINENO LOG_FD]
     371# ----------------------------------------
    363372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
    364373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
    365 # script with status $?, using 1 if that was 0.
     374# script with STATUS, using 1 if that was 0.
    366375as_fn_error ()
    367376{
    368   as_status=$?; test $as_status -eq 0 && as_status=1
    369   if test "$3"; then
    370     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    371     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
     377  as_status=$1; test $as_status -eq 0 && as_status=1
     378  if test "$4"; then
     379    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     380    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
    372381  fi
    373   $as_echo "$as_me: error: $1" >&2
     382  $as_echo "$as_me: error: $2" >&2
    374383  as_fn_exit $as_status
    375384} # as_fn_error
     
    533542
    534543# Name of the host.
    535 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
     544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
    536545# so uname gets run too.
    537546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
     
    557566PACKAGE_URL=''
    558567
     568# Factoring default headers for most tests.
     569ac_includes_default="\
     570#include <stdio.h>
     571#ifdef HAVE_SYS_TYPES_H
     572# include <sys/types.h>
     573#endif
     574#ifdef HAVE_SYS_STAT_H
     575# include <sys/stat.h>
     576#endif
     577#ifdef STDC_HEADERS
     578# include <stdlib.h>
     579# include <stddef.h>
     580#else
     581# ifdef HAVE_STDLIB_H
     582#  include <stdlib.h>
     583# endif
     584#endif
     585#ifdef HAVE_STRING_H
     586# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
     587#  include <memory.h>
     588# endif
     589# include <string.h>
     590#endif
     591#ifdef HAVE_STRINGS_H
     592# include <strings.h>
     593#endif
     594#ifdef HAVE_INTTYPES_H
     595# include <inttypes.h>
     596#endif
     597#ifdef HAVE_STDINT_H
     598# include <stdint.h>
     599#endif
     600#ifdef HAVE_UNISTD_H
     601# include <unistd.h>
     602#endif"
     603
    559604ac_subst_vars='LTLIBOBJS
    560605LIBOBJS
     
    566611ENABLE_GUI
    567612MAKE
     613SHLIB_LDFLAGS
     614INSTALL_STUB_LIB
     615INSTALL_LIB
     616MAKE_STUB_LIB
     617MAKE_LIB
     618SHLIB_SUFFIX
     619SHLIB_CFLAGS
     620SHLIB_LD_LIBS
     621TK_SHLIB_LD_EXTRAS
     622TCL_SHLIB_LD_EXTRAS
     623SHLIB_LD
     624STLIB_LD
     625LD_SEARCH_FLAGS
     626CC_SEARCH_FLAGS
     627LDFLAGS_OPTIMIZE
     628LDFLAGS_DEBUG
     629CFLAGS_WARNING
     630CFLAGS_OPTIMIZE
     631CFLAGS_DEBUG
     632PLAT_SRCS
     633PLAT_OBJS
     634DL_OBJS
     635DL_LIBS
     636EGREP
     637GREP
     638CPP
     639AR
     640OBJEXT
     641EXEEXT
     642ac_ct_CC
     643CPPFLAGS
     644LDFLAGS
     645CFLAGS
     646CC
    568647SET_MAKE
    569648MKDIR_P
     
    627706ac_user_opts='
    628707enable_option_checking
     708enable_64bit
     709enable_64bit_vis
     710enable_corefoundation
     711enable_load
     712enable_shared
    629713enable_gui
    630714with_tclsh
     
    632716      ac_precious_vars='build_alias
    633717host_alias
    634 target_alias'
     718target_alias
     719CC
     720CFLAGS
     721LDFLAGS
     722LIBS
     723CPPFLAGS
     724CPP'
    635725
    636726
     
    695785
    696786  case $ac_option in
    697   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
    698   *)    ac_optarg=yes ;;
     787  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
     788  *=)   ac_optarg= ;;
     789  *)    ac_optarg=yes ;;
    699790  esac
    700791
     
    741832    # Reject names that are not valid shell variable names.
    742833    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    743       as_fn_error "invalid feature name: $ac_useropt"
     834      as_fn_error $? "invalid feature name: $ac_useropt"
    744835    ac_useropt_orig=$ac_useropt
    745836    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    767858    # Reject names that are not valid shell variable names.
    768859    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    769       as_fn_error "invalid feature name: $ac_useropt"
     860      as_fn_error $? "invalid feature name: $ac_useropt"
    770861    ac_useropt_orig=$ac_useropt
    771862    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    9711062    # Reject names that are not valid shell variable names.
    9721063    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    973       as_fn_error "invalid package name: $ac_useropt"
     1064      as_fn_error $? "invalid package name: $ac_useropt"
    9741065    ac_useropt_orig=$ac_useropt
    9751066    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    9871078    # Reject names that are not valid shell variable names.
    9881079    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    989       as_fn_error "invalid package name: $ac_useropt"
     1080      as_fn_error $? "invalid package name: $ac_useropt"
    9901081    ac_useropt_orig=$ac_useropt
    9911082    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    10171108    x_libraries=$ac_optarg ;;
    10181109
    1019   -*) as_fn_error "unrecognized option: \`$ac_option'
    1020 Try \`$0 --help' for more information."
     1110  -*) as_fn_error $? "unrecognized option: \`$ac_option'
     1111Try \`$0 --help' for more information"
    10211112    ;;
    10221113
     
    10261117    case $ac_envvar in #(
    10271118      '' | [0-9]* | *[!_$as_cr_alnum]* )
    1028       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
     1119      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    10291120    esac
    10301121    eval $ac_envvar=\$ac_optarg
     
    10361127    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    10371128      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    1038     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     1129    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    10391130    ;;
    10401131
     
    10441135if test -n "$ac_prev"; then
    10451136  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
    1046   as_fn_error "missing argument to $ac_option"
     1137  as_fn_error $? "missing argument to $ac_option"
    10471138fi
    10481139
     
    10501141  case $enable_option_checking in
    10511142    no) ;;
    1052     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
     1143    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    10531144    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    10541145  esac
     
    10731164    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    10741165  esac
    1075   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
     1166  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
    10761167done
    10771168
     
    10871178  if test "x$build_alias" = x; then
    10881179    cross_compiling=maybe
    1089     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    1090     If a cross compiler is detected then cross compile mode will be used." >&2
     1180    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
     1181    If a cross compiler is detected then cross compile mode will be used" >&2
    10911182  elif test "x$build_alias" != "x$host_alias"; then
    10921183    cross_compiling=yes
     
    11031194ac_ls_di=`ls -di .` &&
    11041195ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
    1105   as_fn_error "working directory cannot be determined"
     1196  as_fn_error $? "working directory cannot be determined"
    11061197test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
    1107   as_fn_error "pwd does not report name of working directory"
     1198  as_fn_error $? "pwd does not report name of working directory"
    11081199
    11091200
     
    11441235if test ! -r "$srcdir/$ac_unique_file"; then
    11451236  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
    1146   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
     1237  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
    11471238fi
    11481239ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
    11491240ac_abs_confdir=`(
    1150         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
     1241        cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
    11511242        pwd)`
    11521243# When building in place, set srcdir=.
     
    11881279      --help=recursive    display the short help of all the included packages
    11891280  -V, --version           display version information and exit
    1190   -q, --quiet, --silent   do not print \`checking...' messages
     1281  -q, --quiet, --silent   do not print \`checking ...' messages
    11911282      --cache-file=FILE   cache test results in FILE [disabled]
    11921283  -C, --config-cache      alias for \`--cache-file=config.cache'
     
    12481339  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
    12491340  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
     1341  --enable-64bit          enable 64bit support (where applicable)
     1342  --enable-64bit-vis      enable 64bit Sparc VIS support
     1343  --enable-corefoundation use CoreFoundation API --enable-corefoundation
     1344  --disable-load          disallow dynamic loading and "load" command
     1345  --enable-shared         build and link with shared libraries --enable-shared
    12501346  --enable-gui            build code related to the graphical user interface
    12511347                          [default=yes]
     
    12551351  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    12561352  --with-tclsh=DIR        location of tclsh [default=yes]
     1353
     1354Some influential environment variables:
     1355  CC          C compiler command
     1356  CFLAGS      C compiler flags
     1357  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
     1358              nonstandard directory <lib dir>
     1359  LIBS        libraries to pass to the linker, e.g. -l<library>
     1360  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
     1361              you have headers in a nonstandard directory <include dir>
     1362  CPP         C preprocessor
     1363
     1364Use these variables to override the choices made by `configure' or to help
     1365it to find libraries and programs with nonstandard names/locations.
    12571366
    12581367Report bugs to <rappture@nanohub.org>.
     
    13201429  cat <<\_ACEOF
    13211430RapptureGUI configure 1.1
    1322 generated by GNU Autoconf 2.65
    1323 
    1324 Copyright (C) 2009 Free Software Foundation, Inc.
     1431generated by GNU Autoconf 2.68
     1432
     1433Copyright (C) 2010 Free Software Foundation, Inc.
    13251434This configure script is free software; the Free Software Foundation
    13261435gives unlimited permission to copy, distribute and modify it.
     
    13321441## Autoconf initialization. ##
    13331442## ------------------------ ##
     1443
     1444# ac_fn_c_try_compile LINENO
     1445# --------------------------
     1446# Try to compile conftest.$ac_ext, and return whether this succeeded.
     1447ac_fn_c_try_compile ()
     1448{
     1449  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1450  rm -f conftest.$ac_objext
     1451  if { { ac_try="$ac_compile"
     1452case "(($ac_try" in
     1453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     1454  *) ac_try_echo=$ac_try;;
     1455esac
     1456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     1457$as_echo "$ac_try_echo"; } >&5
     1458  (eval "$ac_compile") 2>conftest.err
     1459  ac_status=$?
     1460  if test -s conftest.err; then
     1461    grep -v '^ *+' conftest.err >conftest.er1
     1462    cat conftest.er1 >&5
     1463    mv -f conftest.er1 conftest.err
     1464  fi
     1465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1466  test $ac_status = 0; } && {
     1467         test -z "$ac_c_werror_flag" ||
     1468         test ! -s conftest.err
     1469       } && test -s conftest.$ac_objext; then :
     1470  ac_retval=0
     1471else
     1472  $as_echo "$as_me: failed program was:" >&5
     1473sed 's/^/| /' conftest.$ac_ext >&5
     1474
     1475        ac_retval=1
     1476fi
     1477  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1478  as_fn_set_status $ac_retval
     1479
     1480} # ac_fn_c_try_compile
     1481
     1482# ac_fn_c_try_link LINENO
     1483# -----------------------
     1484# Try to link conftest.$ac_ext, and return whether this succeeded.
     1485ac_fn_c_try_link ()
     1486{
     1487  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1488  rm -f conftest.$ac_objext conftest$ac_exeext
     1489  if { { ac_try="$ac_link"
     1490case "(($ac_try" in
     1491  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     1492  *) ac_try_echo=$ac_try;;
     1493esac
     1494eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     1495$as_echo "$ac_try_echo"; } >&5
     1496  (eval "$ac_link") 2>conftest.err
     1497  ac_status=$?
     1498  if test -s conftest.err; then
     1499    grep -v '^ *+' conftest.err >conftest.er1
     1500    cat conftest.er1 >&5
     1501    mv -f conftest.er1 conftest.err
     1502  fi
     1503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1504  test $ac_status = 0; } && {
     1505         test -z "$ac_c_werror_flag" ||
     1506         test ! -s conftest.err
     1507       } && test -s conftest$ac_exeext && {
     1508         test "$cross_compiling" = yes ||
     1509         $as_test_x conftest$ac_exeext
     1510       }; then :
     1511  ac_retval=0
     1512else
     1513  $as_echo "$as_me: failed program was:" >&5
     1514sed 's/^/| /' conftest.$ac_ext >&5
     1515
     1516        ac_retval=1
     1517fi
     1518  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
     1519  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
     1520  # interfere with the next link command; also delete a directory that is
     1521  # left behind by Apple's compiler.  We do this before executing the actions.
     1522  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
     1523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1524  as_fn_set_status $ac_retval
     1525
     1526} # ac_fn_c_try_link
     1527
     1528# ac_fn_c_try_cpp LINENO
     1529# ----------------------
     1530# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
     1531ac_fn_c_try_cpp ()
     1532{
     1533  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1534  if { { ac_try="$ac_cpp conftest.$ac_ext"
     1535case "(($ac_try" in
     1536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     1537  *) ac_try_echo=$ac_try;;
     1538esac
     1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     1540$as_echo "$ac_try_echo"; } >&5
     1541  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
     1542  ac_status=$?
     1543  if test -s conftest.err; then
     1544    grep -v '^ *+' conftest.err >conftest.er1
     1545    cat conftest.er1 >&5
     1546    mv -f conftest.er1 conftest.err
     1547  fi
     1548  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1549  test $ac_status = 0; } > conftest.i && {
     1550         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     1551         test ! -s conftest.err
     1552       }; then :
     1553  ac_retval=0
     1554else
     1555  $as_echo "$as_me: failed program was:" >&5
     1556sed 's/^/| /' conftest.$ac_ext >&5
     1557
     1558    ac_retval=1
     1559fi
     1560  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1561  as_fn_set_status $ac_retval
     1562
     1563} # ac_fn_c_try_cpp
     1564
     1565# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
     1566# -------------------------------------------------------
     1567# Tests whether HEADER exists, giving a warning if it cannot be compiled using
     1568# the include files in INCLUDES and setting the cache variable VAR
     1569# accordingly.
     1570ac_fn_c_check_header_mongrel ()
     1571{
     1572  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1573  if eval \${$3+:} false; then :
     1574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
     1575$as_echo_n "checking for $2... " >&6; }
     1576if eval \${$3+:} false; then :
     1577  $as_echo_n "(cached) " >&6
     1578fi
     1579eval ac_res=\$$3
     1580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     1581$as_echo "$ac_res" >&6; }
     1582else
     1583  # Is the header compilable?
     1584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
     1585$as_echo_n "checking $2 usability... " >&6; }
     1586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     1587/* end confdefs.h.  */
     1588$4
     1589#include <$2>
     1590_ACEOF
     1591if ac_fn_c_try_compile "$LINENO"; then :
     1592  ac_header_compiler=yes
     1593else
     1594  ac_header_compiler=no
     1595fi
     1596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     1597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
     1598$as_echo "$ac_header_compiler" >&6; }
     1599
     1600# Is the header present?
     1601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
     1602$as_echo_n "checking $2 presence... " >&6; }
     1603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     1604/* end confdefs.h.  */
     1605#include <$2>
     1606_ACEOF
     1607if ac_fn_c_try_cpp "$LINENO"; then :
     1608  ac_header_preproc=yes
     1609else
     1610  ac_header_preproc=no
     1611fi
     1612rm -f conftest.err conftest.i conftest.$ac_ext
     1613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
     1614$as_echo "$ac_header_preproc" >&6; }
     1615
     1616# So?  What about this header?
     1617case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
     1618  yes:no: )
     1619    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
     1620$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
     1621    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
     1622$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
     1623    ;;
     1624  no:yes:* )
     1625    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
     1626$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
     1627    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
     1628$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
     1629    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
     1630$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
     1631    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
     1632$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     1633    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
     1634$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
     1635( $as_echo "## ----------------------------------- ##
     1636## Report this to rappture@nanohub.org ##
     1637## ----------------------------------- ##"
     1638     ) | sed "s/^/$as_me: WARNING:     /" >&2
     1639    ;;
     1640esac
     1641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
     1642$as_echo_n "checking for $2... " >&6; }
     1643if eval \${$3+:} false; then :
     1644  $as_echo_n "(cached) " >&6
     1645else
     1646  eval "$3=\$ac_header_compiler"
     1647fi
     1648eval ac_res=\$$3
     1649               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     1650$as_echo "$ac_res" >&6; }
     1651fi
     1652  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1653
     1654} # ac_fn_c_check_header_mongrel
     1655
     1656# ac_fn_c_try_run LINENO
     1657# ----------------------
     1658# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
     1659# that executables *can* be run.
     1660ac_fn_c_try_run ()
     1661{
     1662  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1663  if { { ac_try="$ac_link"
     1664case "(($ac_try" in
     1665  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     1666  *) ac_try_echo=$ac_try;;
     1667esac
     1668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     1669$as_echo "$ac_try_echo"; } >&5
     1670  (eval "$ac_link") 2>&5
     1671  ac_status=$?
     1672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1673  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
     1674  { { case "(($ac_try" in
     1675  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     1676  *) ac_try_echo=$ac_try;;
     1677esac
     1678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     1679$as_echo "$ac_try_echo"; } >&5
     1680  (eval "$ac_try") 2>&5
     1681  ac_status=$?
     1682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1683  test $ac_status = 0; }; }; then :
     1684  ac_retval=0
     1685else
     1686  $as_echo "$as_me: program exited with status $ac_status" >&5
     1687       $as_echo "$as_me: failed program was:" >&5
     1688sed 's/^/| /' conftest.$ac_ext >&5
     1689
     1690       ac_retval=$ac_status
     1691fi
     1692  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
     1693  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1694  as_fn_set_status $ac_retval
     1695
     1696} # ac_fn_c_try_run
     1697
     1698# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
     1699# -------------------------------------------------------
     1700# Tests whether HEADER exists and can be compiled using the include files in
     1701# INCLUDES, setting the cache variable VAR accordingly.
     1702ac_fn_c_check_header_compile ()
     1703{
     1704  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     1705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
     1706$as_echo_n "checking for $2... " >&6; }
     1707if eval \${$3+:} false; then :
     1708  $as_echo_n "(cached) " >&6
     1709else
     1710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     1711/* end confdefs.h.  */
     1712$4
     1713#include <$2>
     1714_ACEOF
     1715if ac_fn_c_try_compile "$LINENO"; then :
     1716  eval "$3=yes"
     1717else
     1718  eval "$3=no"
     1719fi
     1720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     1721fi
     1722eval ac_res=\$$3
     1723               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     1724$as_echo "$ac_res" >&6; }
     1725  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     1726
     1727} # ac_fn_c_check_header_compile
    13341728cat >config.log <<_ACEOF
    13351729This file contains any messages produced by compilers while
     
    13371731
    13381732It was created by RapptureGUI $as_me 1.1, which was
    1339 generated by GNU Autoconf 2.65.  Invocation command line was
     1733generated by GNU Autoconf 2.68.  Invocation command line was
    13401734
    13411735  $ $0 $@
     
    14471841    echo
    14481842
    1449     cat <<\_ASBOX
    1450 ## ---------------- ##
     1843    $as_echo "## ---------------- ##
    14511844## Cache variables. ##
    1452 ## ---------------- ##
    1453 _ASBOX
     1845## ---------------- ##"
    14541846    echo
    14551847    # The following way of writing the cache mishandles newlines in values,
     
    14851877    echo
    14861878
    1487     cat <<\_ASBOX
    1488 ## ----------------- ##
     1879    $as_echo "## ----------------- ##
    14891880## Output variables. ##
    1490 ## ----------------- ##
    1491 _ASBOX
     1881## ----------------- ##"
    14921882    echo
    14931883    for ac_var in $ac_subst_vars
     
    15021892
    15031893    if test -n "$ac_subst_files"; then
    1504       cat <<\_ASBOX
    1505 ## ------------------- ##
     1894      $as_echo "## ------------------- ##
    15061895## File substitutions. ##
    1507 ## ------------------- ##
    1508 _ASBOX
     1896## ------------------- ##"
    15091897      echo
    15101898      for ac_var in $ac_subst_files
     
    15201908
    15211909    if test -s confdefs.h; then
    1522       cat <<\_ASBOX
    1523 ## ----------- ##
     1910      $as_echo "## ----------- ##
    15241911## confdefs.h. ##
    1525 ## ----------- ##
    1526 _ASBOX
     1912## ----------- ##"
    15271913      echo
    15281914      cat confdefs.h
     
    15791965ac_site_file2=NONE
    15801966if test -n "$CONFIG_SITE"; then
    1581   ac_site_file1=$CONFIG_SITE
     1967  # We do not want a PATH search for config.site.
     1968  case $CONFIG_SITE in #((
     1969    -*)  ac_site_file1=./$CONFIG_SITE;;
     1970    */*) ac_site_file1=$CONFIG_SITE;;
     1971    *)   ac_site_file1=./$CONFIG_SITE;;
     1972  esac
    15821973elif test "x$prefix" != xNONE; then
    15831974  ac_site_file1=$prefix/share/config.site
     
    15941985$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    15951986    sed 's/^/| /' "$ac_site_file" >&5
    1596     . "$ac_site_file"
     1987    . "$ac_site_file" \
     1988      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     1989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     1990as_fn_error $? "failed to load site script $ac_site_file
     1991See \`config.log' for more details" "$LINENO" 5; }
    15971992  fi
    15981993done
     
    16702065  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
    16712066$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
    1672   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
     2067  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
    16732068fi
    16742069## -------------------- ##
     
    16852080ac_aux_dir=
    16862081for ac_dir in cf "$srcdir"/cf; do
    1687   for ac_t in install-sh install.sh shtool; do
    1688     if test -f "$ac_dir/$ac_t"; then
    1689       ac_aux_dir=$ac_dir
    1690       ac_install_sh="$ac_aux_dir/$ac_t -c"
    1691       break 2
    1692     fi
    1693   done
     2082  if test -f "$ac_dir/install-sh"; then
     2083    ac_aux_dir=$ac_dir
     2084    ac_install_sh="$ac_aux_dir/install-sh -c"
     2085    break
     2086  elif test -f "$ac_dir/install.sh"; then
     2087    ac_aux_dir=$ac_dir
     2088    ac_install_sh="$ac_aux_dir/install.sh -c"
     2089    break
     2090  elif test -f "$ac_dir/shtool"; then
     2091    ac_aux_dir=$ac_dir
     2092    ac_install_sh="$ac_aux_dir/shtool install -c"
     2093    break
     2094  fi
    16942095done
    16952096if test -z "$ac_aux_dir"; then
    1696   as_fn_error "cannot find install-sh, install.sh, or shtool in cf \"$srcdir\"/cf" "$LINENO" 5
     2097  as_fn_error $? "cannot find install-sh, install.sh, or shtool in cf \"$srcdir\"/cf" "$LINENO" 5
    16972098fi
    16982099
     
    17242125# Make sure we can run config.sub.
    17252126$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
    1726   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
     2127  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
    17272128
    17282129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
    17292130$as_echo_n "checking build system type... " >&6; }
    1730 if test "${ac_cv_build+set}" = set; then :
     2131if ${ac_cv_build+:} false; then :
    17312132  $as_echo_n "(cached) " >&6
    17322133else
     
    17352136  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
    17362137test "x$ac_build_alias" = x &&
    1737   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
     2138  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
    17382139ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
    1739   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
     2140  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
    17402141
    17412142fi
     
    17442145case $ac_cv_build in
    17452146*-*-*) ;;
    1746 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
     2147*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
    17472148esac
    17482149build=$ac_cv_build
     
    17622163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
    17632164$as_echo_n "checking host system type... " >&6; }
    1764 if test "${ac_cv_host+set}" = set; then :
     2165if ${ac_cv_host+:} false; then :
    17652166  $as_echo_n "(cached) " >&6
    17662167else
     
    17692170else
    17702171  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    1771     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
     2172    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
    17722173fi
    17732174
     
    17772178case $ac_cv_host in
    17782179*-*-*) ;;
    1779 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
     2180*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
    17802181esac
    17812182host=$ac_cv_host
     
    17952196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
    17962197$as_echo_n "checking target system type... " >&6; }
    1797 if test "${ac_cv_target+set}" = set; then :
     2198if ${ac_cv_target+:} false; then :
    17982199  $as_echo_n "(cached) " >&6
    17992200else
     
    18022203else
    18032204  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    1804     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
     2205    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
    18052206fi
    18062207
     
    18102211case $ac_cv_target in
    18112212*-*-*) ;;
    1812 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
     2213*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
    18132214esac
    18142215target=$ac_cv_target
     
    18512252$as_echo_n "checking for a BSD-compatible install... " >&6; }
    18522253if test -z "$INSTALL"; then
    1853 if test "${ac_cv_path_install+set}" = set; then :
     2254if ${ac_cv_path_install+:} false; then :
    18542255  $as_echo_n "(cached) " >&6
    18552256else
     
    19332334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    19342335$as_echo_n "checking for $ac_word... " >&6; }
    1935 if test "${ac_cv_prog_RANLIB+set}" = set; then :
     2336if ${ac_cv_prog_RANLIB+:} false; then :
    19362337  $as_echo_n "(cached) " >&6
    19372338else
     
    19732374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    19742375$as_echo_n "checking for $ac_word... " >&6; }
    1975 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
     2376if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
    19762377  $as_echo_n "(cached) " >&6
    19772378else
     
    20342435$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
    20352436if test -z "$MKDIR_P"; then
    2036   if test "${ac_cv_path_mkdir+set}" = set; then :
     2437  if ${ac_cv_path_mkdir+:} false; then :
    20372438  $as_echo_n "(cached) " >&6
    20382439else
     
    20772478set x ${MAKE-make}
    20782479ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
    2079 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
     2480if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
    20802481  $as_echo_n "(cached) " >&6
    20812482else
     
    20852486        @echo '@@@%%%=$(MAKE)=@@@%%%'
    20862487_ACEOF
    2087 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
     2488# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
    20882489case `${MAKE-make} -f conftest.make 2>/dev/null` in
    20892490  *@@@%%%=?*=@@@%%%*)
     
    21032504  SET_MAKE="MAKE=${MAKE-make}"
    21042505fi
     2506
     2507ac_ext=c
     2508ac_cpp='$CPP $CPPFLAGS'
     2509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     2510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     2511ac_compiler_gnu=$ac_cv_c_compiler_gnu
     2512if test -n "$ac_tool_prefix"; then
     2513  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
     2514set dummy ${ac_tool_prefix}gcc; ac_word=$2
     2515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2516$as_echo_n "checking for $ac_word... " >&6; }
     2517if ${ac_cv_prog_CC+:} false; then :
     2518  $as_echo_n "(cached) " >&6
     2519else
     2520  if test -n "$CC"; then
     2521  ac_cv_prog_CC="$CC" # Let the user override the test.
     2522else
     2523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2524for as_dir in $PATH
     2525do
     2526  IFS=$as_save_IFS
     2527  test -z "$as_dir" && as_dir=.
     2528    for ac_exec_ext in '' $ac_executable_extensions; do
     2529  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2530    ac_cv_prog_CC="${ac_tool_prefix}gcc"
     2531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2532    break 2
     2533  fi
     2534done
     2535  done
     2536IFS=$as_save_IFS
     2537
     2538fi
     2539fi
     2540CC=$ac_cv_prog_CC
     2541if test -n "$CC"; then
     2542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     2543$as_echo "$CC" >&6; }
     2544else
     2545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2546$as_echo "no" >&6; }
     2547fi
     2548
     2549
     2550fi
     2551if test -z "$ac_cv_prog_CC"; then
     2552  ac_ct_CC=$CC
     2553  # Extract the first word of "gcc", so it can be a program name with args.
     2554set dummy gcc; ac_word=$2
     2555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2556$as_echo_n "checking for $ac_word... " >&6; }
     2557if ${ac_cv_prog_ac_ct_CC+:} false; then :
     2558  $as_echo_n "(cached) " >&6
     2559else
     2560  if test -n "$ac_ct_CC"; then
     2561  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
     2562else
     2563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2564for as_dir in $PATH
     2565do
     2566  IFS=$as_save_IFS
     2567  test -z "$as_dir" && as_dir=.
     2568    for ac_exec_ext in '' $ac_executable_extensions; do
     2569  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2570    ac_cv_prog_ac_ct_CC="gcc"
     2571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2572    break 2
     2573  fi
     2574done
     2575  done
     2576IFS=$as_save_IFS
     2577
     2578fi
     2579fi
     2580ac_ct_CC=$ac_cv_prog_ac_ct_CC
     2581if test -n "$ac_ct_CC"; then
     2582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
     2583$as_echo "$ac_ct_CC" >&6; }
     2584else
     2585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2586$as_echo "no" >&6; }
     2587fi
     2588
     2589  if test "x$ac_ct_CC" = x; then
     2590    CC=""
     2591  else
     2592    case $cross_compiling:$ac_tool_warned in
     2593yes:)
     2594{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     2595$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     2596ac_tool_warned=yes ;;
     2597esac
     2598    CC=$ac_ct_CC
     2599  fi
     2600else
     2601  CC="$ac_cv_prog_CC"
     2602fi
     2603
     2604if test -z "$CC"; then
     2605          if test -n "$ac_tool_prefix"; then
     2606    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
     2607set dummy ${ac_tool_prefix}cc; ac_word=$2
     2608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2609$as_echo_n "checking for $ac_word... " >&6; }
     2610if ${ac_cv_prog_CC+:} false; then :
     2611  $as_echo_n "(cached) " >&6
     2612else
     2613  if test -n "$CC"; then
     2614  ac_cv_prog_CC="$CC" # Let the user override the test.
     2615else
     2616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2617for as_dir in $PATH
     2618do
     2619  IFS=$as_save_IFS
     2620  test -z "$as_dir" && as_dir=.
     2621    for ac_exec_ext in '' $ac_executable_extensions; do
     2622  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2623    ac_cv_prog_CC="${ac_tool_prefix}cc"
     2624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2625    break 2
     2626  fi
     2627done
     2628  done
     2629IFS=$as_save_IFS
     2630
     2631fi
     2632fi
     2633CC=$ac_cv_prog_CC
     2634if test -n "$CC"; then
     2635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     2636$as_echo "$CC" >&6; }
     2637else
     2638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2639$as_echo "no" >&6; }
     2640fi
     2641
     2642
     2643  fi
     2644fi
     2645if test -z "$CC"; then
     2646  # Extract the first word of "cc", so it can be a program name with args.
     2647set dummy cc; ac_word=$2
     2648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2649$as_echo_n "checking for $ac_word... " >&6; }
     2650if ${ac_cv_prog_CC+:} false; then :
     2651  $as_echo_n "(cached) " >&6
     2652else
     2653  if test -n "$CC"; then
     2654  ac_cv_prog_CC="$CC" # Let the user override the test.
     2655else
     2656  ac_prog_rejected=no
     2657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2658for as_dir in $PATH
     2659do
     2660  IFS=$as_save_IFS
     2661  test -z "$as_dir" && as_dir=.
     2662    for ac_exec_ext in '' $ac_executable_extensions; do
     2663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2664    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
     2665       ac_prog_rejected=yes
     2666       continue
     2667     fi
     2668    ac_cv_prog_CC="cc"
     2669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2670    break 2
     2671  fi
     2672done
     2673  done
     2674IFS=$as_save_IFS
     2675
     2676if test $ac_prog_rejected = yes; then
     2677  # We found a bogon in the path, so make sure we never use it.
     2678  set dummy $ac_cv_prog_CC
     2679  shift
     2680  if test $# != 0; then
     2681    # We chose a different compiler from the bogus one.
     2682    # However, it has the same basename, so the bogon will be chosen
     2683    # first if we set CC to just the basename; use the full file name.
     2684    shift
     2685    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
     2686  fi
     2687fi
     2688fi
     2689fi
     2690CC=$ac_cv_prog_CC
     2691if test -n "$CC"; then
     2692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     2693$as_echo "$CC" >&6; }
     2694else
     2695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2696$as_echo "no" >&6; }
     2697fi
     2698
     2699
     2700fi
     2701if test -z "$CC"; then
     2702  if test -n "$ac_tool_prefix"; then
     2703  for ac_prog in cl.exe
     2704  do
     2705    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     2706set dummy $ac_tool_prefix$ac_prog; ac_word=$2
     2707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2708$as_echo_n "checking for $ac_word... " >&6; }
     2709if ${ac_cv_prog_CC+:} false; then :
     2710  $as_echo_n "(cached) " >&6
     2711else
     2712  if test -n "$CC"; then
     2713  ac_cv_prog_CC="$CC" # Let the user override the test.
     2714else
     2715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2716for as_dir in $PATH
     2717do
     2718  IFS=$as_save_IFS
     2719  test -z "$as_dir" && as_dir=.
     2720    for ac_exec_ext in '' $ac_executable_extensions; do
     2721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2722    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     2723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2724    break 2
     2725  fi
     2726done
     2727  done
     2728IFS=$as_save_IFS
     2729
     2730fi
     2731fi
     2732CC=$ac_cv_prog_CC
     2733if test -n "$CC"; then
     2734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     2735$as_echo "$CC" >&6; }
     2736else
     2737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2738$as_echo "no" >&6; }
     2739fi
     2740
     2741
     2742    test -n "$CC" && break
     2743  done
     2744fi
     2745if test -z "$CC"; then
     2746  ac_ct_CC=$CC
     2747  for ac_prog in cl.exe
     2748do
     2749  # Extract the first word of "$ac_prog", so it can be a program name with args.
     2750set dummy $ac_prog; ac_word=$2
     2751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2752$as_echo_n "checking for $ac_word... " >&6; }
     2753if ${ac_cv_prog_ac_ct_CC+:} false; then :
     2754  $as_echo_n "(cached) " >&6
     2755else
     2756  if test -n "$ac_ct_CC"; then
     2757  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
     2758else
     2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2760for as_dir in $PATH
     2761do
     2762  IFS=$as_save_IFS
     2763  test -z "$as_dir" && as_dir=.
     2764    for ac_exec_ext in '' $ac_executable_extensions; do
     2765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2766    ac_cv_prog_ac_ct_CC="$ac_prog"
     2767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2768    break 2
     2769  fi
     2770done
     2771  done
     2772IFS=$as_save_IFS
     2773
     2774fi
     2775fi
     2776ac_ct_CC=$ac_cv_prog_ac_ct_CC
     2777if test -n "$ac_ct_CC"; then
     2778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
     2779$as_echo "$ac_ct_CC" >&6; }
     2780else
     2781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2782$as_echo "no" >&6; }
     2783fi
     2784
     2785
     2786  test -n "$ac_ct_CC" && break
     2787done
     2788
     2789  if test "x$ac_ct_CC" = x; then
     2790    CC=""
     2791  else
     2792    case $cross_compiling:$ac_tool_warned in
     2793yes:)
     2794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     2795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     2796ac_tool_warned=yes ;;
     2797esac
     2798    CC=$ac_ct_CC
     2799  fi
     2800fi
     2801
     2802fi
     2803
     2804
     2805test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     2806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     2807as_fn_error $? "no acceptable C compiler found in \$PATH
     2808See \`config.log' for more details" "$LINENO" 5; }
     2809
     2810# Provide some information about the compiler.
     2811$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
     2812set X $ac_compile
     2813ac_compiler=$2
     2814for ac_option in --version -v -V -qversion; do
     2815  { { ac_try="$ac_compiler $ac_option >&5"
     2816case "(($ac_try" in
     2817  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2818  *) ac_try_echo=$ac_try;;
     2819esac
     2820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     2821$as_echo "$ac_try_echo"; } >&5
     2822  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
     2823  ac_status=$?
     2824  if test -s conftest.err; then
     2825    sed '10a\
     2826... rest of stderr output deleted ...
     2827         10q' conftest.err >conftest.er1
     2828    cat conftest.er1 >&5
     2829  fi
     2830  rm -f conftest.er1 conftest.err
     2831  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     2832  test $ac_status = 0; }
     2833done
     2834
     2835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     2836/* end confdefs.h.  */
     2837
     2838int
     2839main ()
     2840{
     2841
     2842  ;
     2843  return 0;
     2844}
     2845_ACEOF
     2846ac_clean_files_save=$ac_clean_files
     2847ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
     2848# Try to create an executable without -o first, disregard a.out.
     2849# It will help us diagnose broken compilers, and finding out an intuition
     2850# of exeext.
     2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
     2852$as_echo_n "checking whether the C compiler works... " >&6; }
     2853ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
     2854
     2855# The possible output files:
     2856ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
     2857
     2858ac_rmfiles=
     2859for ac_file in $ac_files
     2860do
     2861  case $ac_file in
     2862    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     2863    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
     2864  esac
     2865done
     2866rm -f $ac_rmfiles
     2867
     2868if { { ac_try="$ac_link_default"
     2869case "(($ac_try" in
     2870  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2871  *) ac_try_echo=$ac_try;;
     2872esac
     2873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     2874$as_echo "$ac_try_echo"; } >&5
     2875  (eval "$ac_link_default") 2>&5
     2876  ac_status=$?
     2877  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     2878  test $ac_status = 0; }; then :
     2879  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
     2880# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
     2881# in a Makefile.  We should not override ac_cv_exeext if it was cached,
     2882# so that the user can short-circuit this test for compilers unknown to
     2883# Autoconf.
     2884for ac_file in $ac_files ''
     2885do
     2886  test -f "$ac_file" || continue
     2887  case $ac_file in
     2888    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
     2889        ;;
     2890    [ab].out )
     2891        # We found the default executable, but exeext='' is most
     2892        # certainly right.
     2893        break;;
     2894    *.* )
     2895        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
     2896        then :; else
     2897           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
     2898        fi
     2899        # We set ac_cv_exeext here because the later test for it is not
     2900        # safe: cross compilers may not add the suffix if given an `-o'
     2901        # argument, so we may need to know it at that point already.
     2902        # Even if this section looks crufty: it has the advantage of
     2903        # actually working.
     2904        break;;
     2905    * )
     2906        break;;
     2907  esac
     2908done
     2909test "$ac_cv_exeext" = no && ac_cv_exeext=
     2910
     2911else
     2912  ac_file=''
     2913fi
     2914if test -z "$ac_file"; then :
     2915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2916$as_echo "no" >&6; }
     2917$as_echo "$as_me: failed program was:" >&5
     2918sed 's/^/| /' conftest.$ac_ext >&5
     2919
     2920{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     2921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     2922as_fn_error 77 "C compiler cannot create executables
     2923See \`config.log' for more details" "$LINENO" 5; }
     2924else
     2925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     2926$as_echo "yes" >&6; }
     2927fi
     2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
     2929$as_echo_n "checking for C compiler default output file name... " >&6; }
     2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
     2931$as_echo "$ac_file" >&6; }
     2932ac_exeext=$ac_cv_exeext
     2933
     2934rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
     2935ac_clean_files=$ac_clean_files_save
     2936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
     2937$as_echo_n "checking for suffix of executables... " >&6; }
     2938if { { ac_try="$ac_link"
     2939case "(($ac_try" in
     2940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2941  *) ac_try_echo=$ac_try;;
     2942esac
     2943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     2944$as_echo "$ac_try_echo"; } >&5
     2945  (eval "$ac_link") 2>&5
     2946  ac_status=$?
     2947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     2948  test $ac_status = 0; }; then :
     2949  # If both `conftest.exe' and `conftest' are `present' (well, observable)
     2950# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
     2951# work properly (i.e., refer to `conftest.exe'), while it won't with
     2952# `rm'.
     2953for ac_file in conftest.exe conftest conftest.*; do
     2954  test -f "$ac_file" || continue
     2955  case $ac_file in
     2956    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     2957    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
     2958          break;;
     2959    * ) break;;
     2960  esac
     2961done
     2962else
     2963  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     2964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     2965as_fn_error $? "cannot compute suffix of executables: cannot compile and link
     2966See \`config.log' for more details" "$LINENO" 5; }
     2967fi
     2968rm -f conftest conftest$ac_cv_exeext
     2969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
     2970$as_echo "$ac_cv_exeext" >&6; }
     2971
     2972rm -f conftest.$ac_ext
     2973EXEEXT=$ac_cv_exeext
     2974ac_exeext=$EXEEXT
     2975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     2976/* end confdefs.h.  */
     2977#include <stdio.h>
     2978int
     2979main ()
     2980{
     2981FILE *f = fopen ("conftest.out", "w");
     2982 return ferror (f) || fclose (f) != 0;
     2983
     2984  ;
     2985  return 0;
     2986}
     2987_ACEOF
     2988ac_clean_files="$ac_clean_files conftest.out"
     2989# Check that the compiler produces executables we can run.  If not, either
     2990# the compiler is broken, or we cross compile.
     2991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
     2992$as_echo_n "checking whether we are cross compiling... " >&6; }
     2993if test "$cross_compiling" != yes; then
     2994  { { ac_try="$ac_link"
     2995case "(($ac_try" in
     2996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     2997  *) ac_try_echo=$ac_try;;
     2998esac
     2999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     3000$as_echo "$ac_try_echo"; } >&5
     3001  (eval "$ac_link") 2>&5
     3002  ac_status=$?
     3003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3004  test $ac_status = 0; }
     3005  if { ac_try='./conftest$ac_cv_exeext'
     3006  { { case "(($ac_try" in
     3007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3008  *) ac_try_echo=$ac_try;;
     3009esac
     3010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     3011$as_echo "$ac_try_echo"; } >&5
     3012  (eval "$ac_try") 2>&5
     3013  ac_status=$?
     3014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3015  test $ac_status = 0; }; }; then
     3016    cross_compiling=no
     3017  else
     3018    if test "$cross_compiling" = maybe; then
     3019        cross_compiling=yes
     3020    else
     3021        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     3022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     3023as_fn_error $? "cannot run C compiled programs.
     3024If you meant to cross compile, use \`--host'.
     3025See \`config.log' for more details" "$LINENO" 5; }
     3026    fi
     3027  fi
     3028fi
     3029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
     3030$as_echo "$cross_compiling" >&6; }
     3031
     3032rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
     3033ac_clean_files=$ac_clean_files_save
     3034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
     3035$as_echo_n "checking for suffix of object files... " >&6; }
     3036if ${ac_cv_objext+:} false; then :
     3037  $as_echo_n "(cached) " >&6
     3038else
     3039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3040/* end confdefs.h.  */
     3041
     3042int
     3043main ()
     3044{
     3045
     3046  ;
     3047  return 0;
     3048}
     3049_ACEOF
     3050rm -f conftest.o conftest.obj
     3051if { { ac_try="$ac_compile"
     3052case "(($ac_try" in
     3053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3054  *) ac_try_echo=$ac_try;;
     3055esac
     3056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     3057$as_echo "$ac_try_echo"; } >&5
     3058  (eval "$ac_compile") 2>&5
     3059  ac_status=$?
     3060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3061  test $ac_status = 0; }; then :
     3062  for ac_file in conftest.o conftest.obj conftest.*; do
     3063  test -f "$ac_file" || continue;
     3064  case $ac_file in
     3065    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     3066    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
     3067       break;;
     3068  esac
     3069done
     3070else
     3071  $as_echo "$as_me: failed program was:" >&5
     3072sed 's/^/| /' conftest.$ac_ext >&5
     3073
     3074{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     3075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     3076as_fn_error $? "cannot compute suffix of object files: cannot compile
     3077See \`config.log' for more details" "$LINENO" 5; }
     3078fi
     3079rm -f conftest.$ac_cv_objext conftest.$ac_ext
     3080fi
     3081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
     3082$as_echo "$ac_cv_objext" >&6; }
     3083OBJEXT=$ac_cv_objext
     3084ac_objext=$OBJEXT
     3085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
     3086$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
     3087if ${ac_cv_c_compiler_gnu+:} false; then :
     3088  $as_echo_n "(cached) " >&6
     3089else
     3090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3091/* end confdefs.h.  */
     3092
     3093int
     3094main ()
     3095{
     3096#ifndef __GNUC__
     3097       choke me
     3098#endif
     3099
     3100  ;
     3101  return 0;
     3102}
     3103_ACEOF
     3104if ac_fn_c_try_compile "$LINENO"; then :
     3105  ac_compiler_gnu=yes
     3106else
     3107  ac_compiler_gnu=no
     3108fi
     3109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3110ac_cv_c_compiler_gnu=$ac_compiler_gnu
     3111
     3112fi
     3113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
     3114$as_echo "$ac_cv_c_compiler_gnu" >&6; }
     3115if test $ac_compiler_gnu = yes; then
     3116  GCC=yes
     3117else
     3118  GCC=
     3119fi
     3120ac_test_CFLAGS=${CFLAGS+set}
     3121ac_save_CFLAGS=$CFLAGS
     3122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
     3123$as_echo_n "checking whether $CC accepts -g... " >&6; }
     3124if ${ac_cv_prog_cc_g+:} false; then :
     3125  $as_echo_n "(cached) " >&6
     3126else
     3127  ac_save_c_werror_flag=$ac_c_werror_flag
     3128   ac_c_werror_flag=yes
     3129   ac_cv_prog_cc_g=no
     3130   CFLAGS="-g"
     3131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3132/* end confdefs.h.  */
     3133
     3134int
     3135main ()
     3136{
     3137
     3138  ;
     3139  return 0;
     3140}
     3141_ACEOF
     3142if ac_fn_c_try_compile "$LINENO"; then :
     3143  ac_cv_prog_cc_g=yes
     3144else
     3145  CFLAGS=""
     3146      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3147/* end confdefs.h.  */
     3148
     3149int
     3150main ()
     3151{
     3152
     3153  ;
     3154  return 0;
     3155}
     3156_ACEOF
     3157if ac_fn_c_try_compile "$LINENO"; then :
     3158
     3159else
     3160  ac_c_werror_flag=$ac_save_c_werror_flag
     3161         CFLAGS="-g"
     3162         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3163/* end confdefs.h.  */
     3164
     3165int
     3166main ()
     3167{
     3168
     3169  ;
     3170  return 0;
     3171}
     3172_ACEOF
     3173if ac_fn_c_try_compile "$LINENO"; then :
     3174  ac_cv_prog_cc_g=yes
     3175fi
     3176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3177fi
     3178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3179fi
     3180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3181   ac_c_werror_flag=$ac_save_c_werror_flag
     3182fi
     3183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
     3184$as_echo "$ac_cv_prog_cc_g" >&6; }
     3185if test "$ac_test_CFLAGS" = set; then
     3186  CFLAGS=$ac_save_CFLAGS
     3187elif test $ac_cv_prog_cc_g = yes; then
     3188  if test "$GCC" = yes; then
     3189    CFLAGS="-g -O2"
     3190  else
     3191    CFLAGS="-g"
     3192  fi
     3193else
     3194  if test "$GCC" = yes; then
     3195    CFLAGS="-O2"
     3196  else
     3197    CFLAGS=
     3198  fi
     3199fi
     3200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
     3201$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
     3202if ${ac_cv_prog_cc_c89+:} false; then :
     3203  $as_echo_n "(cached) " >&6
     3204else
     3205  ac_cv_prog_cc_c89=no
     3206ac_save_CC=$CC
     3207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3208/* end confdefs.h.  */
     3209#include <stdarg.h>
     3210#include <stdio.h>
     3211#include <sys/types.h>
     3212#include <sys/stat.h>
     3213/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
     3214struct buf { int x; };
     3215FILE * (*rcsopen) (struct buf *, struct stat *, int);
     3216static char *e (p, i)
     3217     char **p;
     3218     int i;
     3219{
     3220  return p[i];
     3221}
     3222static char *f (char * (*g) (char **, int), char **p, ...)
     3223{
     3224  char *s;
     3225  va_list v;
     3226  va_start (v,p);
     3227  s = g (p, va_arg (v,int));
     3228  va_end (v);
     3229  return s;
     3230}
     3231
     3232/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
     3233   function prototypes and stuff, but not '\xHH' hex character constants.
     3234   These don't provoke an error unfortunately, instead are silently treated
     3235   as 'x'.  The following induces an error, until -std is added to get
     3236   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
     3237   array size at least.  It's necessary to write '\x00'==0 to get something
     3238   that's true only with -std.  */
     3239int osf4_cc_array ['\x00' == 0 ? 1 : -1];
     3240
     3241/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
     3242   inside strings and character constants.  */
     3243#define FOO(x) 'x'
     3244int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
     3245
     3246int test (int i, double x);
     3247struct s1 {int (*f) (int a);};
     3248struct s2 {int (*f) (double a);};
     3249int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
     3250int argc;
     3251char **argv;
     3252int
     3253main ()
     3254{
     3255return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
     3256  ;
     3257  return 0;
     3258}
     3259_ACEOF
     3260for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
     3261        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
     3262do
     3263  CC="$ac_save_CC $ac_arg"
     3264  if ac_fn_c_try_compile "$LINENO"; then :
     3265  ac_cv_prog_cc_c89=$ac_arg
     3266fi
     3267rm -f core conftest.err conftest.$ac_objext
     3268  test "x$ac_cv_prog_cc_c89" != "xno" && break
     3269done
     3270rm -f conftest.$ac_ext
     3271CC=$ac_save_CC
     3272
     3273fi
     3274# AC_CACHE_VAL
     3275case "x$ac_cv_prog_cc_c89" in
     3276  x)
     3277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
     3278$as_echo "none needed" >&6; } ;;
     3279  xno)
     3280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
     3281$as_echo "unsupported" >&6; } ;;
     3282  *)
     3283    CC="$CC $ac_cv_prog_cc_c89"
     3284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
     3285$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
     3286esac
     3287if test "x$ac_cv_prog_cc_c89" != xno; then :
     3288
     3289fi
     3290
     3291ac_ext=c
     3292ac_cpp='$CPP $CPPFLAGS'
     3293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3295ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3296
     3297
     3298
     3299ac_ext=c
     3300ac_cpp='$CPP $CPPFLAGS'
     3301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3303ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
     3305$as_echo_n "checking how to run the C preprocessor... " >&6; }
     3306# On Suns, sometimes $CPP names a directory.
     3307if test -n "$CPP" && test -d "$CPP"; then
     3308  CPP=
     3309fi
     3310if test -z "$CPP"; then
     3311  if ${ac_cv_prog_CPP+:} false; then :
     3312  $as_echo_n "(cached) " >&6
     3313else
     3314      # Double quotes because CPP needs to be expanded
     3315    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
     3316    do
     3317      ac_preproc_ok=false
     3318for ac_c_preproc_warn_flag in '' yes
     3319do
     3320  # Use a header file that comes with gcc, so configuring glibc
     3321  # with a fresh cross-compiler works.
     3322  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     3323  # <limits.h> exists even on freestanding compilers.
     3324  # On the NeXT, cc -E runs the code through the compiler's parser,
     3325  # not just through cpp. "Syntax error" is here to catch this case.
     3326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3327/* end confdefs.h.  */
     3328#ifdef __STDC__
     3329# include <limits.h>
     3330#else
     3331# include <assert.h>
     3332#endif
     3333                     Syntax error
     3334_ACEOF
     3335if ac_fn_c_try_cpp "$LINENO"; then :
     3336
     3337else
     3338  # Broken: fails on valid input.
     3339continue
     3340fi
     3341rm -f conftest.err conftest.i conftest.$ac_ext
     3342
     3343  # OK, works on sane cases.  Now check whether nonexistent headers
     3344  # can be detected and how.
     3345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3346/* end confdefs.h.  */
     3347#include <ac_nonexistent.h>
     3348_ACEOF
     3349if ac_fn_c_try_cpp "$LINENO"; then :
     3350  # Broken: success on invalid input.
     3351continue
     3352else
     3353  # Passes both tests.
     3354ac_preproc_ok=:
     3355break
     3356fi
     3357rm -f conftest.err conftest.i conftest.$ac_ext
     3358
     3359done
     3360# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     3361rm -f conftest.i conftest.err conftest.$ac_ext
     3362if $ac_preproc_ok; then :
     3363  break
     3364fi
     3365
     3366    done
     3367    ac_cv_prog_CPP=$CPP
     3368
     3369fi
     3370  CPP=$ac_cv_prog_CPP
     3371else
     3372  ac_cv_prog_CPP=$CPP
     3373fi
     3374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
     3375$as_echo "$CPP" >&6; }
     3376ac_preproc_ok=false
     3377for ac_c_preproc_warn_flag in '' yes
     3378do
     3379  # Use a header file that comes with gcc, so configuring glibc
     3380  # with a fresh cross-compiler works.
     3381  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     3382  # <limits.h> exists even on freestanding compilers.
     3383  # On the NeXT, cc -E runs the code through the compiler's parser,
     3384  # not just through cpp. "Syntax error" is here to catch this case.
     3385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3386/* end confdefs.h.  */
     3387#ifdef __STDC__
     3388# include <limits.h>
     3389#else
     3390# include <assert.h>
     3391#endif
     3392                     Syntax error
     3393_ACEOF
     3394if ac_fn_c_try_cpp "$LINENO"; then :
     3395
     3396else
     3397  # Broken: fails on valid input.
     3398continue
     3399fi
     3400rm -f conftest.err conftest.i conftest.$ac_ext
     3401
     3402  # OK, works on sane cases.  Now check whether nonexistent headers
     3403  # can be detected and how.
     3404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3405/* end confdefs.h.  */
     3406#include <ac_nonexistent.h>
     3407_ACEOF
     3408if ac_fn_c_try_cpp "$LINENO"; then :
     3409  # Broken: success on invalid input.
     3410continue
     3411else
     3412  # Passes both tests.
     3413ac_preproc_ok=:
     3414break
     3415fi
     3416rm -f conftest.err conftest.i conftest.$ac_ext
     3417
     3418done
     3419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     3420rm -f conftest.i conftest.err conftest.$ac_ext
     3421if $ac_preproc_ok; then :
     3422
     3423else
     3424  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     3425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     3426as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
     3427See \`config.log' for more details" "$LINENO" 5; }
     3428fi
     3429
     3430ac_ext=c
     3431ac_cpp='$CPP $CPPFLAGS'
     3432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3434ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3435
     3436
     3437{ $as_echo "$as_me:${as_lineno-$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; }
     3439if ${ac_cv_path_GREP+:} false; then :
     3440  $as_echo_n "(cached) " >&6
     3441else
     3442  if test -z "$GREP"; then
     3443  ac_path_GREP_found=false
     3444  # Loop through the user's path and test for each of PROGNAME-LIST
     3445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
     3447do
     3448  IFS=$as_save_IFS
     3449  test -z "$as_dir" && as_dir=.
     3450    for ac_prog in grep ggrep; do
     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.
     3455  # Check for GNU $ac_path_GREP
     3456case `"$ac_path_GREP" --version 2>&1` in
     3457*GNU*)
     3458  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
     3459*)
     3460  ac_count=0
     3461  $as_echo_n 0123456789 >"conftest.in"
     3462  while :
     3463  do
     3464    cat "conftest.in" "conftest.in" >"conftest.tmp"
     3465    mv "conftest.tmp" "conftest.in"
     3466    cp "conftest.in" "conftest.nl"
     3467    $as_echo 'GREP' >> "conftest.nl"
     3468    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     3469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     3470    as_fn_arith $ac_count + 1 && ac_count=$as_val
     3471    if test $ac_count -gt ${ac_path_GREP_max-0}; then
     3472      # Best one so far, save it but keep looking for a better one
     3473      ac_cv_path_GREP="$ac_path_GREP"
     3474      ac_path_GREP_max=$ac_count
     3475    fi
     3476    # 10*(2^10) chars as input seems more than enough
     3477    test $ac_count -gt 10 && break
     3478  done
     3479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
     3480esac
     3481
     3482      $ac_path_GREP_found && break 3
     3483    done
     3484  done
     3485  done
     3486IFS=$as_save_IFS
     3487  if test -z "$ac_cv_path_GREP"; then
     3488    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
     3489  fi
     3490else
     3491  ac_cv_path_GREP=$GREP
     3492fi
     3493
     3494fi
     3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
     3496$as_echo "$ac_cv_path_GREP" >&6; }
     3497 GREP="$ac_cv_path_GREP"
     3498
     3499
     3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
     3501$as_echo_n "checking for egrep... " >&6; }
     3502if ${ac_cv_path_EGREP+:} false; then :
     3503  $as_echo_n "(cached) " >&6
     3504else
     3505  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
     3506   then ac_cv_path_EGREP="$GREP -E"
     3507   else
     3508     if test -z "$EGREP"; then
     3509  ac_path_EGREP_found=false
     3510  # Loop through the user's path and test for each of PROGNAME-LIST
     3511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3512for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
     3513do
     3514  IFS=$as_save_IFS
     3515  test -z "$as_dir" && as_dir=.
     3516    for ac_prog in egrep; do
     3517    for ac_exec_ext in '' $ac_executable_extensions; do
     3518      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
     3519      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
     3520# Check for GNU ac_path_EGREP and select it if it is found.
     3521  # Check for GNU $ac_path_EGREP
     3522case `"$ac_path_EGREP" --version 2>&1` in
     3523*GNU*)
     3524  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
     3525*)
     3526  ac_count=0
     3527  $as_echo_n 0123456789 >"conftest.in"
     3528  while :
     3529  do
     3530    cat "conftest.in" "conftest.in" >"conftest.tmp"
     3531    mv "conftest.tmp" "conftest.in"
     3532    cp "conftest.in" "conftest.nl"
     3533    $as_echo 'EGREP' >> "conftest.nl"
     3534    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     3535    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     3536    as_fn_arith $ac_count + 1 && ac_count=$as_val
     3537    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
     3538      # Best one so far, save it but keep looking for a better one
     3539      ac_cv_path_EGREP="$ac_path_EGREP"
     3540      ac_path_EGREP_max=$ac_count
     3541    fi
     3542    # 10*(2^10) chars as input seems more than enough
     3543    test $ac_count -gt 10 && break
     3544  done
     3545  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
     3546esac
     3547
     3548      $ac_path_EGREP_found && break 3
     3549    done
     3550  done
     3551  done
     3552IFS=$as_save_IFS
     3553  if test -z "$ac_cv_path_EGREP"; then
     3554    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
     3555  fi
     3556else
     3557  ac_cv_path_EGREP=$EGREP
     3558fi
     3559
     3560   fi
     3561fi
     3562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
     3563$as_echo "$ac_cv_path_EGREP" >&6; }
     3564 EGREP="$ac_cv_path_EGREP"
     3565
     3566
     3567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
     3568$as_echo_n "checking for ANSI C header files... " >&6; }
     3569if ${ac_cv_header_stdc+:} false; then :
     3570  $as_echo_n "(cached) " >&6
     3571else
     3572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3573/* end confdefs.h.  */
     3574#include <stdlib.h>
     3575#include <stdarg.h>
     3576#include <string.h>
     3577#include <float.h>
     3578
     3579int
     3580main ()
     3581{
     3582
     3583  ;
     3584  return 0;
     3585}
     3586_ACEOF
     3587if ac_fn_c_try_compile "$LINENO"; then :
     3588  ac_cv_header_stdc=yes
     3589else
     3590  ac_cv_header_stdc=no
     3591fi
     3592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3593
     3594if test $ac_cv_header_stdc = yes; then
     3595  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
     3596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3597/* end confdefs.h.  */
     3598#include <string.h>
     3599
     3600_ACEOF
     3601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     3602  $EGREP "memchr" >/dev/null 2>&1; then :
     3603
     3604else
     3605  ac_cv_header_stdc=no
     3606fi
     3607rm -f conftest*
     3608
     3609fi
     3610
     3611if test $ac_cv_header_stdc = yes; then
     3612  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
     3613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3614/* end confdefs.h.  */
     3615#include <stdlib.h>
     3616
     3617_ACEOF
     3618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     3619  $EGREP "free" >/dev/null 2>&1; then :
     3620
     3621else
     3622  ac_cv_header_stdc=no
     3623fi
     3624rm -f conftest*
     3625
     3626fi
     3627
     3628if test $ac_cv_header_stdc = yes; then
     3629  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
     3630  if test "$cross_compiling" = yes; then :
     3631  :
     3632else
     3633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3634/* end confdefs.h.  */
     3635#include <ctype.h>
     3636#include <stdlib.h>
     3637#if ((' ' & 0x0FF) == 0x020)
     3638# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     3639# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
     3640#else
     3641# define ISLOWER(c) \
     3642                   (('a' <= (c) && (c) <= 'i') \
     3643                     || ('j' <= (c) && (c) <= 'r') \
     3644                     || ('s' <= (c) && (c) <= 'z'))
     3645# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
     3646#endif
     3647
     3648#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
     3649int
     3650main ()
     3651{
     3652  int i;
     3653  for (i = 0; i < 256; i++)
     3654    if (XOR (islower (i), ISLOWER (i))
     3655        || toupper (i) != TOUPPER (i))
     3656      return 2;
     3657  return 0;
     3658}
     3659_ACEOF
     3660if ac_fn_c_try_run "$LINENO"; then :
     3661
     3662else
     3663  ac_cv_header_stdc=no
     3664fi
     3665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
     3666  conftest.$ac_objext conftest.beam conftest.$ac_ext
     3667fi
     3668
     3669fi
     3670fi
     3671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
     3672$as_echo "$ac_cv_header_stdc" >&6; }
     3673if test $ac_cv_header_stdc = yes; then
     3674
     3675$as_echo "#define STDC_HEADERS 1" >>confdefs.h
     3676
     3677fi
     3678
     3679# On IRIX 5.3, sys/types and inttypes.h are conflicting.
     3680for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
     3681                  inttypes.h stdint.h unistd.h
     3682do :
     3683  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     3684ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
     3685"
     3686if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
     3687  cat >>confdefs.h <<_ACEOF
     3688#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     3689_ACEOF
     3690
     3691fi
     3692
     3693done
     3694
     3695
     3696
     3697
     3698    # Step 0.a: Enable 64 bit support?
     3699
     3700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
     3701$as_echo_n "checking if 64bit support is requested... " >&6; }
     3702    # Check whether --enable-64bit was given.
     3703if test "${enable_64bit+set}" = set; then :
     3704  enableval=$enable_64bit; do64bit=$enableval
     3705else
     3706  do64bit=no
     3707fi
     3708
     3709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
     3710$as_echo "$do64bit" >&6; }
     3711
     3712    # Step 0.b: Enable Solaris 64 bit VIS support?
     3713
     3714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
     3715$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
     3716    # Check whether --enable-64bit-vis was given.
     3717if test "${enable_64bit_vis+set}" = set; then :
     3718  enableval=$enable_64bit_vis; do64bitVIS=$enableval
     3719else
     3720  do64bitVIS=no
     3721fi
     3722
     3723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
     3724$as_echo "$do64bitVIS" >&6; }
     3725
     3726    if test "$do64bitVIS" = "yes"; then
     3727        # Force 64bit on with VIS
     3728        do64bit=yes
     3729    fi
     3730
     3731    # Step 1: set the variable "system" to hold the name and version number
     3732    # for the system.
     3733
     3734
     3735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
     3736$as_echo_n "checking system version... " >&6; }
     3737if ${tcl_cv_sys_version+:} false; then :
     3738  $as_echo_n "(cached) " >&6
     3739else
     3740
     3741        if test -f /usr/lib/NextStep/software_version; then
     3742            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
     3743        else
     3744            tcl_cv_sys_version=`uname -s`-`uname -r`
     3745            if test "$?" -ne 0 ; then
     3746                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
     3747$as_echo "$as_me: WARNING: can't find uname command" >&2;}
     3748                tcl_cv_sys_version=unknown
     3749            else
     3750                # Special check for weird MP-RAS system (uname returns weird
     3751                # results, and the version is kept in special file).
     3752
     3753                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
     3754                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
     3755                fi
     3756                if test "`uname -s`" = "AIX" ; then
     3757                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
     3758                fi
     3759            fi
     3760        fi
     3761
     3762fi
     3763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
     3764$as_echo "$tcl_cv_sys_version" >&6; }
     3765    system=$tcl_cv_sys_version
     3766
     3767
     3768    # Step 2: check for existence of -ldl library.  This is needed because
     3769    # Linux can use either -ldl or -ldld for dynamic loading.
     3770
     3771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
     3772$as_echo_n "checking for dlopen in -ldl... " >&6; }
     3773if ${ac_cv_lib_dl_dlopen+:} false; then :
     3774  $as_echo_n "(cached) " >&6
     3775else
     3776  ac_check_lib_save_LIBS=$LIBS
     3777LIBS="-ldl  $LIBS"
     3778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3779/* end confdefs.h.  */
     3780
     3781/* Override any GCC internal prototype to avoid an error.
     3782   Use char because int might match the return type of a GCC
     3783   builtin and then its argument prototype would still apply.  */
     3784#ifdef __cplusplus
     3785extern "C"
     3786#endif
     3787char dlopen ();
     3788int
     3789main ()
     3790{
     3791return dlopen ();
     3792  ;
     3793  return 0;
     3794}
     3795_ACEOF
     3796if ac_fn_c_try_link "$LINENO"; then :
     3797  ac_cv_lib_dl_dlopen=yes
     3798else
     3799  ac_cv_lib_dl_dlopen=no
     3800fi
     3801rm -f core conftest.err conftest.$ac_objext \
     3802    conftest$ac_exeext conftest.$ac_ext
     3803LIBS=$ac_check_lib_save_LIBS
     3804fi
     3805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
     3806$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
     3807if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
     3808  have_dl=yes
     3809else
     3810  have_dl=no
     3811fi
     3812
     3813
     3814    # Require ranlib early so we can override it in special cases below.
     3815
     3816
     3817
     3818    # Step 3: set configuration options based on system name and version.
     3819
     3820    do64bit_ok=no
     3821    LDFLAGS_ORIG="$LDFLAGS"
     3822    TCL_EXPORT_FILE_SUFFIX=""
     3823    UNSHARED_LIB_SUFFIX=""
     3824    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
     3825    ECHO_VERSION='`echo ${VERSION}`'
     3826    TCL_LIB_VERSIONS_OK=ok
     3827    CFLAGS_DEBUG=-g
     3828    CFLAGS_OPTIMIZE=-O
     3829    if test "$GCC" = "yes" ; then
     3830        CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
     3831    else
     3832        CFLAGS_WARNING=""
     3833    fi
     3834    TCL_NEEDS_EXP_FILE=0
     3835    TCL_BUILD_EXP_FILE=""
     3836    TCL_EXP_FILE=""
     3837    # Extract the first word of "ar", so it can be a program name with args.
     3838set dummy ar; ac_word=$2
     3839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3840$as_echo_n "checking for $ac_word... " >&6; }
     3841if ${ac_cv_prog_AR+:} false; then :
     3842  $as_echo_n "(cached) " >&6
     3843else
     3844  if test -n "$AR"; then
     3845  ac_cv_prog_AR="$AR" # Let the user override the test.
     3846else
     3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3848for as_dir in $PATH
     3849do
     3850  IFS=$as_save_IFS
     3851  test -z "$as_dir" && as_dir=.
     3852    for ac_exec_ext in '' $ac_executable_extensions; do
     3853  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     3854    ac_cv_prog_AR="ar"
     3855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3856    break 2
     3857  fi
     3858done
     3859  done
     3860IFS=$as_save_IFS
     3861
     3862fi
     3863fi
     3864AR=$ac_cv_prog_AR
     3865if test -n "$AR"; then
     3866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
     3867$as_echo "$AR" >&6; }
     3868else
     3869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3870$as_echo "no" >&6; }
     3871fi
     3872
     3873
     3874    if test "${AR}" = "" ; then
     3875        as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
     3876    fi
     3877    STLIB_LD='${AR} cr'
     3878    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     3879    PLAT_OBJS=""
     3880    PLAT_SRCS=""
     3881    case $system in
     3882        AIX-*)
     3883            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
     3884                # AIX requires the _r compiler when gcc isn't being used
     3885                case "${CC}" in
     3886                    *_r)
     3887                        # ok ...
     3888                        ;;
     3889                    *)
     3890                        CC=${CC}_r
     3891                        ;;
     3892                esac
     3893                { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
     3894$as_echo "Using $CC for compiling with threads" >&6; }
     3895            fi
     3896            LIBS="$LIBS -lc"
     3897            SHLIB_CFLAGS=""
     3898            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     3899            # symbols when dynamically loaded into tclsh.
     3900            SHLIB_LD_LIBS='${LIBS}'
     3901            SHLIB_SUFFIX=".so"
     3902
     3903            DL_OBJS="tclLoadDl.o"
     3904            LD_LIBRARY_PATH_VAR="LIBPATH"
     3905
     3906            # Check to enable 64-bit flags for compiler/linker on AIX 4+
     3907            if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
     3908                if test "$GCC" = "yes" ; then
     3909                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
     3910$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     3911                else
     3912                    do64bit_ok=yes
     3913                    CFLAGS="$CFLAGS -q64"
     3914                    LDFLAGS="$LDFLAGS -q64"
     3915                    RANLIB="${RANLIB} -X64"
     3916                    AR="${AR} -X64"
     3917                    SHLIB_LD_FLAGS="-b64"
     3918                fi
     3919            fi
     3920
     3921            if test "`uname -m`" = "ia64" ; then
     3922                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
     3923                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     3924                # AIX-5 has dl* in libc.so
     3925                DL_LIBS=""
     3926                if test "$GCC" = "yes" ; then
     3927                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     3928                else
     3929                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
     3930                fi
     3931                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     3932            else
     3933                if test "$GCC" = "yes" ; then
     3934                    SHLIB_LD="gcc -shared"
     3935                else
     3936                    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
     3937                fi
     3938                SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
     3939                DL_LIBS="-ldl"
     3940                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     3941                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     3942                TCL_NEEDS_EXP_FILE=1
     3943                TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
     3944            fi
     3945
     3946            # AIX v<=4.1 has some different flags than 4.2+
     3947            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
     3948                LIBOBJS="$LIBOBJS tclLoadAix.o"
     3949                DL_LIBS="-lld"
     3950            fi
     3951
     3952            # On AIX <=v4 systems, libbsd.a has to be linked in to support
     3953            # non-blocking file IO.  This library has to be linked in after
     3954            # the MATH_LIBS or it breaks the pow() function.  The way to
     3955            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
     3956            # This library also supplies gettimeofday.
     3957            #
     3958            # AIX does not have a timezone field in struct tm. When the AIX
     3959            # bsd library is used, the timezone global and the gettimeofday
     3960            # methods are to be avoided for timezone deduction instead, we
     3961            # deduce the timezone by comparing the localtime result on a
     3962            # known GMT value.
     3963
     3964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5
     3965$as_echo_n "checking for gettimeofday in -lbsd... " >&6; }
     3966if ${ac_cv_lib_bsd_gettimeofday+:} false; then :
     3967  $as_echo_n "(cached) " >&6
     3968else
     3969  ac_check_lib_save_LIBS=$LIBS
     3970LIBS="-lbsd  $LIBS"
     3971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     3972/* end confdefs.h.  */
     3973
     3974/* Override any GCC internal prototype to avoid an error.
     3975   Use char because int might match the return type of a GCC
     3976   builtin and then its argument prototype would still apply.  */
     3977#ifdef __cplusplus
     3978extern "C"
     3979#endif
     3980char gettimeofday ();
     3981int
     3982main ()
     3983{
     3984return gettimeofday ();
     3985  ;
     3986  return 0;
     3987}
     3988_ACEOF
     3989if ac_fn_c_try_link "$LINENO"; then :
     3990  ac_cv_lib_bsd_gettimeofday=yes
     3991else
     3992  ac_cv_lib_bsd_gettimeofday=no
     3993fi
     3994rm -f core conftest.err conftest.$ac_objext \
     3995    conftest$ac_exeext conftest.$ac_ext
     3996LIBS=$ac_check_lib_save_LIBS
     3997fi
     3998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5
     3999$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; }
     4000if test "x$ac_cv_lib_bsd_gettimeofday" = xyes; then :
     4001  libbsd=yes
     4002else
     4003  libbsd=no
     4004fi
     4005
     4006            if test $libbsd = yes; then
     4007                MATH_LIBS="$MATH_LIBS -lbsd"
     4008                $as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h
     4009
     4010            fi
     4011            ;;
     4012        BeOS*)
     4013            SHLIB_CFLAGS="-fPIC"
     4014            SHLIB_LD="${CC} -nostart"
     4015            SHLIB_LD_LIBS='${LIBS}'
     4016            SHLIB_SUFFIX=".so"
     4017            DL_OBJS="tclLoadDl.o"
     4018            DL_LIBS="-ldl"
     4019
     4020            #-----------------------------------------------------------
     4021            # Check for inet_ntoa in -lbind, for BeOS (which also needs
     4022            # -lsocket, even if the network functions are in -lnet which
     4023            # is always linked to, for compatibility.
     4024            #-----------------------------------------------------------
     4025            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
     4026$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
     4027if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
     4028  $as_echo_n "(cached) " >&6
     4029else
     4030  ac_check_lib_save_LIBS=$LIBS
     4031LIBS="-lbind  $LIBS"
     4032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4033/* end confdefs.h.  */
     4034
     4035/* Override any GCC internal prototype to avoid an error.
     4036   Use char because int might match the return type of a GCC
     4037   builtin and then its argument prototype would still apply.  */
     4038#ifdef __cplusplus
     4039extern "C"
     4040#endif
     4041char inet_ntoa ();
     4042int
     4043main ()
     4044{
     4045return inet_ntoa ();
     4046  ;
     4047  return 0;
     4048}
     4049_ACEOF
     4050if ac_fn_c_try_link "$LINENO"; then :
     4051  ac_cv_lib_bind_inet_ntoa=yes
     4052else
     4053  ac_cv_lib_bind_inet_ntoa=no
     4054fi
     4055rm -f core conftest.err conftest.$ac_objext \
     4056    conftest$ac_exeext conftest.$ac_ext
     4057LIBS=$ac_check_lib_save_LIBS
     4058fi
     4059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
     4060$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
     4061if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
     4062  LIBS="$LIBS -lbind -lsocket"
     4063fi
     4064
     4065            ;;
     4066        BSD/OS-2.1*|BSD/OS-3*)
     4067            SHLIB_CFLAGS=""
     4068            SHLIB_LD="shlicc -r"
     4069            SHLIB_LD_LIBS='${LIBS}'
     4070            SHLIB_SUFFIX=".so"
     4071            DL_OBJS="tclLoadDl.o"
     4072            DL_LIBS="-ldl"
     4073            CC_SEARCH_FLAGS=""
     4074            LD_SEARCH_FLAGS=""
     4075            ;;
     4076        BSD/OS-4.*)
     4077            SHLIB_CFLAGS="-export-dynamic -fPIC"
     4078            SHLIB_LD="cc -shared"
     4079            SHLIB_LD_LIBS='${LIBS}'
     4080            SHLIB_SUFFIX=".so"
     4081            DL_OBJS="tclLoadDl.o"
     4082            DL_LIBS="-ldl"
     4083            LDFLAGS="$LDFLAGS -export-dynamic"
     4084            CC_SEARCH_FLAGS=""
     4085            LD_SEARCH_FLAGS=""
     4086            ;;
     4087        dgux*)
     4088            SHLIB_CFLAGS="-K PIC"
     4089            SHLIB_LD="cc -G"
     4090            SHLIB_LD_LIBS=""
     4091            SHLIB_SUFFIX=".so"
     4092            DL_OBJS="tclLoadDl.o"
     4093            DL_LIBS="-ldl"
     4094            CC_SEARCH_FLAGS=""
     4095            LD_SEARCH_FLAGS=""
     4096            ;;
     4097        HP-UX-*.11.*)
     4098            # Use updated header definitions where possible
     4099            $as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h
     4100          # Use the XOPEN network library
     4101            $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
     4102 # Use the XOPEN network library
     4103            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
     4104
     4105            if test "`uname -m`" = "ia64" ; then
     4106                SHLIB_SUFFIX=".so"
     4107            else
     4108                SHLIB_SUFFIX=".sl"
     4109            fi
     4110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
     4111$as_echo_n "checking for shl_load in -ldld... " >&6; }
     4112if ${ac_cv_lib_dld_shl_load+:} false; then :
     4113  $as_echo_n "(cached) " >&6
     4114else
     4115  ac_check_lib_save_LIBS=$LIBS
     4116LIBS="-ldld  $LIBS"
     4117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4118/* end confdefs.h.  */
     4119
     4120/* Override any GCC internal prototype to avoid an error.
     4121   Use char because int might match the return type of a GCC
     4122   builtin and then its argument prototype would still apply.  */
     4123#ifdef __cplusplus
     4124extern "C"
     4125#endif
     4126char shl_load ();
     4127int
     4128main ()
     4129{
     4130return shl_load ();
     4131  ;
     4132  return 0;
     4133}
     4134_ACEOF
     4135if ac_fn_c_try_link "$LINENO"; then :
     4136  ac_cv_lib_dld_shl_load=yes
     4137else
     4138  ac_cv_lib_dld_shl_load=no
     4139fi
     4140rm -f core conftest.err conftest.$ac_objext \
     4141    conftest$ac_exeext conftest.$ac_ext
     4142LIBS=$ac_check_lib_save_LIBS
     4143fi
     4144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
     4145$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
     4146if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
     4147  tcl_ok=yes
     4148else
     4149  tcl_ok=no
     4150fi
     4151
     4152            if test "$tcl_ok" = yes; then
     4153                SHLIB_CFLAGS="+z"
     4154                SHLIB_LD="ld -b"
     4155                SHLIB_LD_LIBS='${LIBS}'
     4156                DL_OBJS="tclLoadShl.o"
     4157                DL_LIBS="-ldld"
     4158                LDFLAGS="$LDFLAGS -Wl,-E"
     4159                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     4160                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     4161                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     4162            fi
     4163            if test "$GCC" = "yes" ; then
     4164                SHLIB_LD="gcc -shared"
     4165                SHLIB_LD_LIBS='${LIBS}'
     4166                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4167            fi
     4168
     4169            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
     4170            #CFLAGS="$CFLAGS +DAportable"
     4171
     4172            # Check to enable 64-bit flags for compiler/linker
     4173            if test "$do64bit" = "yes" ; then
     4174                if test "$GCC" = "yes" ; then
     4175                    hpux_arch=`${CC} -dumpmachine`
     4176                    case $hpux_arch in
     4177                        hppa64*)
     4178                            # 64-bit gcc in use.  Fix flags for GNU ld.
     4179                            do64bit_ok=yes
     4180                            SHLIB_LD="${CC} -shared"
     4181                            SHLIB_LD_LIBS='${LIBS}'
     4182                            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4183                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4184                            ;;
     4185                        *)
     4186                            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
     4187$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     4188                            ;;
     4189                    esac
     4190                else
     4191                    do64bit_ok=yes
     4192                    CFLAGS="$CFLAGS +DD64"
     4193                    LDFLAGS="$LDFLAGS +DD64"
     4194                fi
     4195            fi
     4196            ;;
     4197        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
     4198            SHLIB_SUFFIX=".sl"
     4199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
     4200$as_echo_n "checking for shl_load in -ldld... " >&6; }
     4201if ${ac_cv_lib_dld_shl_load+:} false; then :
     4202  $as_echo_n "(cached) " >&6
     4203else
     4204  ac_check_lib_save_LIBS=$LIBS
     4205LIBS="-ldld  $LIBS"
     4206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4207/* end confdefs.h.  */
     4208
     4209/* Override any GCC internal prototype to avoid an error.
     4210   Use char because int might match the return type of a GCC
     4211   builtin and then its argument prototype would still apply.  */
     4212#ifdef __cplusplus
     4213extern "C"
     4214#endif
     4215char shl_load ();
     4216int
     4217main ()
     4218{
     4219return shl_load ();
     4220  ;
     4221  return 0;
     4222}
     4223_ACEOF
     4224if ac_fn_c_try_link "$LINENO"; then :
     4225  ac_cv_lib_dld_shl_load=yes
     4226else
     4227  ac_cv_lib_dld_shl_load=no
     4228fi
     4229rm -f core conftest.err conftest.$ac_objext \
     4230    conftest$ac_exeext conftest.$ac_ext
     4231LIBS=$ac_check_lib_save_LIBS
     4232fi
     4233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
     4234$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
     4235if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
     4236  tcl_ok=yes
     4237else
     4238  tcl_ok=no
     4239fi
     4240
     4241            if test "$tcl_ok" = yes; then
     4242                SHLIB_CFLAGS="+z"
     4243                SHLIB_LD="ld -b"
     4244                SHLIB_LD_LIBS=""
     4245                DL_OBJS="tclLoadShl.o"
     4246                DL_LIBS="-ldld"
     4247                LDFLAGS="$LDFLAGS -Wl,-E"
     4248                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     4249                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     4250                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     4251            fi
     4252            ;;
     4253        IRIX-4.*)
     4254            SHLIB_CFLAGS="-G 0"
     4255            SHLIB_SUFFIX=".a"
     4256            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     4257            SHLIB_LD_LIBS='${LIBS}'
     4258            DL_OBJS="tclLoadAout.o"
     4259            DL_LIBS=""
     4260            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     4261            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     4262            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4263            SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     4264            ;;
     4265        IRIX-5.*)
     4266            SHLIB_CFLAGS=""
     4267            SHLIB_LD="ld -shared -rdata_shared"
     4268            SHLIB_LD_LIBS='${LIBS}'
     4269            SHLIB_SUFFIX=".so"
     4270            DL_OBJS="tclLoadDl.o"
     4271            DL_LIBS=""
     4272            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4273            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4274            ;;
     4275        IRIX-6.*)
     4276            SHLIB_CFLAGS=""
     4277            SHLIB_LD="ld -n32 -shared -rdata_shared"
     4278            SHLIB_LD_LIBS='${LIBS}'
     4279            SHLIB_SUFFIX=".so"
     4280            DL_OBJS="tclLoadDl.o"
     4281            DL_LIBS=""
     4282            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4283            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4284            if test "$GCC" = "yes" ; then
     4285                CFLAGS="$CFLAGS -mabi=n32"
     4286                LDFLAGS="$LDFLAGS -mabi=n32"
     4287            else
     4288                case $system in
     4289                    IRIX-6.3)
     4290                        # Use to build 6.2 compatible binaries on 6.3.
     4291                        CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
     4292                        ;;
     4293                    *)
     4294                        CFLAGS="$CFLAGS -n32"
     4295                        ;;
     4296                esac
     4297                LDFLAGS="$LDFLAGS -n32"
     4298            fi
     4299            ;;
     4300        IRIX64-6.*)
     4301            SHLIB_CFLAGS=""
     4302            SHLIB_LD="ld -n32 -shared -rdata_shared"
     4303            SHLIB_LD_LIBS='${LIBS}'
     4304            SHLIB_SUFFIX=".so"
     4305            DL_OBJS="tclLoadDl.o"
     4306            DL_LIBS=""
     4307            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4308            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4309
     4310            # Check to enable 64-bit flags for compiler/linker
     4311
     4312            if test "$do64bit" = "yes" ; then
     4313                if test "$GCC" = "yes" ; then
     4314                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
     4315$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
     4316                else
     4317                    do64bit_ok=yes
     4318                    SHLIB_LD="ld -64 -shared -rdata_shared"
     4319                    CFLAGS="$CFLAGS -64"
     4320                    LDFLAGS="$LDFLAGS -64"
     4321                fi
     4322            fi
     4323            ;;
     4324        Linux*)
     4325            SHLIB_CFLAGS="-fPIC"
     4326            SHLIB_LD_LIBS='${LIBS}'
     4327            SHLIB_SUFFIX=".so"
     4328
     4329            CFLAGS_OPTIMIZE=-O2
     4330            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
     4331            # when you inline the string and math operations.  Turn this off to
     4332            # get rid of the warnings.
     4333            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
     4334
     4335            if test "$have_dl" = yes; then
     4336                SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
     4337                DL_OBJS="tclLoadDl.o"
     4338                DL_LIBS="-ldl"
     4339                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     4340                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4341                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4342            else
     4343                ac_fn_c_check_header_mongrel "$LINENO" "dld.h" "ac_cv_header_dld_h" "$ac_includes_default"
     4344if test "x$ac_cv_header_dld_h" = xyes; then :
     4345
     4346                    SHLIB_LD="ld -shared"
     4347                    DL_OBJS="tclLoadDld.o"
     4348                    DL_LIBS="-ldld"
     4349                    CC_SEARCH_FLAGS=""
     4350                    LD_SEARCH_FLAGS=""
     4351fi
     4352
     4353
     4354            fi
     4355            if test "`uname -m`" = "alpha" ; then
     4356                CFLAGS="$CFLAGS -mieee"
     4357            fi
     4358            if test $do64bit = yes; then
     4359                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
     4360$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
     4361if ${tcl_cv_cc_m64+:} false; then :
     4362  $as_echo_n "(cached) " >&6
     4363else
     4364
     4365                    hold_cflags=$CFLAGS
     4366                    CFLAGS="$CFLAGS -m64"
     4367                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4368/* end confdefs.h.  */
     4369
     4370int
     4371main ()
     4372{
     4373
     4374  ;
     4375  return 0;
     4376}
     4377_ACEOF
     4378if ac_fn_c_try_link "$LINENO"; then :
     4379  tcl_cv_cc_m64=yes
     4380else
     4381  tcl_cv_cc_m64=no
     4382fi
     4383rm -f core conftest.err conftest.$ac_objext \
     4384    conftest$ac_exeext conftest.$ac_ext
     4385                    CFLAGS=$hold_cflags
     4386fi
     4387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
     4388$as_echo "$tcl_cv_cc_m64" >&6; }
     4389                if test $tcl_cv_cc_m64 = yes; then
     4390                    CFLAGS="$CFLAGS -m64"
     4391                    do64bit_ok=yes
     4392                fi
     4393            fi
     4394
     4395            # The combo of gcc + glibc has a bug related
     4396            # to inlining of functions like strtod(). The
     4397            # -fno-builtin flag should address this problem
     4398            # but it does not work. The -fno-inline flag
     4399            # is kind of overkill but it works.
     4400            # Disable inlining only when one of the
     4401            # files in compat/*.c is being linked in.
     4402            if test x"${LIBOBJS}" != x ; then
     4403                CFLAGS="$CFLAGS -fno-inline"
     4404            fi
     4405
     4406            # XIM peeking works under XFree86.
     4407            $as_echo "#define PEEK_XCLOSEIM 1" >>confdefs.h
     4408
     4409
     4410            ;;
     4411        GNU*)
     4412            SHLIB_CFLAGS="-fPIC"
     4413            SHLIB_LD_LIBS='${LIBS}'
     4414            SHLIB_SUFFIX=".so"
     4415
     4416            if test "$have_dl" = yes; then
     4417                SHLIB_LD="${CC} -shared"
     4418                DL_OBJS=""
     4419                DL_LIBS="-ldl"
     4420                LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     4421                CC_SEARCH_FLAGS=""
     4422                LD_SEARCH_FLAGS=""
     4423            else
     4424                ac_fn_c_check_header_mongrel "$LINENO" "dld.h" "ac_cv_header_dld_h" "$ac_includes_default"
     4425if test "x$ac_cv_header_dld_h" = xyes; then :
     4426
     4427                    SHLIB_LD="ld -shared"
     4428                    DL_OBJS=""
     4429                    DL_LIBS="-ldld"
     4430                    CC_SEARCH_FLAGS=""
     4431                    LD_SEARCH_FLAGS=""
     4432fi
     4433
     4434
     4435            fi
     4436            if test "`uname -m`" = "alpha" ; then
     4437                CFLAGS="$CFLAGS -mieee"
     4438            fi
     4439            ;;
     4440        Lynx*)
     4441            SHLIB_CFLAGS="-fPIC"
     4442            SHLIB_LD_LIBS='${LIBS}'
     4443            SHLIB_SUFFIX=".so"
     4444            CFLAGS_OPTIMIZE=-02
     4445            SHLIB_LD="${CC} -shared "
     4446            DL_OBJS="tclLoadDl.o"
     4447            DL_LIBS="-mshared -ldl"
     4448            LD_FLAGS="-Wl,--export-dynamic"
     4449            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4450            LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4451            ;;
     4452        MP-RAS-02*)
     4453            SHLIB_CFLAGS="-K PIC"
     4454            SHLIB_LD="cc -G"
     4455            SHLIB_LD_LIBS=""
     4456            SHLIB_SUFFIX=".so"
     4457            DL_OBJS="tclLoadDl.o"
     4458            DL_LIBS="-ldl"
     4459            CC_SEARCH_FLAGS=""
     4460            LD_SEARCH_FLAGS=""
     4461            ;;
     4462        MP-RAS-*)
     4463            SHLIB_CFLAGS="-K PIC"
     4464            SHLIB_LD="cc -G"
     4465            SHLIB_LD_LIBS=""
     4466            SHLIB_SUFFIX=".so"
     4467            DL_OBJS="tclLoadDl.o"
     4468            DL_LIBS="-ldl"
     4469            LDFLAGS="$LDFLAGS -Wl,-Bexport"
     4470            CC_SEARCH_FLAGS=""
     4471            LD_SEARCH_FLAGS=""
     4472            ;;
     4473        NetBSD-*|FreeBSD-[1-2].*)
     4474            # Not available on all versions:  check for include file.
     4475            ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
     4476if test "x$ac_cv_header_dlfcn_h" = xyes; then :
     4477
     4478                # NetBSD/SPARC needs -fPIC, -fpic will not do.
     4479                SHLIB_CFLAGS="-fPIC"
     4480                SHLIB_LD="ld -Bshareable -x"
     4481                SHLIB_LD_LIBS='${LIBS}'
     4482                SHLIB_SUFFIX=".so"
     4483                DL_OBJS="tclLoadDl.o"
     4484                DL_LIBS=""
     4485                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4486                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4487                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
     4488$as_echo_n "checking for ELF... " >&6; }
     4489if ${tcl_cv_ld_elf+:} false; then :
     4490  $as_echo_n "(cached) " >&6
     4491else
     4492
     4493                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4494/* end confdefs.h.  */
     4495
     4496#ifdef __ELF__
     4497        yes
     4498#endif
     4499
     4500_ACEOF
     4501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     4502  $EGREP "yes" >/dev/null 2>&1; then :
     4503  tcl_cv_ld_elf=yes
     4504else
     4505  tcl_cv_ld_elf=no
     4506fi
     4507rm -f conftest*
     4508
     4509fi
     4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
     4511$as_echo "$tcl_cv_ld_elf" >&6; }
     4512                if test $tcl_cv_ld_elf = yes; then
     4513                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     4514                else
     4515                    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     4516                fi
     4517
     4518else
     4519
     4520                SHLIB_CFLAGS=""
     4521                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     4522                SHLIB_LD_LIBS='${LIBS}'
     4523                SHLIB_SUFFIX=".a"
     4524                DL_OBJS="tclLoadAout.o"
     4525                DL_LIBS=""
     4526                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     4527                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4528                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     4529
     4530fi
     4531
     4532
     4533
     4534            # FreeBSD doesn't handle version numbers with dots.
     4535
     4536            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     4537            TCL_LIB_VERSIONS_OK=nodots
     4538            ;;
     4539        OpenBSD-*)
     4540            case `arch -s` in
     4541            m88k|vax)
     4542                SHLIB_CFLAGS=""
     4543                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
     4544                SHLIB_LD_LIBS='${LIBS}'
     4545                SHLIB_SUFFIX=".a"
     4546                DL_OBJS="tclLoadAout.o"
     4547                DL_LIBS=""
     4548                LDFLAGS=""
     4549                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     4550                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4551                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     4552                ;;
     4553            *)
     4554                # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
     4555                case `machine` in
     4556                sparc|sparc64)
     4557                    SHLIB_CFLAGS="-fPIC";;
     4558                *)
     4559                    SHLIB_CFLAGS="-fpic";;
     4560                esac
     4561                SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
     4562                SHLIB_LD_LIBS='${LIBS}'
     4563                SHLIB_SUFFIX=".so"
     4564                DL_OBJS="tclLoadDl.o"
     4565                DL_LIBS=""
     4566                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4567                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     4568                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     4569                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
     4570$as_echo_n "checking for ELF... " >&6; }
     4571if ${tcl_cv_ld_elf+:} false; then :
     4572  $as_echo_n "(cached) " >&6
     4573else
     4574
     4575                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4576/* end confdefs.h.  */
     4577
     4578#ifdef __ELF__
     4579        yes
     4580#endif
     4581
     4582_ACEOF
     4583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     4584  $EGREP "yes" >/dev/null 2>&1; then :
     4585  tcl_cv_ld_elf=yes
     4586else
     4587  tcl_cv_ld_elf=no
     4588fi
     4589rm -f conftest*
     4590
     4591fi
     4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
     4593$as_echo "$tcl_cv_ld_elf" >&6; }
     4594                if test $tcl_cv_ld_elf = yes; then
     4595                    LDFLAGS=-Wl,-export-dynamic
     4596                else
     4597                    LDFLAGS=""
     4598                fi
     4599                ;;
     4600            esac
     4601
     4602            # OpenBSD doesn't do version numbers with dots.
     4603            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     4604            TCL_LIB_VERSIONS_OK=nodots
     4605            ;;
     4606        FreeBSD-*)
     4607            # FreeBSD 3.* and greater have ELF.
     4608            SHLIB_CFLAGS="-fPIC"
     4609            SHLIB_LD="ld -Bshareable -x"
     4610            SHLIB_LD_LIBS='${LIBS}'
     4611            SHLIB_SUFFIX=".so"
     4612            DL_OBJS="tclLoadDl.o"
     4613            DL_LIBS=""
     4614            LDFLAGS="$LDFLAGS -export-dynamic"
     4615            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4616            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4617            if test "${TCL_THREADS}" = "1" ; then
     4618                # The -pthread needs to go in the CFLAGS, not LIBS
     4619                LIBS=`echo $LIBS | sed s/-pthread//`
     4620                CFLAGS="$CFLAGS -pthread"
     4621                LDFLAGS="$LDFLAGS -pthread"
     4622            fi
     4623            case $system in
     4624            FreeBSD-3.*)
     4625                # FreeBSD-3 doesn't handle version numbers with dots.
     4626                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     4627                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
     4628                TCL_LIB_VERSIONS_OK=nodots
     4629                ;;
     4630            esac
     4631            ;;
     4632        Darwin-*)
     4633            CFLAGS_OPTIMIZE="-Os"
     4634            SHLIB_CFLAGS="-fno-common"
     4635            # To avoid discrepancies between what headers configure sees during
     4636            # preprocessing tests and compiling tests, move any -isysroot and
     4637            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
     4638            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
     4639                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     4640                if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
     4641            CFLAGS="`echo " ${CFLAGS}" | \
     4642                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
     4643                if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
     4644            if test $do64bit = yes; then
     4645                case `arch` in
     4646                    ppc)
     4647                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
     4648$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
     4649if ${tcl_cv_cc_arch_ppc64+:} false; then :
     4650  $as_echo_n "(cached) " >&6
     4651else
     4652
     4653                            hold_cflags=$CFLAGS
     4654                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     4655                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4656/* end confdefs.h.  */
     4657
     4658int
     4659main ()
     4660{
     4661
     4662  ;
     4663  return 0;
     4664}
     4665_ACEOF
     4666if ac_fn_c_try_link "$LINENO"; then :
     4667  tcl_cv_cc_arch_ppc64=yes
     4668else
     4669  tcl_cv_cc_arch_ppc64=no
     4670fi
     4671rm -f core conftest.err conftest.$ac_objext \
     4672    conftest$ac_exeext conftest.$ac_ext
     4673                            CFLAGS=$hold_cflags
     4674fi
     4675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
     4676$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
     4677                        if test $tcl_cv_cc_arch_ppc64 = yes; then
     4678                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     4679                            do64bit_ok=yes
     4680                        fi;;
     4681                    i386)
     4682                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
     4683$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
     4684if ${tcl_cv_cc_arch_x86_64+:} false; then :
     4685  $as_echo_n "(cached) " >&6
     4686else
     4687
     4688                            hold_cflags=$CFLAGS
     4689                            CFLAGS="$CFLAGS -arch x86_64"
     4690                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4691/* end confdefs.h.  */
     4692
     4693int
     4694main ()
     4695{
     4696
     4697  ;
     4698  return 0;
     4699}
     4700_ACEOF
     4701if ac_fn_c_try_link "$LINENO"; then :
     4702  tcl_cv_cc_arch_x86_64=yes
     4703else
     4704  tcl_cv_cc_arch_x86_64=no
     4705fi
     4706rm -f core conftest.err conftest.$ac_objext \
     4707    conftest$ac_exeext conftest.$ac_ext
     4708                            CFLAGS=$hold_cflags
     4709fi
     4710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
     4711$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
     4712                        if test $tcl_cv_cc_arch_x86_64 = yes; then
     4713                            CFLAGS="$CFLAGS -arch x86_64"
     4714                            do64bit_ok=yes
     4715                        fi;;
     4716                    *)
     4717                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
     4718$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
     4719                esac
     4720            else
     4721                # Check for combined 32-bit and 64-bit fat build
     4722                echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
     4723                    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
     4724                    fat_32_64=yes
     4725            fi
     4726            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
     4727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
     4728$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
     4729if ${tcl_cv_ld_single_module+:} false; then :
     4730  $as_echo_n "(cached) " >&6
     4731else
     4732
     4733                hold_ldflags=$LDFLAGS
     4734                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
     4735                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4736/* end confdefs.h.  */
     4737
     4738int
     4739main ()
     4740{
     4741int i;
     4742  ;
     4743  return 0;
     4744}
     4745_ACEOF
     4746if ac_fn_c_try_link "$LINENO"; then :
     4747  tcl_cv_ld_single_module=yes
     4748else
     4749  tcl_cv_ld_single_module=no
     4750fi
     4751rm -f core conftest.err conftest.$ac_objext \
     4752    conftest$ac_exeext conftest.$ac_ext
     4753                LDFLAGS=$hold_ldflags
     4754fi
     4755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
     4756$as_echo "$tcl_cv_ld_single_module" >&6; }
     4757            if test $tcl_cv_ld_single_module = yes; then
     4758                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
     4759            fi
     4760            SHLIB_LD_LIBS='${LIBS}'
     4761            SHLIB_SUFFIX=".dylib"
     4762            DL_OBJS="tclLoadDyld.o"
     4763            DL_LIBS=""
     4764            # Don't use -prebind when building for Mac OS X 10.4 or later only:
     4765            test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
     4766                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
     4767                LDFLAGS="$LDFLAGS -prebind"
     4768            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
     4769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
     4770$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
     4771if ${tcl_cv_ld_search_paths_first+:} false; then :
     4772  $as_echo_n "(cached) " >&6
     4773else
     4774
     4775                hold_ldflags=$LDFLAGS
     4776                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     4777                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4778/* end confdefs.h.  */
     4779
     4780int
     4781main ()
     4782{
     4783int i;
     4784  ;
     4785  return 0;
     4786}
     4787_ACEOF
     4788if ac_fn_c_try_link "$LINENO"; then :
     4789  tcl_cv_ld_search_paths_first=yes
     4790else
     4791  tcl_cv_ld_search_paths_first=no
     4792fi
     4793rm -f core conftest.err conftest.$ac_objext \
     4794    conftest$ac_exeext conftest.$ac_ext
     4795                LDFLAGS=$hold_ldflags
     4796fi
     4797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
     4798$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
     4799            if test $tcl_cv_ld_search_paths_first = yes; then
     4800                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     4801            fi
     4802            CC_SEARCH_FLAGS=""
     4803            LD_SEARCH_FLAGS=""
     4804            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
     4805            PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
     4806            PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
     4807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use CoreFoundation" >&5
     4808$as_echo_n "checking whether to use CoreFoundation... " >&6; }
     4809            # Check whether --enable-corefoundation was given.
     4810if test "${enable_corefoundation+set}" = set; then :
     4811  enableval=$enable_corefoundation; tcl_corefoundation=$enableval
     4812else
     4813  tcl_corefoundation=yes
     4814fi
     4815
     4816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_corefoundation" >&5
     4817$as_echo "$tcl_corefoundation" >&6; }
     4818            if test $tcl_corefoundation = yes; then
     4819                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CoreFoundation.framework" >&5
     4820$as_echo_n "checking for CoreFoundation.framework... " >&6; }
     4821if ${tcl_cv_lib_corefoundation+:} false; then :
     4822  $as_echo_n "(cached) " >&6
     4823else
     4824
     4825                    hold_libs=$LIBS
     4826                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     4827                        # On Tiger there is no 64-bit CF, so remove 64-bit archs
     4828                        # from CFLAGS et al. while testing for presence of CF.
     4829                        # 64-bit CF is disabled in tclUnixPort.h if necessary.
     4830                        eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
     4831                    done; fi
     4832                    LIBS="$LIBS -framework CoreFoundation"
     4833                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4834/* end confdefs.h.  */
     4835#include <CoreFoundation/CoreFoundation.h>
     4836int
     4837main ()
     4838{
     4839CFBundleRef b = CFBundleGetMainBundle();
     4840  ;
     4841  return 0;
     4842}
     4843_ACEOF
     4844if ac_fn_c_try_link "$LINENO"; then :
     4845  tcl_cv_lib_corefoundation=yes
     4846else
     4847  tcl_cv_lib_corefoundation=no
     4848fi
     4849rm -f core conftest.err conftest.$ac_objext \
     4850    conftest$ac_exeext conftest.$ac_ext
     4851                    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
     4852                        eval $v'="$hold_'$v'"'
     4853                    done; fi; LIBS=$hold_libs
     4854fi
     4855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5
     4856$as_echo "$tcl_cv_lib_corefoundation" >&6; }
     4857                if test $tcl_cv_lib_corefoundation = yes; then
     4858                    LIBS="$LIBS -framework CoreFoundation"
     4859                    $as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h
     4860
     4861                else
     4862                    tcl_corefoundation=no
     4863                fi
     4864                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
     4865                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5
     4866$as_echo_n "checking for 64-bit CoreFoundation... " >&6; }
     4867if ${tcl_cv_lib_corefoundation_64+:} false; then :
     4868  $as_echo_n "(cached) " >&6
     4869else
     4870
     4871                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     4872                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
     4873                        done
     4874                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4875/* end confdefs.h.  */
     4876#include <CoreFoundation/CoreFoundation.h>
     4877int
     4878main ()
     4879{
     4880CFBundleRef b = CFBundleGetMainBundle();
     4881  ;
     4882  return 0;
     4883}
     4884_ACEOF
     4885if ac_fn_c_try_link "$LINENO"; then :
     4886  tcl_cv_lib_corefoundation_64=yes
     4887else
     4888  tcl_cv_lib_corefoundation_64=no
     4889fi
     4890rm -f core conftest.err conftest.$ac_objext \
     4891    conftest$ac_exeext conftest.$ac_ext
     4892                        for v in CFLAGS CPPFLAGS LDFLAGS; do
     4893                            eval $v'="$hold_'$v'"'
     4894                        done
     4895fi
     4896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation_64" >&5
     4897$as_echo "$tcl_cv_lib_corefoundation_64" >&6; }
     4898                    if test $tcl_cv_lib_corefoundation_64 = no; then
     4899                        $as_echo "#define NO_COREFOUNDATION_64 1" >>confdefs.h
     4900
     4901                    fi
     4902                fi
     4903            fi
     4904            $as_echo "#define MAC_OSX_TCL 1" >>confdefs.h
     4905
     4906            ;;
     4907        NEXTSTEP-*)
     4908            SHLIB_CFLAGS=""
     4909            SHLIB_LD="cc -nostdlib -r"
     4910            SHLIB_LD_LIBS=""
     4911            SHLIB_SUFFIX=".so"
     4912            DL_OBJS="tclLoadNext.o"
     4913            DL_LIBS=""
     4914            CC_SEARCH_FLAGS=""
     4915            LD_SEARCH_FLAGS=""
     4916            ;;
     4917        OS/390-*)
     4918            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
     4919            $as_echo "#define _OE_SOCKETS 1" >>confdefs.h
     4920        # needed in sys/socket.h
     4921            ;;
     4922        OSF1-1.0|OSF1-1.1|OSF1-1.2)
     4923            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
     4924            SHLIB_CFLAGS=""
     4925            # Hack: make package name same as library name
     4926            SHLIB_LD='ld -R -export :'
     4927            SHLIB_LD_LIBS=""
     4928            SHLIB_SUFFIX=".so"
     4929            DL_OBJS="tclLoadOSF.o"
     4930            DL_LIBS=""
     4931            CC_SEARCH_FLAGS=""
     4932            LD_SEARCH_FLAGS=""
     4933            ;;
     4934        OSF1-1.*)
     4935            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
     4936            SHLIB_CFLAGS="-fPIC"
     4937            if test "$SHARED_BUILD" = "1" ; then
     4938                SHLIB_LD="ld -shared"
     4939            else
     4940                SHLIB_LD="ld -non_shared"
     4941            fi
     4942            SHLIB_LD_LIBS=""
     4943            SHLIB_SUFFIX=".so"
     4944            DL_OBJS="tclLoadDl.o"
     4945            DL_LIBS=""
     4946            CC_SEARCH_FLAGS=""
     4947            LD_SEARCH_FLAGS=""
     4948            ;;
     4949        OSF1-V*)
     4950            # Digital OSF/1
     4951            SHLIB_CFLAGS=""
     4952            if test "$SHARED_BUILD" = "1" ; then
     4953                SHLIB_LD='ld -shared -expect_unresolved "*"'
     4954            else
     4955                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
     4956            fi
     4957            SHLIB_LD_LIBS=""
     4958            SHLIB_SUFFIX=".so"
     4959            DL_OBJS="tclLoadDl.o"
     4960            DL_LIBS=""
     4961            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     4962            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     4963            if test "$GCC" = "yes" ; then
     4964                CFLAGS="$CFLAGS -mieee"
     4965            else
     4966                CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
     4967            fi
     4968            # see pthread_intro(3) for pthread support on osf1, k.furukawa
     4969            if test "${TCL_THREADS}" = "1" ; then
     4970                CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
     4971                CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
     4972                LIBS=`echo $LIBS | sed s/-lpthreads//`
     4973                if test "$GCC" = "yes" ; then
     4974                    LIBS="$LIBS -lpthread -lmach -lexc"
     4975                else
     4976                    CFLAGS="$CFLAGS -pthread"
     4977                    LDFLAGS="$LDFLAGS -pthread"
     4978                fi
     4979            fi
     4980
     4981            ;;
     4982        QNX-6*)
     4983            # QNX RTP
     4984            # This may work for all QNX, but it was only reported for v6.
     4985            SHLIB_CFLAGS="-fPIC"
     4986            SHLIB_LD="ld -Bshareable -x"
     4987            SHLIB_LD_LIBS=""
     4988            SHLIB_SUFFIX=".so"
     4989            DL_OBJS="tclLoadDl.o"
     4990            # dlopen is in -lc on QNX
     4991            DL_LIBS=""
     4992            CC_SEARCH_FLAGS=""
     4993            LD_SEARCH_FLAGS=""
     4994            ;;
     4995        RISCos-*)
     4996            SHLIB_CFLAGS="-G 0"
     4997            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     4998            SHLIB_LD_LIBS='${LIBS}'
     4999            SHLIB_SUFFIX=".a"
     5000            DL_OBJS="tclLoadAout.o"
     5001            DL_LIBS=""
     5002            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     5003            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     5004            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5005            ;;
     5006        SCO_SV-3.2*)
     5007            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
     5008            # this test works, since "uname -s" was non-standard in 3.2.4 and
     5009            # below.
     5010            if test "$GCC" = "yes" ; then
     5011                SHLIB_CFLAGS="-fPIC -melf"
     5012                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
     5013            else
     5014                SHLIB_CFLAGS="-Kpic -belf"
     5015                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
     5016            fi
     5017            SHLIB_LD="ld -G"
     5018            SHLIB_LD_LIBS=""
     5019            SHLIB_SUFFIX=".so"
     5020            DL_OBJS="tclLoadDl.o"
     5021            DL_LIBS=""
     5022            CC_SEARCH_FLAGS=""
     5023            LD_SEARCH_FLAGS=""
     5024            ;;
     5025        SINIX*5.4*)
     5026            SHLIB_CFLAGS="-K PIC"
     5027            SHLIB_LD="cc -G"
     5028            SHLIB_LD_LIBS=""
     5029            SHLIB_SUFFIX=".so"
     5030            DL_OBJS="tclLoadDl.o"
     5031            DL_LIBS="-ldl"
     5032            CC_SEARCH_FLAGS=""
     5033            LD_SEARCH_FLAGS=""
     5034            ;;
     5035        SunOS-4*)
     5036            SHLIB_CFLAGS="-PIC"
     5037            SHLIB_LD="ld"
     5038            SHLIB_LD_LIBS=""
     5039            SHLIB_SUFFIX=".so"
     5040            DL_OBJS="tclLoadDl.o"
     5041            DL_LIBS="-ldl"
     5042            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     5043            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5044
     5045            # SunOS can't handle version numbers with dots in them in library
     5046            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
     5047            # requires an extra version number at the end of .so file names.
     5048            # So, the library has to have a name like libtcl75.so.1.0
     5049
     5050            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
     5051            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
     5052            TCL_LIB_VERSIONS_OK=nodots
     5053            ;;
     5054        SunOS-5.[0-6])
     5055            # Careful to not let 5.10+ fall into this case
     5056
     5057            # Note: If _REENTRANT isn't defined, then Solaris
     5058            # won't define thread-safe library routines.
     5059
     5060            $as_echo "#define _REENTRANT 1" >>confdefs.h
     5061
     5062            $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
     5063
     5064
     5065            SHLIB_CFLAGS="-KPIC"
     5066
     5067            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     5068            # symbols when dynamically loaded into tclsh.
     5069
     5070            SHLIB_LD_LIBS='${LIBS}'
     5071            SHLIB_SUFFIX=".so"
     5072            DL_OBJS="tclLoadDl.o"
     5073            DL_LIBS="-ldl"
     5074            if test "$GCC" = "yes" ; then
     5075                SHLIB_LD="$CC -shared"
     5076                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     5077                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5078            else
     5079                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     5080                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     5081                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5082            fi
     5083            ;;
     5084        SunOS-5*)
     5085            # Note: If _REENTRANT isn't defined, then Solaris
     5086            # won't define thread-safe library routines.
     5087
     5088            $as_echo "#define _REENTRANT 1" >>confdefs.h
     5089
     5090            $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
     5091
     5092
     5093            SHLIB_CFLAGS="-KPIC"
     5094
     5095            # Check to enable 64-bit flags for compiler/linker
     5096            if test "$do64bit" = "yes" ; then
     5097                arch=`isainfo`
     5098                if test "$arch" = "sparcv9 sparc" ; then
     5099                        if test "$GCC" = "yes" ; then
     5100                            if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
     5101                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
     5102$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
     5103                            else
     5104                                do64bit_ok=yes
     5105                                CFLAGS="$CFLAGS -m64 -mcpu=v9"
     5106                                LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
     5107                                SHLIB_CFLAGS="-fPIC"
     5108                            fi
     5109                        else
     5110                            do64bit_ok=yes
     5111                            if test "$do64bitVIS" = "yes" ; then
     5112                                CFLAGS="$CFLAGS -xarch=v9a"
     5113                                LDFLAGS="$LDFLAGS -xarch=v9a"
     5114                            else
     5115                                CFLAGS="$CFLAGS -xarch=v9"
     5116                                LDFLAGS="$LDFLAGS -xarch=v9"
     5117                            fi
     5118                            # Solaris 64 uses this as well
     5119                            #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
     5120                        fi
     5121                elif test "$arch" = "amd64 i386" ; then
     5122                    if test "$GCC" = "yes" ; then
     5123                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
     5124$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     5125                    else
     5126                        do64bit_ok=yes
     5127                        CFLAGS="$CFLAGS -xarch=amd64"
     5128                        LDFLAGS="$LDFLAGS -xarch=amd64"
     5129                    fi
     5130                else
     5131                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
     5132$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
     5133                fi
     5134            fi
     5135
     5136            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     5137            # symbols when dynamically loaded into tclsh.
     5138
     5139            SHLIB_LD_LIBS='${LIBS}'
     5140            SHLIB_SUFFIX=".so"
     5141            DL_OBJS="tclLoadDl.o"
     5142            DL_LIBS="-ldl"
     5143            if test "$GCC" = "yes" ; then
     5144                SHLIB_LD="$CC -shared"
     5145                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     5146                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5147                if test "$do64bit_ok" = "yes" ; then
     5148                    # We need to specify -static-libgcc or we need to
     5149                    # add the path to the sparv9 libgcc.
     5150                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
     5151                    # for finding sparcv9 libgcc, get the regular libgcc
     5152                    # path, remove so name and append 'sparcv9'
     5153                    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
     5154                    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
     5155                fi
     5156            else
     5157                case $system in
     5158                    SunOS-5.[1-9][0-9]*)
     5159                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
     5160                    *)
     5161                        SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
     5162                esac
     5163                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     5164                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     5165            fi
     5166            ;;
     5167        ULTRIX-4.*)
     5168            SHLIB_CFLAGS="-G 0"
     5169            SHLIB_SUFFIX=".a"
     5170            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
     5171            SHLIB_LD_LIBS='${LIBS}'
     5172            DL_OBJS="tclLoadAout.o"
     5173            DL_LIBS=""
     5174            LDFLAGS="$LDFLAGS -Wl,-D,08000000"
     5175            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     5176            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     5177            if test "$GCC" != "yes" ; then
     5178                CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
     5179            fi
     5180            ;;
     5181        UNIX_SV* | UnixWare-5*)
     5182            SHLIB_CFLAGS="-KPIC"
     5183            SHLIB_LD="cc -G"
     5184            SHLIB_LD_LIBS=""
     5185            SHLIB_SUFFIX=".so"
     5186            DL_OBJS="tclLoadDl.o"
     5187            DL_LIBS="-ldl"
     5188            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
     5189            # that don't grok the -Bexport option.  Test that it does.
     5190            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
     5191$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
     5192if ${tcl_cv_ld_Bexport+:} false; then :
     5193  $as_echo_n "(cached) " >&6
     5194else
     5195
     5196                hold_ldflags=$LDFLAGS
     5197                LDFLAGS="$LDFLAGS -Wl,-Bexport"
     5198                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5199/* end confdefs.h.  */
     5200
     5201int
     5202main ()
     5203{
     5204int i;
     5205  ;
     5206  return 0;
     5207}
     5208_ACEOF
     5209if ac_fn_c_try_link "$LINENO"; then :
     5210  tcl_cv_ld_Bexport=yes
     5211else
     5212  tcl_cv_ld_Bexport=no
     5213fi
     5214rm -f core conftest.err conftest.$ac_objext \
     5215    conftest$ac_exeext conftest.$ac_ext
     5216                LDFLAGS=$hold_ldflags
     5217fi
     5218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
     5219$as_echo "$tcl_cv_ld_Bexport" >&6; }
     5220            if test $tcl_cv_ld_Bexport = yes; then
     5221                LDFLAGS="$LDFLAGS -Wl,-Bexport"
     5222            fi
     5223            CC_SEARCH_FLAGS=""
     5224            LD_SEARCH_FLAGS=""
     5225            ;;
     5226    esac
     5227
     5228    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
     5229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
     5230$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
     5231    fi
     5232
     5233
     5234
     5235
     5236    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
     5237    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
     5238    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
     5239    # to determine which of several header files defines the a.out file
     5240    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
     5241    # support only a file format that is more or less version-7-compatible.
     5242    # In particular,
     5243    #   - a.out files must begin with `struct exec'.
     5244    #   - the N_TXTOFF on the `struct exec' must compute the seek address
     5245    #     of the text segment
     5246    #   - The `struct exec' must contain a_magic, a_text, a_data, a_bss
     5247    #     and a_entry fields.
     5248    # The following compilation should succeed if and only if either sys/exec.h
     5249    # or a.out.h is usable for the purpose.
     5250    #
     5251    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
     5252    # `struct exec' includes a second header that contains information that
     5253    # duplicates the v7 fields that are needed.
     5254
     5255    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
     5256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/exec.h" >&5
     5257$as_echo_n "checking sys/exec.h... " >&6; }
     5258if ${tcl_cv_sysexec_h+:} false; then :
     5259  $as_echo_n "(cached) " >&6
     5260else
     5261
     5262        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5263/* end confdefs.h.  */
     5264#include <sys/exec.h>
     5265int
     5266main ()
     5267{
     5268
     5269            struct exec foo;
     5270            unsigned long seek;
     5271            int flag;
     5272#if defined(__mips) || defined(mips)
     5273            seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     5274#else
     5275            seek = N_TXTOFF (foo);
     5276#endif
     5277            flag = (foo.a_magic == OMAGIC);
     5278            return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     5279
     5280  ;
     5281  return 0;
     5282}
     5283_ACEOF
     5284if ac_fn_c_try_compile "$LINENO"; then :
     5285  tcl_cv_sysexec_h=usable
     5286else
     5287  tcl_cv_sysexec_h=unusable
     5288fi
     5289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     5290fi
     5291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sysexec_h" >&5
     5292$as_echo "$tcl_cv_sysexec_h" >&6; }
     5293        if test $tcl_cv_sysexec_h = usable; then
     5294            $as_echo "#define USE_SYS_EXEC_H 1" >>confdefs.h
     5295
     5296        else
     5297            { $as_echo "$as_me:${as_lineno-$LINENO}: checking a.out.h" >&5
     5298$as_echo_n "checking a.out.h... " >&6; }
     5299if ${tcl_cv_aout_h+:} false; then :
     5300  $as_echo_n "(cached) " >&6
     5301else
     5302
     5303            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5304/* end confdefs.h.  */
     5305#include <a.out.h>
     5306int
     5307main ()
     5308{
     5309
     5310                struct exec foo;
     5311                unsigned long seek;
     5312                int flag;
     5313#if defined(__mips) || defined(mips)
     5314                seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     5315#else
     5316                seek = N_TXTOFF (foo);
     5317#endif
     5318                flag = (foo.a_magic == OMAGIC);
     5319                return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     5320
     5321  ;
     5322  return 0;
     5323}
     5324_ACEOF
     5325if ac_fn_c_try_compile "$LINENO"; then :
     5326  tcl_cv_aout_h=usable
     5327else
     5328  tcl_cv_aout_h=unusable
     5329fi
     5330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     5331fi
     5332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_aout_h" >&5
     5333$as_echo "$tcl_cv_aout_h" >&6; }
     5334            if test $tcl_cv_aout_h = usable; then
     5335                $as_echo "#define USE_A_OUT_H 1" >>confdefs.h
     5336
     5337            else
     5338                { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/exec_aout.h" >&5
     5339$as_echo_n "checking sys/exec_aout.h... " >&6; }
     5340if ${tcl_cv_sysexecaout_h+:} false; then :
     5341  $as_echo_n "(cached) " >&6
     5342else
     5343
     5344                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5345/* end confdefs.h.  */
     5346#include <sys/exec_aout.h>
     5347int
     5348main ()
     5349{
     5350
     5351                    struct exec foo;
     5352                    unsigned long seek;
     5353                    int flag;
     5354#if defined(__mips) || defined(mips)
     5355                    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
     5356#else
     5357                    seek = N_TXTOFF (foo);
     5358#endif
     5359                    flag = (foo.a_midmag == OMAGIC);
     5360                    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
     5361
     5362  ;
     5363  return 0;
     5364}
     5365_ACEOF
     5366if ac_fn_c_try_compile "$LINENO"; then :
     5367  tcl_cv_sysexecaout_h=usable
     5368else
     5369  tcl_cv_sysexecaout_h=unusable
     5370fi
     5371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     5372fi
     5373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sysexecaout_h" >&5
     5374$as_echo "$tcl_cv_sysexecaout_h" >&6; }
     5375                if test $tcl_cv_sysexecaout_h = usable; then
     5376                    $as_echo "#define USE_SYS_EXEC_AOUT_H 1" >>confdefs.h
     5377
     5378                else
     5379                    DL_OBJS=""
     5380                fi
     5381            fi
     5382        fi
     5383    fi
     5384
     5385    # Step 5: disable dynamic loading if requested via a command-line switch.
     5386
     5387    # Check whether --enable-load was given.
     5388if test "${enable_load+set}" = set; then :
     5389  enableval=$enable_load; tcl_ok=$enableval
     5390else
     5391  tcl_ok=yes
     5392fi
     5393
     5394    if test "$tcl_ok" = "no"; then
     5395        DL_OBJS=""
     5396    fi
     5397
     5398    if test "x$DL_OBJS" != "x" ; then
     5399        BUILD_DLTEST="\$(DLTEST_TARGETS)"
     5400    else
     5401        echo "Can't figure out how to do dynamic loading or shared libraries"
     5402        echo "on this system."
     5403        SHLIB_CFLAGS=""
     5404        SHLIB_LD=""
     5405        SHLIB_SUFFIX=""
     5406        DL_OBJS="tclLoadNone.o"
     5407        DL_LIBS=""
     5408        LDFLAGS="$LDFLAGS_ORIG"
     5409        CC_SEARCH_FLAGS=""
     5410        LD_SEARCH_FLAGS=""
     5411        BUILD_DLTEST=""
     5412    fi
     5413
     5414    # If we're running gcc, then change the C flags for compiling shared
     5415    # libraries to the right flags for gcc, instead of those for the
     5416    # standard manufacturer compiler.
     5417
     5418    if test "$DL_OBJS" != "tclLoadNone.o" ; then
     5419        if test "$GCC" = "yes" ; then
     5420            case $system in
     5421                AIX-*)
     5422                    ;;
     5423                BSD/OS*)
     5424                    ;;
     5425                IRIX*)
     5426                    ;;
     5427                NetBSD-*|FreeBSD-*|OpenBSD-*)
     5428                    ;;
     5429                Darwin-*)
     5430                    ;;
     5431                RISCos-*)
     5432                    ;;
     5433                SCO_SV-3.2*)
     5434                    ;;
     5435                ULTRIX-4.*)
     5436                    ;;
     5437                *)
     5438                    SHLIB_CFLAGS="-fPIC"
     5439                    ;;
     5440            esac
     5441        fi
     5442    fi
     5443
     5444    if test "$SHARED_LIB_SUFFIX" = "" ; then
     5445        SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
     5446    fi
     5447    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
     5448        UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
     5449    fi
     5450
     5451    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
     5452        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
     5453        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
     5454        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     5455    else
     5456        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
     5457
     5458        if test "$RANLIB" = "" ; then
     5459            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
     5460            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     5461        else
     5462            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
     5463            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
     5464        fi
     5465
     5466    fi
     5467
     5468
     5469    # Stub lib does not depend on shared/static configuration
     5470    if test "$RANLIB" = "" ; then
     5471        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
     5472        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
     5473    else
     5474        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
     5475        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
     5476    fi
     5477
     5478
     5479
     5480
     5481
     5482
     5483
     5484
     5485
     5486
     5487
     5488
     5489
     5490
     5491
     5492
     5493
     5494
     5495
     5496
     5497
     5498
     5499
     5500
     5501
     5502
     5503
     5504
     5505
     5506
     5507
     5508
     5509
     5510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
     5511$as_echo_n "checking how to build libraries... " >&6; }
     5512    # Check whether --enable-shared was given.
     5513if test "${enable_shared+set}" = set; then :
     5514  enableval=$enable_shared; tcl_ok=$enableval
     5515else
     5516  tcl_ok=yes
     5517fi
     5518
     5519
     5520    if test "${enable_shared+set}" = set; then
     5521        enableval="$enable_shared"
     5522        tcl_ok=$enableval
     5523    else
     5524        tcl_ok=yes
     5525    fi
     5526
     5527    if test "$tcl_ok" = "yes" ; then
     5528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
     5529$as_echo "shared" >&6; }
     5530        SHARED_BUILD=1
     5531    else
     5532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
     5533$as_echo "static" >&6; }
     5534        SHARED_BUILD=0
     5535        $as_echo "#define STATIC_BUILD 1" >>confdefs.h
     5536
     5537    fi
     5538
     5539
     5540
     5541
     5542
     5543
     5544
     5545
    21055546
    21065547
     
    21165557done
    21175558if test "x${make_command}" = "x" ; then
    2118   as_fn_error "Requires GNU make. You can specify a version with \$MAKE" "$LINENO" 5
     5559  as_fn_error $? "Requires GNU make. You can specify a version with \$MAKE" "$LINENO" 5
    21195560fi
    21205561MAKE=${make_command}
     
    22345675
    22355676
    2236 ac_config_files="$ac_config_files Makefile pkgIndex.tcl apps/Makefile apps/about apps/encodedata apps/rappture apps/rappture-csh.env apps/rappture.env apps/rappture.use apps/rerun apps/simsim apps/xmldiff scripts/Makefile"
     5677ac_config_files="$ac_config_files Makefile pkgIndex.tcl apps/Makefile apps/about apps/encodedata apps/rappture apps/rappture-csh.env apps/rappture.env apps/rappture.use apps/rerun apps/simsim apps/xmldiff scripts/Makefile src/Makefile"
    22375678
    22385679cat >confcache <<\_ACEOF
     
    23005741if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
    23015742  if test -w "$cache_file"; then
    2302     test "x$cache_file" != "x/dev/null" &&
     5743    if test "x$cache_file" != "x/dev/null"; then
    23035744      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
    23045745$as_echo "$as_me: updating cache $cache_file" >&6;}
    2305     cat confcache >$cache_file
     5746      if test ! -f "$cache_file" || test -h "$cache_file"; then
     5747        cat confcache >"$cache_file"
     5748      else
     5749        case $cache_file in #(
     5750        */* | ?:*)
     5751          mv -f confcache "$cache_file"$$ &&
     5752          mv -f "$cache_file"$$ "$cache_file" ;; #(
     5753        *)
     5754          mv -f confcache "$cache_file" ;;
     5755        esac
     5756      fi
     5757    fi
    23065758  else
    23075759    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
     
    23555807ac_libobjs=
    23565808ac_ltlibobjs=
     5809U=
    23575810for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
    23585811  # 1. Remove the extension, and $U if already installed.
     
    23705823
    23715824
    2372 : ${CONFIG_STATUS=./config.status}
     5825: "${CONFIG_STATUS=./config.status}"
    23735826ac_write_fail=0
    23745827ac_clean_files_save=$ac_clean_files
     
    24715924
    24725925# Find who we are.  Look in the path if we contain no directory separator.
     5926as_myself=
    24735927case $0 in #((
    24745928  *[\\/]* ) as_myself=$0 ;;
     
    25165970
    25175971
    2518 # as_fn_error ERROR [LINENO LOG_FD]
    2519 # ---------------------------------
     5972# as_fn_error STATUS ERROR [LINENO LOG_FD]
     5973# ----------------------------------------
    25205974# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
    25215975# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
    2522 # script with status $?, using 1 if that was 0.
     5976# script with STATUS, using 1 if that was 0.
    25235977as_fn_error ()
    25245978{
    2525   as_status=$?; test $as_status -eq 0 && as_status=1
    2526   if test "$3"; then
    2527     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    2528     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
     5979  as_status=$1; test $as_status -eq 0 && as_status=1
     5980  if test "$4"; then
     5981    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     5982    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
    25295983  fi
    2530   $as_echo "$as_me: error: $1" >&2
     5984  $as_echo "$as_me: error: $2" >&2
    25315985  as_fn_exit $as_status
    25325986} # as_fn_error
     
    27246178    done
    27256179    test -z "$as_dirs" || eval "mkdir $as_dirs"
    2726   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
     6180  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
    27276181
    27286182
     
    27786232ac_log="
    27796233This file was extended by RapptureGUI $as_me 1.1, which was
    2780 generated by GNU Autoconf 2.65.  Invocation command line was
     6234generated by GNU Autoconf 2.68.  Invocation command line was
    27816235
    27826236  CONFIG_FILES    = $CONFIG_FILES
     
    28316285ac_cs_version="\\
    28326286RapptureGUI config.status 1.1
    2833 configured by $0, generated by GNU Autoconf 2.65,
     6287configured by $0, generated by GNU Autoconf 2.68,
    28346288  with options \\"\$ac_cs_config\\"
    28356289
    2836 Copyright (C) 2009 Free Software Foundation, Inc.
     6290Copyright (C) 2010 Free Software Foundation, Inc.
    28376291This config.status script is free software; the Free Software Foundation
    28386292gives unlimited permission to copy, distribute and modify it."
     
    28516305do
    28526306  case $1 in
    2853   --*=*)
     6307  --*=?*)
    28546308    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    28556309    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     6310    ac_shift=:
     6311    ;;
     6312  --*=)
     6313    ac_option=`expr "X$1" : 'X\([^=]*\)='`
     6314    ac_optarg=
    28566315    ac_shift=:
    28576316    ;;
     
    28776336    case $ac_optarg in
    28786337    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     6338    '') as_fn_error $? "missing file argument" ;;
    28796339    esac
    28806340    as_fn_append CONFIG_FILES " '$ac_optarg'"
     
    28876347
    28886348  # This is an error.
    2889   -*) as_fn_error "unrecognized option: \`$1'
     6349  -*) as_fn_error $? "unrecognized option: \`$1'
    28906350Try \`$0 --help' for more information." ;;
    28916351
     
    29496409    "apps/xmldiff") CONFIG_FILES="$CONFIG_FILES apps/xmldiff" ;;
    29506410    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
    2951 
    2952   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
     6411    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     6412
     6413  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
    29536414  esac
    29546415done
     
    29716432$debug ||
    29726433{
    2973   tmp=
     6434  tmp= ac_tmp=
    29746435  trap 'exit_status=$?
    2975   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
     6436  : "${ac_tmp:=$tmp}"
     6437  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
    29766438' 0
    29776439  trap 'as_fn_exit 1' 1 2 13 15
     
    29816443{
    29826444  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
    2983   test -n "$tmp" && test -d "$tmp"
     6445  test -d "$tmp"
    29846446}  ||
    29856447{
    29866448  tmp=./conf$$-$RANDOM
    29876449  (umask 077 && mkdir "$tmp")
    2988 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
     6450} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
     6451ac_tmp=$tmp
    29896452
    29906453# Set up the scripts for CONFIG_FILES section.
     
    30036466ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
    30046467if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
    3005   ac_cs_awk_cr='\r'
     6468  ac_cs_awk_cr='\\r'
    30066469else
    30076470  ac_cs_awk_cr=$ac_cr
    30086471fi
    30096472
    3010 echo 'BEGIN {' >"$tmp/subs1.awk" &&
     6473echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
    30116474_ACEOF
    30126475
     
    30176480  echo "_ACEOF"
    30186481} >conf$$subs.sh ||
    3019   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
    3020 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
     6482  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
     6483ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
    30216484ac_delim='%!_!# '
    30226485for ac_last_try in false false false false false :; do
    30236486  . ./conf$$subs.sh ||
    3024     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
     6487    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
    30256488
    30266489  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
     
    30286491    break
    30296492  elif $ac_last_try; then
    3030     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
     6493    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
    30316494  else
    30326495    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
     
    30366499
    30376500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    3038 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
     6501cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
    30396502_ACEOF
    30406503sed -n '
     
    30846547cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    30856548_ACAWK
    3086 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
     6549cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
    30876550  for (key in S) S_is_set[key] = 1
    30886551  FS = ""
     
    31166579else
    31176580  cat
    3118 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
    3119   || as_fn_error "could not setup config files machinery" "$LINENO" 5
     6581fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
     6582  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
    31206583_ACEOF
    31216584
    3122 # VPATH may cause trouble with some makes, so we remove $(srcdir),
    3123 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
     6585# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
     6586# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
    31246587# trailing colons and then remove the whole line if VPATH becomes empty
    31256588# (actually we leave an empty line to preserve line numbers).
    31266589if test "x$srcdir" = x.; then
    3127   ac_vpsub='/^[  ]*VPATH[        ]*=/{
    3128 s/:*\$(srcdir):*/:/
    3129 s/:*\${srcdir}:*/:/
    3130 s/:*@srcdir@:*/:/
    3131 s/^\([^=]*=[     ]*\):*/\1/
     6590  ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
     6591h
     6592s///
     6593s/^/:/
     6594s/[      ]*$/:/
     6595s/:\$(srcdir):/:/g
     6596s/:\${srcdir}:/:/g
     6597s/:@srcdir@:/:/g
     6598s/^:*//
    31326599s/:*$//
     6600x
     6601s/\(=[   ]*\).*/\1/
     6602G
     6603s/\n//
    31336604s/^[^=]*=[       ]*$//
    31346605}'
     
    31486619  case $ac_mode$ac_tag in
    31496620  :[FHL]*:*);;
    3150   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
     6621  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
    31516622  :[FH]-) ac_tag=-:-;;
    31526623  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     
    31676638    do
    31686639      case $ac_f in
    3169       -) ac_f="$tmp/stdin";;
     6640      -) ac_f="$ac_tmp/stdin";;
    31706641      *) # Look for the file first in the build tree, then in the source tree
    31716642         # (if the path is not absolute).  The absolute path cannot be DOS-style,
     
    31766647           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
    31776648           esac ||
    3178            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
     6649           as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
    31796650      esac
    31806651      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     
    32026673
    32036674    case $ac_tag in
    3204     *:-:* | *:-) cat >"$tmp/stdin" \
    3205       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
     6675    *:-:* | *:-) cat >"$ac_tmp/stdin" \
     6676      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    32066677    esac
    32076678    ;;
     
    33396810$ac_datarootdir_hack
    33406811"
    3341 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
    3342   || as_fn_error "could not create $ac_file" "$LINENO" 5
     6812eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
     6813  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    33436814
    33446815test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
    3345   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
    3346   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
     6816  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
     6817  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
     6818      "$ac_tmp/out"`; test -z "$ac_out"; } &&
    33476819  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    3348 which seems to be undefined.  Please make sure it is defined." >&5
     6820which seems to be undefined.  Please make sure it is defined" >&5
    33496821$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    3350 which seems to be undefined.  Please make sure it is defined." >&2;}
    3351 
    3352   rm -f "$tmp/stdin"
     6822which seems to be undefined.  Please make sure it is defined" >&2;}
     6823
     6824  rm -f "$ac_tmp/stdin"
    33536825  case $ac_file in
    3354   -) cat "$tmp/out" && rm -f "$tmp/out";;
    3355   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
     6826  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
     6827  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
    33566828  esac \
    3357   || as_fn_error "could not create $ac_file" "$LINENO" 5
     6829  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    33586830 ;;
    33596831
     
    33706842
    33716843test $ac_write_fail = 0 ||
    3372   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
     6844  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
    33736845
    33746846
     
    33916863  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
    33926864  # would make configure fail if this is the last instruction.
    3393   $ac_cs_success || as_fn_exit $?
     6865  $ac_cs_success || as_fn_exit 1
    33946866fi
    33956867if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  • branches/blt4/gui/configure.in

    r1884 r2170  
    2727AC_PROG_MKDIR_P
    2828AC_PROG_MAKE_SET
     29AC_PROG_CC
     30
     31SC_CONFIG_CFLAGS
     32SC_ENABLE_SHARED
     33
     34AC_SUBST(CFLAGS_DEBUG)
     35AC_SUBST(CFLAGS_OPTIMIZE)
     36AC_SUBST(STLIB_LD)
     37AC_SUBST(SHLIB_LD)
     38AC_SUBST(SHLIB_CFLAGS)
     39AC_SUBST(SHLIB_LDFLAGS)
     40AC_SUBST(SHLIB_SUFFIX)
    2941
    3042gui_with_tcl=""
     
    163175    apps/xmldiff
    164176    scripts/Makefile
     177    src/Makefile
    165178])
    166179AC_OUTPUT
  • branches/blt4/gui/pkgIndex.tcl.in

    r1884 r2170  
    88        variable library $dir
    99    }
     10    set ext [info sharedlibextension]
     11    load [file join $dir "RapptureGUI${version}${ext}"]
    1012    package provide RapptureGUI $version
    1113} $dir]
  • branches/blt4/lang/java/Library.java

    r1824 r2170  
    100100  }
    101101
     102  public String xml(){
     103    return jRpXml(libPtr);
     104  }
     105
    102106
    103107  // Native Functions----------------------------------------------------------
     
    118122
    119123  private native void jRpResult(long libPtr, int exitStatus); 
     124  private native String jRpXml(long libPtr);
    120125
    121126  // Private Attributes--------------------------------------------------------
  • branches/blt4/lang/java/Units.java

    r1824 r2170  
    2323  }
    2424
    25   public static String convert(String fromVal, String to, boolean units){
     25  // Public Methods------------------------------------------------------------
     26  public static double convertDouble(double fromVal, String to){
     27    return Double.parseDouble(
     28      jRpUnitsConvert(Double.toString(fromVal), to, false));
     29  }
     30
     31  public static String convertString(String fromVal, String to, boolean units){
    2632    return jRpUnitsConvert(fromVal, to, units);
    2733  }
    2834
    29   public static String convert(String fromVal, String to){
     35  public static String convertString(String fromVal, String to){
    3036    return jRpUnitsConvert(fromVal, to, true);
    3137  }
    3238
    33   private static native String jRpUnitsConvert(String fromVal, String to, boolean units);
     39  // Native Functions----------------------------------------------------------
     40  private static native String jRpUnitsConvert(String fromVal, String to,
     41    boolean units);
    3442}
    3543
  • branches/blt4/lang/java/Utils.java

    r1744 r2170  
    2626  }
    2727
     28  public static void progress(int percent){
     29    jRpUtilsProgress(percent, "");
     30  }
     31
    2832  private static native void jRpUtilsProgress(int percent, String text);
    2933
  • branches/blt4/lang/java/jRpLibrary.cc

    r1824 r2170  
    145145}
    146146
     147// xml
     148JNIEXPORT jstring JNICALL Java_rappture_Library_jRpXml
     149  (JNIEnv *env, jobject obj, jlong libPtr) {
     150  std::string retStr = ((RpLibrary*)libPtr)->xml();
     151  return(env->NewStringUTF(retStr.c_str()));
     152}
     153
  • branches/blt4/lang/java/jRpUnits.cc

    r1824 r2170  
    1717#include "rappture.h"
    1818
    19 // convert
     19// convertString
    2020JNIEXPORT jstring JNICALL Java_rappture_Units_jRpUnitsConvert
    2121  (JNIEnv *env, jclass cls, jstring javaFromVal, jstring javaTo, jboolean units){
     
    3434    ex = env->FindClass("java/lang/RuntimeException");
    3535    if (ex){
    36       errorMsg = "Connot convert ";
     36      errorMsg = "Cannot convert ";
    3737      errorMsg += nativeFromVal;
    3838      errorMsg += " to ";
  • branches/blt4/lang/tcl/scripts/Makefile.in

    r1948 r2170  
    4141                $(srcdir)/exec.tcl \
    4242                $(srcdir)/library.tcl \
     43                $(srcdir)/objects.tcl \
    4344                $(srcdir)/result.tcl \
    4445                $(srcdir)/units.tcl
    4546
     47OBJECTS         = \
     48                boolean \
     49                choice \
     50                curve \
     51                group \
     52                histogram \
     53                image \
     54                integer \
     55                note \
     56                number \
     57                phase \
     58                string
     59
     60TYPEFILES       = \
     61                $(srcdir)/types/boolean.tcl \
     62                $(srcdir)/types/choices.tcl \
     63                $(srcdir)/types/color.tcl \
     64                $(srcdir)/types/file.tcl \
     65                $(srcdir)/types/image.tcl \
     66                $(srcdir)/types/language.tcl \
     67                $(srcdir)/types/string.tcl \
     68                $(srcdir)/types/units.tcl
     69
     70VALIDATEFILES   = \
     71                $(srcdir)/validations/enable.tcl \
     72                $(srcdir)/validations/int.tcl \
     73                $(srcdir)/validations/imformat.tcl \
     74                $(srcdir)/validations/imresize.tcl \
     75                $(srcdir)/validations/number.tcl \
     76                $(srcdir)/validations/size.tcl
     77
    4678all: tclIndex
    4779
    48 tclIndex: $(FILES)
     80tclIndex: install-objects install-types install-validations $(FILES)
    4981        $(TCLSH) $(srcdir)/../tclconfig/mkindex.tcl --srcdir $(srcdir) \
    5082                --outfile tclIndex
     83        $(TCLSH) $(srcdir)/../tclconfig/mkobjects.tcl --srcdir $(srcdir) \
     84                $(OBJECTS)
    5185
    5286install: tclIndex
     
    5791        $(INSTALL) -m 0444 tclIndex $(destdir)
    5892
     93install-objects:
     94        $(MKDIR_P) -m 0755 $(destdir)/objects
     95        $(INSTALL) -m 0444 $(srcdir)/objects/base.rp $(destdir)/objects
     96        for i in $(OBJECTS); do \
     97            echo "Installing object definition: $$i" ; \
     98            $(MKDIR_P) -m 0755 $(destdir)/objects/$$i ; \
     99            for j in $(srcdir)/objects/$$i/*; do \
     100                $(INSTALL) -m 0444 $$j $(destdir)/objects/$$i ; \
     101            done \
     102        done
     103
     104install-types: $(TYPEFILES)
     105        $(MKDIR_P) -m 0755 $(destdir)/types
     106        @for i in $(TYPEFILES); do \
     107            echo "Installing $$i" ; \
     108            $(INSTALL) -m 555 $$i $(destdir)/types ; \
     109        done
     110
     111install-validations: $(VALIDATEFILES)
     112        $(MKDIR_P) -m 0755 $(destdir)/validations
     113        @for i in $(VALIDATEFILES); do \
     114            echo "Installing $$i" ; \
     115            $(INSTALL) -m 555 $$i $(destdir)/validations ; \
     116        done
     117
    59118clean:
    60119        $(RM) tclIndex
  • branches/blt4/lang/tcl/scripts/library.tcl

    r2150 r2170  
    1717    variable stdlib ""
    1818}
     19
     20# load the object system along with the XML library code
     21Rappture::objects::init
    1922
    2023# ----------------------------------------------------------------------
     
    133136
    134137        foreach cpath [$xmlobj children -as path $path] {
    135             switch -- [$xmlobj element -as type $cpath] {
     138            set type [$xmlobj element -as type $cpath]
     139            switch -- $type {
    136140                group - phase {
    137141                    lappend queue $cpath
     
    167171                }
    168172                default {
    169                     # add this to the return list with the right flavor
    170                     if {$params(-as) == "component"} {
    171                         lappend rlist $cpath
    172                     } else {
    173                         lappend rlist [$xmlobj element -as $params(-as) $cpath]
     173                    if {[catch {Rappture::objects::get $type}] == 0} {
     174                        # add this to the return list with the right flavor
     175                        if {$params(-as) == "component"} {
     176                            lappend rlist $cpath
     177                        } else {
     178                            lappend rlist [$xmlobj element -as $params(-as) $cpath]
     179                        }
    174180                    }
    175181
     
    200206    public method copy {path from args}
    201207    public method remove {{path ""}}
    202     public method xml {}
     208    public method xml {{path ""}}
    203209
    204210    public method diff {libobj}
     
    651657
    652658# ----------------------------------------------------------------------
    653 # USAGE: xml
     659# USAGE: xml ?<path>?
    654660#
    655661# Returns a string representing the XML information for the information
    656662# in this library.
    657663# ----------------------------------------------------------------------
    658 itcl::body Rappture::LibraryObj::xml {} {
    659     return [$_node asXML]
     664itcl::body Rappture::LibraryObj::xml {{path ""}} {
     665    if {"" != $path} {
     666        set n [find $path]
     667    } else {
     668        set n $_node
     669    }
     670    return [$n asXML]
    660671}
    661672
  • branches/blt4/lang/tcl/src/RpRusage.c

    r1018 r2170  
    3535
    3636static RpRusageStats RpRusage_Start;      /* time at start of program */
    37 static RpRusageStats RpRusage_MarkStats;  /* stats from last "mark" */
    38 
    3937
    4038static Tcl_ObjCmdProc RpRusageCmd;
     39static Tcl_ObjCmdProc RpRusageForgetOp;
    4140static Tcl_ObjCmdProc RpRusageMarkOp;
    4241static Tcl_ObjCmdProc RpRusageMeasureOp;
     
    4645static double RpRusageTimeDiff _ANSI_ARGS_((struct timeval *currptr,
    4746    struct timeval *prevptr));
     47static void RpDestroyMarkNames _ANSI_ARGS_((ClientData cdata,
     48    Tcl_Interp *interp));
    4849
    4950/*
     
    5152 */
    5253static Rp_OpSpec rusageOps[] = {
    53     {"mark",    2, RpRusageMarkOp, 2, 2, "",},
    54     {"measure", 2, RpRusageMeasureOp, 2, 2, "",},
     54    {"forget", 1, RpRusageForgetOp, 2, 0, "?name...?",},
     55    {"mark",    2, RpRusageMarkOp, 2, 3, "?name?",},
     56    {"measure", 2, RpRusageMeasureOp, 2, 3, "?name?",},
    5557};
    5658static int nRusageOps = sizeof(rusageOps) / sizeof(Rp_OpSpec);
     
    6870    Tcl_Interp *interp;  /* interpreter being initialized */
    6971{
     72    Tcl_HashTable *markNamesPtr;
     73
    7074    Tcl_CreateObjCommand(interp, "::Rappture::rusage", RpRusageCmd,
    7175        NULL, NULL);
    7276
    73     /* set an initial mark automatically */
     77    /* set up a hash table for different mark names */
     78    markNamesPtr = (Tcl_HashTable*)ckalloc(sizeof(Tcl_HashTable));
     79    Tcl_InitHashTable(markNamesPtr, TCL_STRING_KEYS);
     80
     81    Tcl_SetAssocData(interp, "RpRusageMarks",
     82        RpDestroyMarkNames, (ClientData)markNamesPtr);
     83
     84    /* capture the starting time for this program */
     85    if (RpRusageCapture(interp, &RpRusage_Start) != TCL_OK) {
     86        return TCL_ERROR;
     87    }
     88
     89    /* set an initial "global" mark automatically */
    7490    if (RpRusageMarkOp(NULL, interp, 0, (Tcl_Obj**)NULL) != TCL_OK) {
    7591        return TCL_ERROR;
    7692    }
    77 
    78     /* capture the starting time for this program */
    79     memcpy(&RpRusage_Start, &RpRusage_MarkStats, sizeof(RpRusageStats));
    8093
    8194    return TCL_OK;
     
    121134 *  the start of an execution.  Handles the following syntax:
    122135 *
    123  *      rusage mark
     136 *      rusage mark ?name?
    124137 *
    125138 *  Returns TCL_OK on success, and TCL_ERROR (along with an error
     
    132145    Tcl_Interp *interp;       /* interpreter handling this request */
    133146    int objc;                 /* number of command line args */
    134     Tcl_Obj *const *objv;             /* strings for command line args */
    135 {
    136     return RpRusageCapture(interp, &RpRusage_MarkStats);
     147    Tcl_Obj *const *objv;     /* strings for command line args */
     148{
     149    char *markName;
     150    Tcl_HashTable *markNamesPtr;
     151    Tcl_HashEntry *entryPtr;
     152    int newEntry;
     153    RpRusageStats *markPtr;
     154
     155    markNamesPtr = (Tcl_HashTable *)
     156        Tcl_GetAssocData(interp, "RpRusageMarks", NULL);
     157
     158    markName = (objc > 2) ? Tcl_GetString(objv[2]): "global";
     159    entryPtr = Tcl_CreateHashEntry(markNamesPtr, markName, &newEntry);
     160    if (newEntry) {
     161        markPtr = (RpRusageStats*)ckalloc(sizeof(RpRusageStats));
     162        Tcl_SetHashValue(entryPtr, (ClientData)markPtr);
     163    } else {
     164        markPtr = (RpRusageStats*)Tcl_GetHashValue(entryPtr);
     165    }
     166
     167    return RpRusageCapture(interp, markPtr);
    137168}
    138169
     
    145176 *  the following syntax:
    146177 *
    147  *      rusage measure
     178 *      rusage measure ?name?
    148179 *
    149180 *  Returns TCL_OK on success, and TCL_ERROR (along with an error
     
    158189    Tcl_Obj *const *objv;     /* strings for command line args */
    159190{
     191    char *markName;
     192    Tcl_HashTable *markNamesPtr;
     193    Tcl_HashEntry *entryPtr;
     194    RpRusageStats *markPtr;
    160195    double tval;
    161196    RpRusageStats curstats;
    162     char buffer[TCL_DOUBLE_SPACE];
     197    Tcl_Obj *listObjPtr, *objPtr;
    163198
    164199    if (RpRusageCapture(interp, &curstats) != TCL_OK) {
     
    166201    }
    167202
     203    markNamesPtr = (Tcl_HashTable *)
     204        Tcl_GetAssocData(interp, "RpRusageMarks", NULL);
     205
     206    markName = (objc > 2) ? Tcl_GetString(objv[2]): "global";
     207    entryPtr = Tcl_FindHashEntry(markNamesPtr, markName);
     208    if (entryPtr == NULL) {
     209        Tcl_AppendResult(interp, "mark \"", markName,
     210            "\" doesn't exist", NULL);
     211        return TCL_ERROR;
     212    }
     213    markPtr = (RpRusageStats*)Tcl_GetHashValue(entryPtr);
     214
     215    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
    168216    /*
    169217     * Compute: START TIME
    170218     */
    171     Tcl_AppendElement(interp, "start");
    172     tval = RpRusageTimeDiff(&RpRusage_MarkStats.times, &RpRusage_Start.times);
    173     Tcl_PrintDouble(interp, tval, buffer);
    174     Tcl_AppendElement(interp, buffer);
     219    objPtr = Tcl_NewStringObj("start", 5);
     220    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     221    tval = RpRusageTimeDiff(&markPtr->times, &RpRusage_Start.times);
     222    objPtr = Tcl_NewDoubleObj(tval);
     223    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    175224
    176225    /*
    177226     * Compute: WALL TIME
    178227     */
    179     Tcl_AppendElement(interp, "walltime");
    180     tval = RpRusageTimeDiff(&curstats.times, &RpRusage_MarkStats.times);
    181     Tcl_PrintDouble(interp, tval, buffer);
    182     Tcl_AppendElement(interp, buffer);
     228    objPtr = Tcl_NewStringObj("walltime", 8);
     229    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     230    tval = RpRusageTimeDiff(&curstats.times, &markPtr->times);
     231    objPtr = Tcl_NewDoubleObj(tval);
     232    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     233
    183234
    184235    /*
    185236     * Compute: CPU TIME = user time + system time
    186237     */
    187     Tcl_AppendElement(interp, "cputime");
     238    objPtr = Tcl_NewStringObj("cputime", 7);
     239    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    188240    tval = RpRusageTimeDiff(&curstats.resources.ru_utime,
    189              &RpRusage_MarkStats.resources.ru_utime)
     241             &markPtr->resources.ru_utime)
    190242         + RpRusageTimeDiff(&curstats.resources.ru_stime,
    191              &RpRusage_MarkStats.resources.ru_stime);
    192     Tcl_PrintDouble(interp, tval, buffer);
    193     Tcl_AppendElement(interp, buffer);
    194 
     243             &markPtr->resources.ru_stime);
     244    objPtr = Tcl_NewDoubleObj(tval);
     245    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     246    Tcl_SetObjResult(interp, listObjPtr);
     247    return TCL_OK;
     248}
     249
     250/*
     251 * ------------------------------------------------------------------------
     252 *  RpRusageForgetOp()
     253 *
     254 *  Invoked whenever someone uses the "rusage forget" command to release
     255 *  information previous set by "rusage mark".  With no args, it releases
     256 *  all known marks; otherwise, it releases just the specified mark
     257 *  names.  This isn't usually needed, but if a program creates thousands
     258 *  of marks, this gives a way to avoid a huge memory leak.
     259 *  Handles the following syntax:
     260 *
     261 *      rusage forget ?name name...?
     262 *
     263 *  Returns TCL_OK on success, and TCL_ERROR (along with an error
     264 *  message in the interpreter) if anything goes wrong.
     265 * ------------------------------------------------------------------------
     266 */
     267static int
     268RpRusageForgetOp(cdata, interp, objc, objv)
     269    ClientData cdata;         /* not used */
     270    Tcl_Interp *interp;       /* interpreter handling this request */
     271    int objc;                 /* number of command line args */
     272    Tcl_Obj *const *objv;     /* strings for command line args */
     273{
     274    int i;
     275    char *markName;
     276    Tcl_HashTable *markNamesPtr;
     277    Tcl_HashEntry *entryPtr;
     278    Tcl_HashSearch search;
     279
     280    markNamesPtr = (Tcl_HashTable *)
     281        Tcl_GetAssocData(interp, "RpRusageMarks", NULL);
     282
     283    /*
     284     * No args? Then clear all entries in the hash table.
     285     */
     286    if (objc == 2) {
     287        for (entryPtr = Tcl_FirstHashEntry(markNamesPtr, &search);
     288             entryPtr != NULL;
     289             entryPtr = Tcl_NextHashEntry(&search)) {
     290            ckfree((char *)Tcl_GetHashValue(entryPtr));
     291        }
     292        Tcl_DeleteHashTable(markNamesPtr);
     293        Tcl_InitHashTable(markNamesPtr, TCL_STRING_KEYS);
     294    }
     295
     296    /*
     297     * Otherwise, delete only the specified marks.  Be forgiving.
     298     * If a mark isn't recognized, ignore it.
     299     */
     300    else {
     301        for (i=2; i < objc; i++) {
     302            markName = Tcl_GetString(objv[i]);
     303            entryPtr = Tcl_FindHashEntry(markNamesPtr, markName);
     304            if (entryPtr) {
     305                ckfree((char *)Tcl_GetHashValue(entryPtr));
     306                Tcl_DeleteHashEntry(entryPtr);
     307            }
     308        }
     309    }
    195310    return TCL_OK;
    196311}
     
    256371}
    257372
     373/*
     374 * ------------------------------------------------------------------------
     375 *  RpDestroyMarkNames()
     376 *
     377 *  Used internally to clean up the marker names when the interpreter
     378 *  that owns them is being destroyed.
     379 * ------------------------------------------------------------------------
     380 */
     381static void
     382RpDestroyMarkNames(cdata, interp)
     383    ClientData cdata;         /* data being destroyed */
     384    Tcl_Interp *interp;       /* interpreter that owned the data */
     385{
     386    Tcl_HashTable *markNamesPtr;
     387    Tcl_HashEntry *entryPtr;
     388    Tcl_HashSearch search;
     389
     390    for (entryPtr=Tcl_FirstHashEntry(markNamesPtr, &search);
     391         entryPtr != NULL;
     392         entryPtr = Tcl_NextHashEntry(&search)) {
     393        ckfree( (char*)Tcl_GetHashValue(entryPtr) );
     394    }
     395    Tcl_DeleteHashTable(markNamesPtr);
     396    ckfree((char*)markNamesPtr);
     397}
  • branches/blt4/p2p/client.tcl

    r1273 r2170  
    8686    public method send {message}
    8787    public method address {}
    88 
    89     protected method handlerType {}
    9088}
    9189
     
    10199            set _sid ""
    102100        } else {
    103             log debug "sending: $message"
     101            log debug "outgoing message to [address]: $message"
    104102            puts $_sid $message
    105103        }
     
    116114    return $_addr
    117115}
    118 
    119 # ----------------------------------------------------------------------
    120 #  USAGE: handlerType
    121 #
    122 #  Returns a descriptive string describing this handler.  Derived
    123 #  classes override this method to provide their own string.  Used
    124 #  for debug messages.
    125 # ----------------------------------------------------------------------
    126 itcl::body Client::handlerType {} {
    127     return "client"
    128 }
  • branches/blt4/p2p/foreman.tcl

    r1273 r2170  
    119119
    120120    if {"" != [statedata authoritycnx]} {
     121        [statedata authoritycnx] send "identity foreman"
    121122        [statedata authoritycnx] send "workers"
    122123    } else {
     
    160161
    161162    if {"" != [statedata workercnx]} {
     163        [statedata workercnx] send "identity foreman"
    162164        [statedata workercnx] send "solicit -job [expr {rand()}]"
    163165    } else {
  • branches/blt4/p2p/handler.tcl

    r1273 r2170  
    5959    protected method finalize {protocol}
    6060    protected method dropped {cid}
    61     protected method handlerType {}
    6261}
    6362
     
    196195                append mesg "exception: $result"
    197196            }
    198             log debug "[handlerType] message from [connectionName $cid]: [string trimright $request \n] $mesg"
     197            log debug "incoming message from [connectionName $cid]: [string trimright $request \n] $mesg"
    199198        }
    200199    }
     
    237236    catch {unset _cname($cid)}
    238237}
    239 
    240 # ----------------------------------------------------------------------
    241 #  USAGE: handlerType
    242 #
    243 #  Returns a descriptive string describing this handler.  Derived
    244 #  classes override this method to provide their own string.  Used
    245 #  for debug messages.
    246 # ----------------------------------------------------------------------
    247 itcl::body Handler::handlerType {} {
    248     return "handler"
    249 }
  • branches/blt4/p2p/protocols.tcl

    r1273 r2170  
    8181            $obj protocol $name
    8282            $obj define $name exception {message} {
    83                 log error "ERROR from client:  $message"
     83                variable cid
     84                variable handler
     85                log error "ERROR from client [$handler connectionName $cid]:  $message"
     86            }
     87            $obj define $name identity {name} {
     88                variable cid
     89                variable handler
     90                $handler connectionName $cid $name
     91                return ""
    8492            }
    8593
  • branches/blt4/p2p/server.tcl

    r1273 r2170  
    106106
    107107    protected method dropped {cid}
    108     protected method handlerType {}
    109 
    110108    private method accept {cid addr port}
    111109}
     
    235233    chain $cid
    236234}
    237 
    238 # ----------------------------------------------------------------------
    239 #  USAGE: handlerType
    240 #
    241 #  Returns a descriptive string describing this handler.  Derived
    242 #  classes override this method to provide their own string.  Used
    243 #  for debug messages.
    244 # ----------------------------------------------------------------------
    245 itcl::body Server::handlerType {} {
    246     return "server"
    247 }
  • branches/blt4/p2p/test.tcl

    r1273 r2170  
    142142    # ------------------------------------------------------------------
    143143    public proc draw {canvas time} {
     144        global times
    144145        if {[info exists _shapesOnCanvas($canvas)]} {
     146            set y0 5
     147            if {[info exists times($time)]} {
     148                $canvas create text 5 $y0 -anchor nw -text $times($time)
     149                incr y0 15
     150            }
     151            $canvas create text 5 $y0 -anchor nw -tags entity
     152
    145153            foreach obj $_shapesOnCanvas($canvas) {
    146154                if {[$obj exists $time]} {
     
    222230pack .player.fwd -side left -padx 4 -pady 2
    223231
     232button .player.err -text "0 errors" -command {wm deiconify .errors; raise .errors}
     233pack .player.err -side right -padx 4 -pady 2
     234.player.err configure -state disabled
     235
    224236scale .player.scale -label "Frame" -orient horizontal \
    225237    -from 0 -to 1 -showvalue 0 -command {test_frame_go 1}
     
    242254after idle .view.traffic invoke
    243255
     256toplevel .errors
     257wm title .errors "Error Messages"
     258wm withdraw .errors
     259wm protocol .errors WM_DELETE_WINDOW {wm withdraw .errors}
     260scrollbar .errors.ysbar -orient vertical -command {.errors.info yview}
     261pack .errors.ysbar -side right -fill y
     262text .errors.info -yscrollcommand {.errors.ysbar set} -font {Courier 12}
     263pack .errors.info -expand yes -fill both
     264.errors.info tag configure timecode -foreground gray
     265.errors.info tag configure error -foreground red -font {Courier 12 bold}
     266
    244267proc test_stop {} {
    245268    global processes
     
    279302
    280303proc test_reload {} {
    281     global time0 nodes actions nodeRadius
     304    global time0 nodes actions times nodeRadius
    282305
    283306    array set colors {
    284307        authority blue
    285308        worker gray
     309        foreman red
    286310    }
    287311
    288312    Shape::clear .diagram.network
    289313    Shape::clear .diagram.traffic
     314    .errors.info configure -state normal
     315    .errors.info delete 1.0 end
    290316    set tmax 0
     317    set errs 0
    291318
    292319    #
     
    298325        close $fid
    299326
    300         if {[regexp -- {foreman<-} $info]} {
    301             # skip log file from foreman
     327        set lasttime ""
     328        set t0val ""; set first ""
     329        set t1val ""; set last ""
     330        set info [split $info \n]
     331        foreach line $info {
     332            if {[regexp {^([0-9]+/[0-9]+/[0-9]+ [0-9]+:[0-9]+:[0-9]+)} $line match tval]} {
     333                if {"" == $t0val} {
     334                    set first $line
     335                    set t0val [expr {([clock scan $tval]-$time0)*100}]
     336                } else {
     337                    set last $line
     338                    set t1val [expr {([clock scan $tval]-$time0)*100 + 99}]
     339                }
     340            }
     341        }
     342
     343        if {"" == $t0val || "" == $t1val} {
     344            # can't find any log statements -- skip this file!
    302345            continue
    303346        }
    304347
    305348        # get the address for this host
    306         regexp {started at port ([0-9]+)} $info match port
    307         if {[regexp {options [^\n]+ ip ([^ ]+)} $info match ip]} {
    308             set addr $ip:$port
     349        if {[regexp {started at port ([0-9]+)} $info match port]} {
     350            if {[regexp {options [^\n]+ ip ([^ ]+)} $info match ip]} {
     351                set addr $ip:$port
     352            } else {
     353                set addr 127.0.0.1:$port
     354            }
     355            set shape oval
     356            regexp {^([0-9]+/[0-9]+/[0-9]+ [0-9]+:[0-9]+:[0-9]+) +(authority|worker)} $first match t0 type
     357        } elseif {[regexp -- {foreman<-} $info]} {
     358            set shape rectangle
     359            set addr "foreman"
     360            set type "foreman"
    309361        } else {
    310             set addr 127.0.0.1:$port
    311         }
    312 
    313         set lasttime ""
    314         set info [split $info \n]
    315         set first [lindex $info 0]
    316         regexp {^([0-9]+/[0-9]+/[0-9]+ [0-9]+:[0-9]+:[0-9]+) +(authority|worker)} $first match t0 type
    317         set t0val [expr {([clock scan $t0]-$time0)*100}]
    318 
    319         set last [lindex $info end-1]
    320         regexp {^([0-9]+/[0-9]+/[0-9]+ [0-9]+:[0-9]+:[0-9]+)} $last match t1
    321         set t1val [expr {([clock scan $t1]-$time0)*100 + 99}]
     362            # unknown log file -- skip it
     363            continue
     364        }
    322365        set margin 20
    323366        set r $nodeRadius
     
    337380        foreach canv {.diagram.traffic .diagram.network} {
    338381            set s [Shape ::#auto $canv -command \
    339                 [list %c create oval [expr {$x-$r}] [expr {$y-$r}] \
     382                [list %c create $shape [expr {$x-$r}] [expr {$y-$r}] \
    340383                [expr {$x+$r}] [expr {$y+$r}] \
    341384                -outline black -fill $colors($type) \
     
    359402puts "\nscanning $fname"
    360403
    361         if {[regexp -- {foreman<-} $info]} {
    362             # skip log file from foreman
    363             continue
    364         }
    365 
    366404        catch {unset started}
    367405        set peerlist(addrs) ""
     
    380418                if {$tval > $tmax} { set tmax $tval }
    381419
     420                set cid ""
    382421                if {[regexp {accepted: +([^ ]+) +\((.+)\)} $mesg match addr cid]} {
    383422                    append actions($tval) $mesg \n
     
    386425
    387426                } elseif {[regexp {dropped: +([^ ]+) +\((.+)\)} $mesg match addr cid] && [info exists started(connect$cid-time)]} {
     427                    incr tval 99  ;# end of this second
    388428                    append actions($tval) $mesg \n
    389429                    set from $nodes($fname)
     
    399439                    unset started(connect$cid-addr)
    400440
    401                 } elseif {[regexp {(server|client) message from ([a-zA-Z0-9\.]+:[0-9]+) \(([a-z0-9]+)\): +(.+) => (.*)} $mesg match which addr cid cmd result]} {
    402                     if {![string match identity* $cmd]} {
    403                         append actions($tval) $mesg \n
    404                         set from $nodes($fname)
    405                         set x0 $nodes($from-x)
    406                         set y0 $nodes($from-y)
    407                         set x1 $nodes($addr-x)
    408                         set y1 $nodes($addr-y)
    409                         set w [expr {[winfo width .diagram]/2}]
    410 
    411                         set s [Shape ::#auto .diagram.traffic -command \
    412                             [list %c create line [expr $x0-3] [expr $y0-3] [expr $x1-3] [expr $y1-3] -fill black -arrow first -tags transient]]
    413                         $s addRange $tval $tval
    414 
    415                         set s [Shape ::#auto .diagram.traffic -command \
    416                             [list %c create text [expr {0.5*($x0+$x1)}] [expr {0.5*($y0+$y1)-1}] -width $w -fill black -anchor s -text $cmd -tags transient]]
    417                         $s addRange $tval $tval
    418 
    419                         if {"" != [string trim $result]} {
    420                             if {[regexp {^ok:} $result]} {
    421                                 set color black
    422                             } else {
    423                                 set color red
    424                             }
    425                             set s [Shape ::#auto .diagram.traffic -command \
    426                                 [list %c create line [expr $x0+3] [expr $y0+3] [expr $x1+3] [expr $y1+3] -fill $color -arrow last -tags transient]]
    427                             $s addRange $tval $tval
    428 
    429                             set s [Shape ::#auto .diagram.traffic -command \
    430                                 [list %c create text [expr {0.5*($x0+$x1)}] [expr {0.5*($y0+$y1)+1}] -width $w -fill $color -anchor n -text $result -tags transient]]
    431                             $s addRange $tval $tval
     441                } elseif {[regexp {(incoming) message from ([^ ]+) \((sock[0-9]+)\): +(.+) => (.*)} $mesg match which addr cid cmd result]
     442                       || [regexp {(outgoing) message to ([^ ]+): +(.+)} $mesg match which addr cmd]} {
     443                    switch -- $which {
     444                        outgoing {
     445                            set from $addr
     446                            set to $nodes($fname)
     447                        }
     448                        incoming {
     449                            set from $nodes($fname)
     450                            set to $addr
     451                            # show incoming messages later in time
     452                            incr tval 50
    432453                        }
    433454                    }
     455                    append actions($tval) $mesg \n
     456                    set x0 $nodes($from-x)
     457                    set y0 $nodes($from-y)
     458                    set x1 $nodes($to-x)
     459                    set y1 $nodes($to-y)
     460                    set w [expr {[winfo width .diagram]/2}]
     461
     462                    set s [Shape ::#auto .diagram.traffic -command \
     463                        [list %c create line [expr $x0-3] [expr $y0-3] [expr $x1-3] [expr $y1-3] -fill black -arrow first -tags transient]]
     464                    $s addRange $tval $tval
     465
     466                    set s [Shape ::#auto .diagram.traffic -command \
     467                        [list %c create text [expr {0.5*($x0+$x1)}] [expr {0.5*($y0+$y1)-1}] -width $w -fill black -anchor s -text $cmd -tags transient]]
     468                    $s addRange $tval $tval
     469
     470                    if {$which == "incoming" && "" != [string trim $result]} {
     471                        if {[regexp {^ok:} $result]} {
     472                            set color black
     473                        } else {
     474                            set color red
     475                        }
     476                        set s [Shape ::#auto .diagram.traffic -command \
     477                            [list %c create line [expr $x0+3] [expr $y0+3] [expr $x1+3] [expr $y1+3] -fill $color -arrow last -tags transient]]
     478                        $s addRange $tval $tval
     479
     480                        set s [Shape ::#auto .diagram.traffic -command \
     481                            [list %c create text [expr {0.5*($x0+$x1)}] [expr {0.5*($y0+$y1)+1}] -width $w -fill $color -anchor n -text $result -tags transient]]
     482                        $s addRange $tval $tval
     483                    }
    434484
    435485                    # no address for this client yet?  then save this info
    436                     if {[info exists started(connect$cid-addr)]
     486                    if {"" != $cid
     487                           && [info exists started(connect$cid-addr)]
    437488                           && $started(connect$cid-addr) == "?"} {
    438489                        set started(connect$cid-addr) $addr
     
    466517                    set peerlist(addrs) $plist
    467518                    set peerlist(time) $tval
     519                } elseif {[regexp {ERROR} $mesg match addr]} {
     520                    .errors.info insert end $time timecode $mesg error "\n"
     521                    incr errs
    468522                }
     523                set times($tval) $time
    469524            }
    470525        }
     
    497552            %W itemconfigure $fname-cnx -fill red
    498553            %W raise $fname-cnx
     554            %W itemconfigure entity -text {$nodes($fname)}
    499555        "
    500556        .diagram.traffic bind $fname <Leave> "
     
    502558            %W itemconfigure $fname-cnx -fill gray
    503559            %W raise transient
     560            %W itemconfigure entity -text {}
    504561        "
    505562
     
    537594    }
    538595    .player.scale configure -to $tmax
     596    .errors.info configure -state disabled
     597    if {$errs == 0} {
     598        .player.err configure -state normal -text "0 errors"
     599        .player.err configure -state disabled
     600    } else {
     601        .player.err configure -state normal -text "$errs error[expr {($errs == 1) ? {} : {s}}]"
     602    }
    539603
    540604    after cancel test_visualize
     
    565629
    566630proc test_frame_go {dir position} {
    567     global actions
     631    global actions times
    568632
    569633    set tmax [.player.scale cget -to]
  • branches/blt4/p2p/worker.tcl

    r1273 r2170  
    118118    # ------------------------------------------------------------------
    119119    define solicit {args} {
    120 log debug "SOLICIT from foreman: $args"
    121120        variable cid
    122121        log debug "solicitation request from foreman: $args"
     
    161160    # ------------------------------------------------------------------
    162161    define solicit {args} {
    163 log debug "SOLICIT from peer: $args"
    164162        variable cid
    165163        log debug "solicitation request from peer: $args"
     
    177175    # ------------------------------------------------------------------
    178176    define proffer {token details} {
    179 log debug "PROFFER from peer: $token $details"
    180177        Solicitation::proffer $token $details
    181178        return ""
     
    226223    # ------------------------------------------------------------------
    227224    define solicit {args} {
    228 log debug "SOLICIT from peer: $args"
    229225        variable cid
    230226        log debug "solicitation request from peer: $args"
     
    242238    # ------------------------------------------------------------------
    243239    define proffer {token details} {
    244 log debug "PROFFER from peer: $token $details"
    245240        Solicitation::proffer $token $details
    246241        return ""
     
    636631            set mesg [list solicit -job $job -path $path -avoid "$avoid @RECIPIENTS" -token $_serial]
    637632            set _waitfor [broadcast_to_peers $mesg $avoid]
    638 log debug "WAIT FOR: $_waitfor"
    639633
    640634            if {$_waitfor > 0} {
     
    643637            }
    644638        }
    645 log debug "TIMEOUT: $delay"
    646639        set _timeout [after $delay [itcl::code $this finalize]]
    647640    }
     
    656649        append _response $details "\n"
    657650        if {[incr _waitfor -1] <= 0} {
    658 log debug "ALL RESPONSES"
    659651            finalize
    660652        }
     
    676668        # add details about this client to the message
    677669        append block "$myaddress -job $job -cost 1 -wonks [p2p::wonks::current]"
    678 log debug "FINALIZE {$block}"
    679670
    680671        # send the composite results back to the caller
  • branches/blt4/packages/vizservers/configure.in

    r2120 r2170  
    315315  LD_RPATH="$loader_run_path:${CG_DIR}/lib"
    316316fi
    317 AC_SUBST(LIBS)
     317
    318318AC_SUBST(CG_DIR)
    319319AC_MSG_RESULT([${CG_DIR}])
  • branches/blt4/packages/vizservers/vtkvis/CmdProc.cpp

    r2120 r2170  
    2222 */
    2323static int
    24 BinaryOpSearch(
    25     Rappture::CmdSpec *specs,
    26     int nSpecs,
    27     char *string)       /* Name of minor operation to search for */
     24BinaryOpSearch(Rappture::CmdSpec *specs,
     25               int nSpecs,
     26               char *string)       /* Name of minor operation to search for */
    2827{
    2928    char c;
     
    7776 */
    7877static int
    79 LinearOpSearch(
    80     Rappture::CmdSpec *specs,
    81     int nSpecs,
    82     char *string)       /* Name of minor operation to search for */
     78LinearOpSearch(Rappture::CmdSpec *specs,
     79               int nSpecs,
     80               char *string)       /* Name of minor operation to search for */
    8381{
    8482    Rappture::CmdSpec *specPtr;
     
    9391    last = -1;
    9492    for (specPtr = specs, i = 0; i < nSpecs; i++, specPtr++) {
    95     if ((c == specPtr->name[0]) &&
    96         (strncmp(string, specPtr->name, length) == 0)) {
    97         last = i;
    98         nMatches++;
    99         if ((int)length == specPtr->minChars) {
    100         break;
    101         }
    102     }
     93        if ((c == specPtr->name[0]) &&
     94            (strncmp(string, specPtr->name, length) == 0)) {
     95            last = i;
     96            nMatches++;
     97            if ((int)length == specPtr->minChars) {
     98                break;
     99            }
     100        }
    103101    }
    104102    if (nMatches > 1) {
    105     return -2;      /* Ambiguous operation name */
     103        return -2;      /* Ambiguous operation name */
    106104    }
    107105    if (nMatches == 0) {
    108     return -1;      /* Can't find operation */
     106        return -1;      /* Can't find operation */
    109107    }
    110108    return last;        /* Op found. */
     
    122120 */
    123121Tcl_ObjCmdProc *
    124 Rappture::GetOpFromObj(
    125     Tcl_Interp *interp,                 /* Interpreter to report errors to */
    126     int nSpecs,                         /* Number of specifications in array */
    127     Rappture::CmdSpec *specs,           /* Op specification array */
    128     int operPos,                        /* Position of operation in argument
    129                                          * list. */
    130     int objc,                           /* Number of arguments in the argument
    131                                          * vector.  This includes any prefixed
    132                                          * arguments */
    133     Tcl_Obj *const *objv,               /* Argument vector */
    134     int flags)
     122Rappture::GetOpFromObj(Tcl_Interp *interp,              /* Interpreter to report errors to */
     123                       int nSpecs,                      /* Number of specifications in array */
     124                       Rappture::CmdSpec *specs,        /* Op specification array */
     125                       int operPos,                     /* Position of operation in argument
     126                                                         * list. */
     127                       int objc,                        /* Number of arguments in the argument
     128                                                         * vector.  This includes any prefixed
     129                                                         * arguments */
     130                       Tcl_Obj *const *objv,            /* Argument vector */
     131                       int flags)
    135132{
    136133    CmdSpec *specPtr;
     
    139136
    140137    if (objc <= operPos) {  /* No operation argument */
    141     Tcl_AppendResult(interp, "wrong # args: ", (char *)NULL);
    142       usage:
    143     Tcl_AppendResult(interp, "should be one of...", (char *)NULL);
    144     for (n = 0; n < nSpecs; n++) {
    145         int i;
    146 
    147         Tcl_AppendResult(interp, "\n  ", (char *)NULL);
    148         for (i = 0; i < operPos; i++) {
    149         Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ",
    150              (char *)NULL);
    151         }
    152         specPtr = specs + n;
    153         Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage,
    154         (char *)NULL);
    155     }
    156     return NULL;
     138        Tcl_AppendResult(interp, "wrong # args: ", (char *)NULL);
     139usage:
     140        Tcl_AppendResult(interp, "should be one of...", (char *)NULL);
     141        for (n = 0; n < nSpecs; n++) {
     142            int i;
     143
     144            Tcl_AppendResult(interp, "\n  ", (char *)NULL);
     145            for (i = 0; i < operPos; i++) {
     146                Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ",
     147                                 (char *)NULL);
     148            }
     149            specPtr = specs + n;
     150            Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage,
     151                             (char *)NULL);
     152        }
     153        return NULL;
    157154    }
    158155    string = Tcl_GetString(objv[operPos]);
    159156    if (flags & CMDSPEC_LINEAR_SEARCH) {
    160     n = LinearOpSearch(specs, nSpecs, string);
     157        n = LinearOpSearch(specs, nSpecs, string);
    161158    } else {
    162     n = BinaryOpSearch(specs, nSpecs, string);
     159        n = BinaryOpSearch(specs, nSpecs, string);
    163160    }
    164161    if (n == -2) {
    165     char c;
    166     size_t length;
    167 
    168     Tcl_AppendResult(interp, "ambiguous", (char *)NULL);
    169     if (operPos > 2) {
    170         Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]),
    171         (char *)NULL);
    172     }
    173     Tcl_AppendResult(interp, " operation \"", string, "\" matches: ",
    174         (char *)NULL);
    175 
    176     c = string[0];
    177     length = strlen(string);
    178     for (n = 0; n < nSpecs; n++) {
    179         specPtr = specs + n;
    180         if ((c == specPtr->name[0]) &&
    181         (strncmp(string, specPtr->name, length) == 0)) {
    182         Tcl_AppendResult(interp, " ", specPtr->name, (char *)NULL);
    183         }
    184     }
    185     return NULL;
     162        char c;
     163        size_t length;
     164
     165        Tcl_AppendResult(interp, "ambiguous", (char *)NULL);
     166        if (operPos > 2) {
     167            Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]),
     168                             (char *)NULL);
     169        }
     170        Tcl_AppendResult(interp, " operation \"", string, "\" matches: ",
     171                         (char *)NULL);
     172
     173        c = string[0];
     174        length = strlen(string);
     175        for (n = 0; n < nSpecs; n++) {
     176            specPtr = specs + n;
     177            if ((c == specPtr->name[0]) &&
     178                (strncmp(string, specPtr->name, length) == 0)) {
     179                Tcl_AppendResult(interp, " ", specPtr->name, (char *)NULL);
     180            }
     181        }
     182        return NULL;
    186183
    187184    } else if (n == -1) {   /* Can't find operation, display help */
    188     Tcl_AppendResult(interp, "bad", (char *)NULL);
    189     if (operPos > 2) {
    190         Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]),
    191         (char *)NULL);
    192     }
    193     Tcl_AppendResult(interp, " operation \"", string, "\": ", (char *)NULL);
    194     goto usage;
     185        Tcl_AppendResult(interp, "bad", (char *)NULL);
     186        if (operPos > 2) {
     187            Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]),
     188                             (char *)NULL);
     189        }
     190        Tcl_AppendResult(interp, " operation \"", string, "\": ", (char *)NULL);
     191        goto usage;
    195192    }
    196193    specPtr = specs + n;
    197194    if ((objc < specPtr->minArgs) ||
    198     ((specPtr->maxArgs > 0) && (objc > specPtr->maxArgs))) {
    199     int i;
    200 
    201     Tcl_AppendResult(interp, "wrong # args: should be \"", (char *)NULL);
    202     for (i = 0; i < operPos; i++) {
    203         Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ",
    204         (char *)NULL);
    205     }
    206     Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage, "\"",
    207         (char *)NULL);
    208     return NULL;
     195        ((specPtr->maxArgs > 0) && (objc > specPtr->maxArgs))) {
     196        int i;
     197
     198        Tcl_AppendResult(interp, "wrong # args: should be \"", (char *)NULL);
     199        for (i = 0; i < operPos; i++) {
     200            Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ",
     201                             (char *)NULL);
     202        }
     203        Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage, "\"",
     204                         (char *)NULL);
     205        return NULL;
    209206    }
    210207    return specPtr->proc;
  • branches/blt4/packages/vizservers/vtkvis/CmdProc.h

    r2120 r2170  
    2020 */
    2121typedef struct {
    22     const char *name;           /* Name of operation */
    23     int minChars;               /* Minimum # characters to disambiguate */
     22    const char *name;           /**< Name of operation */
     23    int minChars;               /**< Minimum # characters to disambiguate */
    2424    Tcl_ObjCmdProc *proc;
    25     int minArgs;                /* Minimum # args required */
    26     int maxArgs;                /* Maximum # args required */
    27     const char *usage;          /* Usage message */
     25    int minArgs;                /**< Minimum # args required */
     26    int maxArgs;                /**< Maximum # args required */
     27    const char *usage;          /**< Usage message */
    2828} CmdSpec;
    2929
    3030typedef enum {
    31     CMDSPEC_ARG0,               /* Op is the first argument. */
    32     CMDSPEC_ARG1,               /* Op is the second argument. */
    33     CMDSPEC_ARG2,               /* Op is the third argument. */
    34     CMDSPEC_ARG3,               /* Op is the fourth argument. */
    35     CMDSPEC_ARG4                /* Op is the fifth argument. */
     31    CMDSPEC_ARG0,               /**< Op is the first argument. */
     32    CMDSPEC_ARG1,               /**< Op is the second argument. */
     33    CMDSPEC_ARG2,               /**< Op is the third argument. */
     34    CMDSPEC_ARG3,               /**< Op is the fourth argument. */
     35    CMDSPEC_ARG4                /**< Op is the fifth argument. */
    3636} CmdSpecIndex;
    3737
  • branches/blt4/packages/vizservers/vtkvis/RpContour2D.cpp

    r2120 r2170  
    1111
    1212#include "RpContour2D.h"
     13#include "Trace.h"
    1314
    1415using namespace Rappture::VtkVis;
     
    2728Contour2D::~Contour2D()
    2829{
     30#ifdef WANT_TRACE
     31    if (_dataSet != NULL)
     32        TRACE("Deleting Contour2D for %s", _dataSet->getName().c_str());
     33    else
     34        TRACE("Deleting Contour2D with NULL DataSet");
     35#endif
    2936}
    3037
     
    3845        update();
    3946    }
     47}
     48
     49/**
     50 * \brief Returns the DataSet this Contour2D renders
     51 */
     52DataSet *Contour2D::getDataSet()
     53{
     54    return _dataSet;
    4055}
    4156
     
    5974        _contourActor->GetProperty()->SetLineWidth(_edgeWidth);
    6075        _contourActor->GetProperty()->SetOpacity(_opacity);
     76        _contourActor->GetProperty()->LightingOff();
    6177    }
    6278}
     
    7692    vtkSmartPointer<vtkContourFilter> contourFilter = vtkSmartPointer<vtkContourFilter>::New();
    7793    contourFilter->SetInput(_dataSet->getVtkDataSet());
     94
     95    contourFilter->ComputeNormalsOff();
     96    contourFilter->ComputeGradientsOff();
    7897
    7998    // Speed up multiple contour computation at cost of extra memory use
     
    193212{
    194213    if (_contourMapper != NULL) {
    195         if (planes == NULL)
    196             _contourMapper->RemoveAllClippingPlanes();
    197         else
    198             _contourMapper->SetClippingPlanes(planes);
     214        _contourMapper->SetClippingPlanes(planes);
    199215    }
    200216}
  • branches/blt4/packages/vizservers/vtkvis/RpContour2D.h

    r2120 r2170  
    3030
    3131    void setDataSet(DataSet *dataset);
     32
     33    DataSet *getDataSet();
    3234
    3335    vtkActor *getActor();
  • branches/blt4/packages/vizservers/vtkvis/RpPolyData.cpp

    r2120 r2170  
    3232PolyData::~PolyData()
    3333{
     34#ifdef WANT_TRACE
     35    if (_dataSet != NULL)
     36        TRACE("Deleting PolyData for %s", _dataSet->getName().c_str());
     37    else
     38        TRACE("Deleting PolyData with NULL DataSet");
     39#endif
    3440}
    3541
     
    7985
    8086/**
     87 * \brief Returns the DataSet this PolyData renders
     88 */
     89DataSet *PolyData::getDataSet()
     90{
     91    return _dataSet;
     92}
     93
     94/**
    8195 * \brief Internal method to re-compute contours after a state change
    8296 */
     
    201215{
    202216    if (_pdMapper != NULL) {
    203         if (planes == NULL)
    204             _pdMapper->RemoveAllClippingPlanes();
    205         else
    206             _pdMapper->SetClippingPlanes(planes);
     217        _pdMapper->SetClippingPlanes(planes);
    207218    }
    208219}
  • branches/blt4/packages/vizservers/vtkvis/RpPolyData.h

    r2120 r2170  
    2929
    3030    void setDataSet(DataSet *dataset);
     31
     32    DataSet *getDataSet();
    3133
    3234    vtkActor *getActor();
  • branches/blt4/packages/vizservers/vtkvis/RpPseudoColor.cpp

    r2120 r2170  
    2929PseudoColor::~PseudoColor()
    3030{
     31#ifdef WANT_TRACE
     32    if (_dataSet != NULL)
     33        TRACE("Deleting PseudoColor for %s", _dataSet->getName().c_str());
     34    else
     35        TRACE("Deleting PseudoColor with NULL DataSet");
     36#endif
    3137}
    3238
     
    4046    _dataSet = dataSet;
    4147    update();
     48}
     49
     50/**
     51 * \brief Returns the DataSet this PseudoColor renders
     52 */
     53DataSet *PseudoColor::getDataSet()
     54{
     55    return _dataSet;
    4256}
    4357
     
    8195    _lut->SetRange(dataRange);
    8296
     97    _dsMapper->UseLookupTableScalarRangeOn();
    8398    _dsMapper->SetLookupTable(_lut);
    84     _dsMapper->SetScalarRange(dataRange);
    85     //_dsMapper->GetLookupTable()->SetRange(dataRange);
    8699    //_dsMapper->InterpolateScalarsBeforeMappingOn();
    87100
    88101    initActor();
    89102    _dsActor->SetMapper(_dsMapper);
    90     //_dsActor->GetProperty()->SetRepresentationToWireframe();
    91103}
    92104
     
    149161    }
    150162    if (_dsMapper != NULL) {
     163        _dsMapper->UseLookupTableScalarRangeOn();
    151164        _dsMapper->SetLookupTable(_lut);
    152         if (_dataSet != NULL) {
    153             _dsMapper->SetScalarRange(dataRange);
    154         }
    155165    }
    156166}
     
    230240{
    231241    if (_dsMapper != NULL) {
    232         if (planes == NULL)
    233             _dsMapper->RemoveAllClippingPlanes();
    234         else
    235             _dsMapper->SetClippingPlanes(planes);
     242        _dsMapper->SetClippingPlanes(planes);
    236243    }
    237244}
  • branches/blt4/packages/vizservers/vtkvis/RpPseudoColor.h

    r2120 r2170  
    3131
    3232    void setDataSet(DataSet *dataset);
     33
     34    DataSet *getDataSet();
    3335
    3436    vtkActor *getActor();
  • branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.cpp

    r2120 r2170  
    6969
    7070/**
     71 * \brief Read dataset using supplied reader
     72 */
     73bool DataSet::setData(vtkDataSet *ds)
     74{
     75    _dataSet = ds;
     76    _dataSet->Update();
     77    _dataSet->GetScalarRange(_dataRange);
     78
     79    TRACE("Scalar Range: %.12e, %.12e", _dataRange[0], _dataRange[1]);
     80    return true;
     81}
     82
     83/**
    7184 * \brief Get the name/id of this dataset
    7285 */
     
    97110 *
    98111 * Note: no interpolation is performed on data
     112 *
     113 * \return the value of the nearest point or 0 if no scalar data available
    99114 */
    100115double DataSet::getDataValue(double x, double y, double z)
     
    102117    if (_dataSet == NULL)
    103118        return 0;
     119    if (_dataSet->GetPointData() == NULL ||
     120        _dataSet->GetPointData()->GetScalars() == NULL) {
     121        return 0.0;
     122    }
    104123    vtkIdType pt = _dataSet->FindPoint(x, y, z);
    105124    return _dataSet->GetPointData()->GetScalars()->GetComponent(pt, 0);
  • branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.h

    r2120 r2170  
    2929    bool setData(char *data, int nbytes);
    3030
     31    bool setData(vtkDataSet *ds);
     32
     33    bool setData(vtkDataSetReader *reader);
     34
    3135    bool setDataFile(const char *filename);
    3236
     
    4246    DataSet();
    4347
    44     bool setData(vtkDataSetReader *reader);
    45 
    4648    std::string _name;
    4749    vtkSmartPointer<vtkDataSet> _dataSet;
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.cpp

    r2120 r2170  
    3030
    3131#include "RpVtkRenderer.h"
     32#include "ColorMap.h"
    3233#include "Trace.h"
    3334
     
    3738    _needsRedraw(true),
    3839    _windowWidth(320),
    39     _windowHeight(320)
     40    _windowHeight(320),
     41    _useCumulativeRanges(true)
    4042{
    4143    _bgColor[0] = 0;
    4244    _bgColor[1] = 0;
    4345    _bgColor[2] = 0;
     46    _cumulativeDataRange[0] = 0.0;
     47    _cumulativeDataRange[1] = 1.0;
    4448    // clipping planes to prevent overdrawing axes
    4549    _clippingPlanes = vtkSmartPointer<vtkPlaneCollection>::New();
    4650    // bottom
    47     vtkPlane *plane0 = vtkPlane::New();
     51    vtkSmartPointer<vtkPlane> plane0 = vtkSmartPointer<vtkPlane>::New();
    4852    plane0->SetNormal(0, 1, 0);
    4953    plane0->SetOrigin(0, 0, 0);
    5054    _clippingPlanes->AddItem(plane0);
    5155    // left
    52     vtkPlane *plane1 = vtkPlane::New();
     56    vtkSmartPointer<vtkPlane> plane1 = vtkSmartPointer<vtkPlane>::New();
    5357    plane1->SetNormal(1, 0, 0);
    5458    plane1->SetOrigin(0, 0, 0);
    5559    _clippingPlanes->AddItem(plane1);
    5660   // top
    57     vtkPlane *plane2 = vtkPlane::New();
     61    vtkSmartPointer<vtkPlane> plane2 = vtkSmartPointer<vtkPlane>::New();
    5862    plane2->SetNormal(0, -1, 0);
    5963    plane2->SetOrigin(0, 1, 0);
    6064    _clippingPlanes->AddItem(plane2);
    6165    // right
    62     vtkPlane *plane3 = vtkPlane::New();
     66    vtkSmartPointer<vtkPlane> plane3 = vtkSmartPointer<vtkPlane>::New();
    6367    plane3->SetNormal(-1, 0, 0);
    6468    plane3->SetOrigin(1, 0, 0);
     
    8690    }
    8791    _colorMaps.clear();
    88     for (DataSetHashmap::iterator itr = _dataSets.begin();
    89              itr != _dataSets.end(); ++itr) {
    90         delete itr->second;
    91     }
    92     _dataSets.clear();
    9392    for (PseudoColorHashmap::iterator itr = _pseudoColors.begin();
    9493             itr != _pseudoColors.end(); ++itr) {
     
    106105    }
    107106    _polyDatas.clear();
     107    for (DataSetHashmap::iterator itr = _dataSets.begin();
     108             itr != _dataSets.end(); ++itr) {
     109        delete itr->second;
     110    }
     111    _dataSets.clear();
    108112}
    109113
     
    115119 * be added to the Renderer.
    116120 */
    117 void Renderer::addDataSet(DataSetId id)
     121void Renderer::addDataSet(const DataSetId& id)
    118122{
    119123    if (getDataSet(id) != NULL) {
     
    129133 * The underlying PseudoColor object is deleted, freeing its memory
    130134 */
    131 void Renderer::deletePseudoColor(DataSetId id)
    132 {
    133     PseudoColorHashmap::iterator itr = _pseudoColors.find(id);
     135void Renderer::deletePseudoColor(const DataSetId& id)
     136{
     137    PseudoColorHashmap::iterator itr;
     138
     139    bool doAll = false;
     140
     141    if (id.compare("all") == 0) {
     142        itr = _pseudoColors.begin();
     143        doAll = true;
     144    } else {
     145        itr = _pseudoColors.find(id);
     146    }
    134147    if (itr == _pseudoColors.end()) {
    135148        ERROR("PseudoColor not found: %s", id.c_str());
     
    139152    TRACE("Deleting PseudoColors for %s", id.c_str());
    140153
    141     PseudoColor *ps = itr->second;
    142     if (ps->getActor())
    143         _renderer->RemoveActor(ps->getActor());
    144     delete ps;
    145 
    146     _pseudoColors.erase(itr);
     154    do  {
     155        PseudoColor *ps = itr->second;
     156        if (ps->getActor())
     157            _renderer->RemoveActor(ps->getActor());
     158        delete ps;
     159
     160        _pseudoColors.erase(itr);
     161    } while (doAll && ++itr != _pseudoColors.end());
     162
    147163    _needsRedraw = true;
    148164}
     
    153169 * The underlying Contour2D is deleted, freeing its memory
    154170 */
    155 void Renderer::deleteContour2D(DataSetId id)
    156 {
    157     Contour2DHashmap::iterator itr = _contours.find(id);
     171void Renderer::deleteContour2D(const DataSetId& id)
     172{
     173    Contour2DHashmap::iterator itr;
     174
     175    bool doAll = false;
     176
     177    if (id.compare("all") == 0) {
     178        itr = _contours.begin();
     179        doAll = true;
     180    } else {
     181        itr = _contours.find(id);
     182    }
    158183    if (itr == _contours.end()) {
    159184        ERROR("Contour2D not found: %s", id.c_str());
     
    163188    TRACE("Deleting Contour2Ds for %s", id.c_str());
    164189
    165     Contour2D *contour = itr->second;
    166     if (contour->getActor())
    167         _renderer->RemoveActor(contour->getActor());
    168     delete contour;
    169 
    170     _contours.erase(itr);
     190    do {
     191        Contour2D *contour = itr->second;
     192        if (contour->getActor())
     193            _renderer->RemoveActor(contour->getActor());
     194        delete contour;
     195
     196        _contours.erase(itr);
     197    } while (doAll && ++itr != _contours.end());
     198
    171199    _needsRedraw = true;
    172200}
     
    177205 * The underlying PolyData is deleted, freeing its memory
    178206 */
    179 void Renderer::deletePolyData(DataSetId id)
    180 {
    181     PolyDataHashmap::iterator itr = _polyDatas.find(id);
     207void Renderer::deletePolyData(const DataSetId& id)
     208{
     209    PolyDataHashmap::iterator itr;
     210   
     211    bool doAll = false;
     212
     213    if (id.compare("all") == 0) {
     214        itr = _polyDatas.begin();
     215        doAll = true;
     216    } else {
     217        itr = _polyDatas.find(id);
     218    }
    182219    if (itr == _polyDatas.end()) {
    183220        ERROR("PolyData not found: %s", id.c_str());
     
    187224    TRACE("Deleting PolyDatas for %s", id.c_str());
    188225
    189     PolyData *polyData = itr->second;
    190     if (polyData->getActor())
    191         _renderer->RemoveActor(polyData->getActor());
    192     delete polyData;
    193 
    194     _polyDatas.erase(itr);
     226    do {
     227        PolyData *polyData = itr->second;
     228        if (polyData->getActor())
     229            _renderer->RemoveActor(polyData->getActor());
     230        delete polyData;
     231
     232        _polyDatas.erase(itr);
     233    } while (doAll && ++itr != _polyDatas.end());
     234
    195235    _needsRedraw = true;
    196236}
     
    202242 * objects are deleted, freeing the memory used.
    203243 */
    204 void Renderer::deleteDataSet(DataSetId id)
    205 {
    206     DataSetHashmap::iterator itr = _dataSets.find(id);
     244void Renderer::deleteDataSet(const DataSetId& id)
     245{
     246    DataSetHashmap::iterator itr;
     247
     248    bool doAll = false;
     249
     250    if (id.compare("all") == 0) {
     251        itr = _dataSets.begin();
     252        doAll = true;
     253    } else {
     254        itr = _dataSets.find(id);
     255    }
    207256    if (itr == _dataSets.end()) {
    208257        ERROR("Unknown dataset %s", id.c_str());
    209258        return;
    210     } else {
    211         TRACE("Deleting dataset %s", id.c_str());
    212 
    213         deletePseudoColor(id);
    214         deleteContour2D(id);
    215         deletePolyData(id);
    216        
     259    }
     260
     261    do {
     262        TRACE("Deleting dataset %s", itr->second->getName().c_str());
     263
     264        deletePseudoColor(itr->second->getName());
     265        deleteContour2D(itr->second->getName());
     266        deletePolyData(itr->second->getName());
     267   
    217268        TRACE("After deleting graphics objects");
     269
     270        // Update cumulative data range
     271        collectDataRanges(_cumulativeDataRange);
    218272
    219273        delete itr->second;
    220274        _dataSets.erase(itr);
    221          _needsRedraw = true;
    222     }
     275    } while (doAll && ++itr != _dataSets.end());
     276
     277    _needsRedraw = true;
    223278}
    224279
     
    228283 * \return A pointer to the DataSet, or NULL if not found
    229284 */
    230 DataSet *Renderer::getDataSet(DataSetId id)
     285DataSet *Renderer::getDataSet(const DataSetId& id)
    231286{
    232287    DataSetHashmap::iterator itr = _dataSets.find(id);
     
    241296 * \brief (Re-)load the data for the specified DataSet key from a file
    242297 */
    243 bool Renderer::setDataFile(DataSetId id, const char *filename)
     298bool Renderer::setDataFile(const DataSetId& id, const char *filename)
    244299{
    245300    DataSet *ds = getDataSet(id);
    246301    if (ds) {
    247302        bool ret = ds->setDataFile(filename);
    248         PseudoColor *ps = getPseudoColor(id);
    249         if (ps) {
    250             ps->setDataSet(ds);
    251         }
     303        collectDataRanges(_cumulativeDataRange);
     304        updateRanges(_useCumulativeRanges);
    252305        _needsRedraw = true;
    253306        return ret;
     
    259312 * \brief (Re-)load the data for the specified DataSet key from a memory buffer
    260313 */
    261 bool Renderer::setData(DataSetId id, char *data, int nbytes)
     314bool Renderer::setData(const DataSetId& id, char *data, int nbytes)
    262315{
    263316    DataSet *ds = getDataSet(id);
    264317    if (ds) {
     318        bool ret = ds->setData(data, nbytes);
     319        collectDataRanges(_cumulativeDataRange);
     320        updateRanges(_useCumulativeRanges);
    265321        _needsRedraw = true;
    266         return ds->setData(data, nbytes);
     322        return ret;
    267323    } else
    268324        return false;
     
    521577 * \brief Add a color map for use in the Renderer
    522578 */
    523 void Renderer::addColorMap(ColorMapId id, ColorMap *colorMap)
     579void Renderer::addColorMap(const ColorMapId& id, ColorMap *colorMap)
    524580{
    525581    if (colorMap != NULL) {
     
    538594 * \brief Return the ColorMap associated with the colormap key given
    539595 */
    540 ColorMap *Renderer::getColorMap(ColorMapId id)
     596ColorMap *Renderer::getColorMap(const ColorMapId& id)
    541597{
    542598    ColorMapHashmap::iterator itr = _colorMaps.find(id);
     
    554610 * by any other objects
    555611 */
    556 void Renderer::deleteColorMap(ColorMapId id)
    557 {
    558     ColorMapHashmap::iterator itr = _colorMaps.find(id);
    559     if (itr == _colorMaps.end())
    560         return;
    561 
    562     // TODO: Check if color map is used in PseudoColors?
    563     delete itr->second;
    564     _colorMaps.erase(itr);
     612void Renderer::deleteColorMap(const ColorMapId& id)
     613{
     614    ColorMapHashmap::iterator itr;
     615
     616    bool doAll = false;
     617
     618    if (id.compare("all") == 0) {
     619        itr = _colorMaps.begin();
     620        doAll = true;
     621    } else {
     622        itr = _colorMaps.find(id);
     623    }
     624
     625    if (itr == _colorMaps.end()) {
     626        ERROR("Unknown ColorMap %s", id.c_str());
     627        return;
     628    }
     629
     630    do {
     631        TRACE("Deleting ColorMap %s", itr->second->getName().c_str());
     632
     633        // TODO: Check if color map is used in PseudoColors?
     634        delete itr->second;
     635        _colorMaps.erase(itr);
     636    } while (doAll && ++itr != _colorMaps.end());
    565637}
    566638
     
    568640 * \brief Render a labelled legend image for the given colormap
    569641 *
    570  * \return The image is rendered into the supplied array
    571  */
    572 void Renderer::renderColorMap(ColorMapId id, const char *title,
     642 * \return The image is rendered into the supplied array, false is
     643 * returned if the color map is not found
     644 */
     645bool Renderer::renderColorMap(const ColorMapId& id,
     646                              const DataSetId& dataSetID,
     647                              const char *title,
    573648                              int width, int height,
    574649                              vtkUnsignedCharArray *imgData)
    575650{
     651    ColorMap *colorMap = getColorMap(id);
     652    if (colorMap == NULL)
     653        return false;
     654
    576655    if (_legendRenderWindow == NULL) {
    577656        _legendRenderWindow = vtkSmartPointer<vtkRenderWindow>::New();
     
    593672        _legendRenderer->AddActor(_scalarBarActor);
    594673    }
    595     _scalarBarActor->SetLookupTable(getColorMap(id)->getLookupTable());
     674
     675    vtkSmartPointer<vtkLookupTable> lut = colorMap->getLookupTable();
     676    if (dataSetID.compare("all") == 0) {
     677        lut->SetRange(_cumulativeDataRange);
     678    } else {
     679        DataSet *dataSet = getDataSet(dataSetID);
     680        if (dataSet == NULL) {
     681            lut->SetRange(_cumulativeDataRange);
     682        } else {
     683            double range[2];
     684            dataSet->getDataRange(range);
     685            lut->SetRange(range);
     686        }
     687    }
     688    _scalarBarActor->SetLookupTable(lut);
     689
    596690    // Set viewport-relative width/height/pos
    597691    if (width > height) {
     
    615709
    616710    _legendRenderWindow->GetPixelData(0, 0, width-1, height-1, 1, imgData);
     711    return true;
    617712}
    618713
     
    620715 * \brief Create a new PseudoColor rendering for the specified DataSet
    621716 */
    622 void Renderer::addPseudoColor(DataSetId id)
    623 {
    624     DataSet *ds = getDataSet(id);
    625     if (ds == NULL)
    626         return;
    627 
    628     if (getPseudoColor(id)) {
    629         WARN("Replacing existing pseudocolor %s", id.c_str());
    630         deletePseudoColor(id);
    631     }
    632     PseudoColor *pc = new PseudoColor();
    633     _pseudoColors[id] = pc;
    634 
    635     pc->setDataSet(ds);
    636 
    637     _renderer->AddActor(pc->getActor());
     717void Renderer::addPseudoColor(const DataSetId& id)
     718{
     719    DataSetHashmap::iterator itr;
     720
     721    bool doAll = false;
     722
     723    if (id.compare("all") == 0) {
     724        itr = _dataSets.begin();
     725    } else {
     726        itr = _dataSets.find(id);
     727    }
     728    if (itr == _dataSets.end()) {
     729        ERROR("Unknown dataset %s", id.c_str());
     730        return;
     731    }
     732
     733    do {
     734        DataSet *ds = itr->second;
     735        const DataSetId& dsID = ds->getName();
     736
     737        if (getPseudoColor(dsID)) {
     738            WARN("Replacing existing pseudocolor %s", dsID.c_str());
     739            deletePseudoColor(dsID);
     740        }
     741        PseudoColor *pc = new PseudoColor();
     742        _pseudoColors[dsID] = pc;
     743
     744        pc->setDataSet(ds);
     745
     746        _renderer->AddActor(pc->getActor());
     747    } while (doAll && ++itr != _dataSets.end());
    638748
    639749    initCamera();
     
    644754 * \brief Get the PseudoColor associated with the specified DataSet
    645755 */
    646 PseudoColor *Renderer::getPseudoColor(DataSetId id)
     756PseudoColor *Renderer::getPseudoColor(const DataSetId& id)
    647757{
    648758    PseudoColorHashmap::iterator itr = _pseudoColors.find(id);
     
    658768 * \brief Associate an existing named color map with a DataSet
    659769 */
    660 void Renderer::setPseudoColorColorMap(DataSetId id, ColorMapId colorMapId)
    661 {
    662     PseudoColor *pc = getPseudoColor(id);
    663     if (pc) {
    664         ColorMap *cmap = getColorMap(colorMapId);
    665         if (cmap) {
    666             TRACE("Set color map: %s for dataset %s", colorMapId.c_str(),
    667                   id.c_str());
    668             pc->setLookupTable(cmap->getLookupTable());
    669              _needsRedraw = true;
    670         } else {
    671             ERROR("Unknown colormap: %s", colorMapId.c_str());
    672         }
    673     } else {
    674         ERROR("No pseudocolor for dataset %s", id.c_str());
    675     }
     770void Renderer::setPseudoColorColorMap(const DataSetId& id, const ColorMapId& colorMapId)
     771{
     772    PseudoColorHashmap::iterator itr;
     773
     774    bool doAll = false;
     775
     776    if (id.compare("all") == 0) {
     777        itr = _pseudoColors.begin();
     778        doAll = true;
     779    } else {
     780        itr = _pseudoColors.find(id);
     781    }
     782
     783    if (itr == _pseudoColors.end()) {
     784        ERROR("PseudoColor not found: %s", id.c_str());
     785        return;
     786    }
     787
     788    ColorMap *cmap = getColorMap(colorMapId);
     789    if (cmap == NULL) {
     790        ERROR("Unknown colormap: %s", colorMapId.c_str());
     791        return;
     792    }
     793
     794    do {
     795        TRACE("Set color map: %s for dataset %s", colorMapId.c_str(),
     796              itr->second->getDataSet()->getName().c_str());
     797
     798        // Make a copy of the generic colormap lookup table, so
     799        // data range can be set in the copy table to match the
     800        // dataset being plotted
     801        vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
     802        lut->DeepCopy(cmap->getLookupTable());
     803
     804        itr->second->setLookupTable(lut);
     805    } while (doAll && ++itr != _pseudoColors.end());
     806
     807    _needsRedraw = true;
    676808}
    677809
     
    681813 * \return The associated lookup table or NULL if not found
    682814 */
    683 vtkLookupTable *Renderer::getPseudoColorColorMap(DataSetId id)
     815vtkLookupTable *Renderer::getPseudoColorColorMap(const DataSetId& id)
    684816{
    685817    PseudoColor *pc = getPseudoColor(id);
     
    691823
    692824/**
     825 * \brief Set opacity of the PseudoColor for the given DataSet
     826 */
     827void Renderer::setPseudoColorOpacity(const DataSetId& id, double opacity)
     828{
     829    PseudoColorHashmap::iterator itr;
     830
     831    bool doAll = false;
     832
     833    if (id.compare("all") == 0) {
     834        itr = _pseudoColors.begin();
     835        doAll = true;
     836    } else {
     837        itr = _pseudoColors.find(id);
     838    }
     839
     840    if (itr == _pseudoColors.end()) {
     841        ERROR("PseudoColor not found: %s", id.c_str());
     842        return;
     843    }
     844
     845    do {
     846        itr->second->setOpacity(opacity);
     847    } while (doAll && ++itr != _pseudoColors.end());
     848
     849    _needsRedraw = true;
     850}
     851
     852/**
    693853 * \brief Turn on/off rendering of the PseudoColor mapper for the given DataSet
    694854 */
    695 void Renderer::setPseudoColorVisibility(DataSetId id, bool state)
    696 {
    697     PseudoColor *pc = getPseudoColor(id);
    698     if (pc) {
    699         pc->setVisibility(state);
    700         _needsRedraw = true;
    701     }
     855void Renderer::setPseudoColorVisibility(const DataSetId& id, bool state)
     856{
     857    PseudoColorHashmap::iterator itr;
     858
     859    bool doAll = false;
     860
     861    if (id.compare("all") == 0) {
     862        itr = _pseudoColors.begin();
     863        doAll = true;
     864    } else {
     865        itr = _pseudoColors.find(id);
     866    }
     867
     868    if (itr == _pseudoColors.end()) {
     869        ERROR("PseudoColor not found: %s", id.c_str());
     870        return;
     871    }
     872
     873    do {
     874        itr->second->setVisibility(state);
     875    } while (doAll && ++itr != _pseudoColors.end());
     876
     877    _needsRedraw = true;
    702878}
    703879
     
    705881 * \brief Set the visibility of polygon edges for the specified DataSet
    706882 */
    707 void Renderer::setPseudoColorEdgeVisibility(DataSetId id, bool state)
    708 {
    709     PseudoColor *pc = getPseudoColor(id);
    710     if (pc) {
    711         pc->setEdgeVisibility(state);
    712         _needsRedraw = true;
    713     }
     883void Renderer::setPseudoColorEdgeVisibility(const DataSetId& id, bool state)
     884{
     885    PseudoColorHashmap::iterator itr;
     886
     887    bool doAll = false;
     888
     889    if (id.compare("all") == 0) {
     890        itr = _pseudoColors.begin();
     891        doAll = true;
     892    } else {
     893        itr = _pseudoColors.find(id);
     894    }
     895
     896    if (itr == _pseudoColors.end()) {
     897        ERROR("PseudoColor not found: %s", id.c_str());
     898        return;
     899    }
     900
     901    do {
     902        itr->second->setEdgeVisibility(state);
     903    } while (doAll && ++itr != _pseudoColors.end());
     904
     905    _needsRedraw = true;
    714906}
    715907
     
    717909 * \brief Set the RGB polygon edge color for the specified DataSet
    718910 */
    719 void Renderer::setPseudoColorEdgeColor(DataSetId id, float color[3])
    720 {
    721     PseudoColor *pc = getPseudoColor(id);
    722     if (pc) {
    723         pc->setEdgeColor(color);
    724         _needsRedraw = true;
    725     }
     911void Renderer::setPseudoColorEdgeColor(const DataSetId& id, float color[3])
     912{
     913    PseudoColorHashmap::iterator itr;
     914
     915    bool doAll = false;
     916
     917    if (id.compare("all") == 0) {
     918        itr = _pseudoColors.begin();
     919        doAll = true;
     920    } else {
     921        itr = _pseudoColors.find(id);
     922    }
     923
     924    if (itr == _pseudoColors.end()) {
     925        ERROR("PseudoColor not found: %s", id.c_str());
     926        return;
     927    }
     928
     929    do {
     930        itr->second->setEdgeColor(color);
     931    } while (doAll && ++itr != _pseudoColors.end());
     932
     933    _needsRedraw = true;
    726934}
    727935
     
    732940 * this function may not have an effect.
    733941 */
    734 void Renderer::setPseudoColorEdgeWidth(DataSetId id, float edgeWidth)
    735 {
    736     PseudoColor *pc = getPseudoColor(id);
    737     if (pc) {
    738         pc->setEdgeWidth(edgeWidth);
    739         _needsRedraw = true;
    740     }
     942void Renderer::setPseudoColorEdgeWidth(const DataSetId& id, float edgeWidth)
     943{
     944    PseudoColorHashmap::iterator itr;
     945
     946    bool doAll = false;
     947
     948    if (id.compare("all") == 0) {
     949        itr = _pseudoColors.begin();
     950        doAll = true;
     951    } else {
     952        itr = _pseudoColors.find(id);
     953    }
     954
     955    if (itr == _pseudoColors.end()) {
     956        ERROR("PseudoColor not found: %s", id.c_str());
     957        return;
     958    }
     959
     960    do {
     961        itr->second->setEdgeWidth(edgeWidth);
     962    } while (doAll && ++itr != _pseudoColors.end());
     963
     964    _needsRedraw = true;
    741965}
    742966
     
    744968 * \brief Turn mesh lighting on/off for the specified DataSet
    745969 */
    746 void Renderer::setPseudoColorLighting(DataSetId id, bool state)
    747 {
    748     PseudoColor *pc = getPseudoColor(id);
    749     if (pc) {
    750         pc->setLighting(state);
    751         _needsRedraw = true;
    752     }
     970void Renderer::setPseudoColorLighting(const DataSetId& id, bool state)
     971{
     972    PseudoColorHashmap::iterator itr;
     973
     974    bool doAll = false;
     975
     976    if (id.compare("all") == 0) {
     977        itr = _pseudoColors.begin();
     978        doAll = true;
     979    } else {
     980        itr = _pseudoColors.find(id);
     981    }
     982
     983    if (itr == _pseudoColors.end()) {
     984        ERROR("PseudoColor not found: %s", id.c_str());
     985        return;
     986    }
     987
     988    do {
     989        itr->second->setLighting(state);
     990    } while (doAll && ++itr != _pseudoColors.end());
     991
     992    _needsRedraw = true;
    753993}
    754994
     
    756996 * \brief Create a new Contour2D and associate it with the named DataSet
    757997 */
    758 void Renderer::addContour2D(DataSetId id)
    759 {
    760     DataSet *ds = getDataSet(id);
    761     if (ds == NULL)
    762         return;
    763 
    764     if (getContour2D(id)) {
    765         WARN("Replacing existing contour2d %s", id.c_str());
    766         deleteContour2D(id);
    767     }
    768 
    769     Contour2D *contour = new Contour2D();
    770     _contours[id] = contour;
    771 
    772     contour->setDataSet(ds);
    773 
    774     _renderer->AddActor(contour->getActor());
     998void Renderer::addContour2D(const DataSetId& id)
     999{
     1000    DataSetHashmap::iterator itr;
     1001
     1002    bool doAll = false;
     1003
     1004    if (id.compare("all") == 0) {
     1005        itr = _dataSets.begin();
     1006    } else {
     1007        itr = _dataSets.find(id);
     1008    }
     1009    if (itr == _dataSets.end()) {
     1010        ERROR("Unknown dataset %s", id.c_str());
     1011        return;
     1012    }
     1013
     1014    do {
     1015        DataSet *ds = itr->second;
     1016        const DataSetId& dsID = ds->getName();
     1017
     1018        if (getContour2D(dsID)) {
     1019            WARN("Replacing existing contour2d %s", dsID.c_str());
     1020            deleteContour2D(dsID);
     1021        }
     1022
     1023        Contour2D *contour = new Contour2D();
     1024        _contours[dsID] = contour;
     1025
     1026        contour->setDataSet(ds);
     1027
     1028        _renderer->AddActor(contour->getActor());
     1029    } while (doAll && ++itr != _dataSets.end());
    7751030
    7761031    initCamera();
     
    7811036 * \brief Get the Contour2D associated with a named DataSet
    7821037 */
    783 Contour2D *Renderer::getContour2D(DataSetId id)
     1038Contour2D *Renderer::getContour2D(const DataSetId& id)
    7841039{
    7851040    Contour2DHashmap::iterator itr = _contours.find(id);
     
    7951050 * \brief Set the number of equally spaced contour isolines for the given DataSet
    7961051 */
    797 void Renderer::setContours(DataSetId id, int numContours)
    798 {
    799     Contour2D *contour = getContour2D(id);
    800     if (contour) {
    801         contour->setContours(numContours);
    802         _needsRedraw = true;
    803     }
     1052void Renderer::setContours(const DataSetId& id, int numContours)
     1053{
     1054    Contour2DHashmap::iterator itr;
     1055
     1056    bool doAll = false;
     1057
     1058    if (id.compare("all") == 0) {
     1059        itr = _contours.begin();
     1060        doAll = true;
     1061    } else {
     1062        itr = _contours.find(id);
     1063    }
     1064    if (itr == _contours.end()) {
     1065        ERROR("Contour2D not found: %s", id.c_str());
     1066        return;
     1067    }
     1068
     1069    do {
     1070        itr->second->setContours(numContours);
     1071    } while (doAll && ++itr != _contours.end());
     1072
     1073    _needsRedraw = true;
    8041074}
    8051075
     
    8071077 * \brief Set a list of isovalues for the given DataSet
    8081078 */
    809 void Renderer::setContourList(DataSetId id, const std::vector<double>& contours)
    810 {
    811     Contour2D *contour = getContour2D(id);
    812     if (contour) {
    813         contour->setContourList(contours);
    814         _needsRedraw = true;
    815     }
     1079void Renderer::setContourList(const DataSetId& id, const std::vector<double>& contours)
     1080{
     1081    Contour2DHashmap::iterator itr;
     1082
     1083    bool doAll = false;
     1084
     1085    if (id.compare("all") == 0) {
     1086        itr = _contours.begin();
     1087        doAll = true;
     1088    } else {
     1089        itr = _contours.find(id);
     1090    }
     1091    if (itr == _contours.end()) {
     1092        ERROR("Contour2D not found: %s", id.c_str());
     1093        return;
     1094    }
     1095
     1096    do {
     1097        itr->second->setContourList(contours);
     1098    } while (doAll && ++itr != _contours.end());
     1099
     1100     _needsRedraw = true;
     1101}
     1102
     1103/**
     1104 * \brief Set opacity of contour lines for the given DataSet
     1105 */
     1106void Renderer::setContourOpacity(const DataSetId& id, double opacity)
     1107{
     1108    Contour2DHashmap::iterator itr;
     1109
     1110    bool doAll = false;
     1111
     1112    if (id.compare("all") == 0) {
     1113        itr = _contours.begin();
     1114        doAll = true;
     1115    } else {
     1116        itr = _contours.find(id);
     1117    }
     1118    if (itr == _contours.end()) {
     1119        ERROR("Contour2D not found: %s", id.c_str());
     1120        return;
     1121    }
     1122
     1123    do {
     1124        itr->second->setOpacity(opacity);
     1125    } while (doAll && ++itr != _contours.end());
     1126
     1127    _needsRedraw = true;
    8161128}
    8171129
     
    8191131 * \brief Turn on/off rendering contour lines for the given DataSet
    8201132 */
    821 void Renderer::setContourVisibility(DataSetId id, bool state)
    822 {
    823     Contour2D *contour = getContour2D(id);
    824     if (contour) {
    825         contour->setVisibility(state);
    826         _needsRedraw = true;
    827     }
     1133void Renderer::setContourVisibility(const DataSetId& id, bool state)
     1134{
     1135    Contour2DHashmap::iterator itr;
     1136
     1137    bool doAll = false;
     1138
     1139    if (id.compare("all") == 0) {
     1140        itr = _contours.begin();
     1141        doAll = true;
     1142    } else {
     1143        itr = _contours.find(id);
     1144    }
     1145    if (itr == _contours.end()) {
     1146        ERROR("Contour2D not found: %s", id.c_str());
     1147        return;
     1148    }
     1149
     1150    do {
     1151        itr->second->setVisibility(state);
     1152    } while (doAll && ++itr != _contours.end());
     1153
     1154    _needsRedraw = true;
    8281155}
    8291156
     
    8311158 * \brief Set the RGB isoline color for the specified DataSet
    8321159 */
    833 void Renderer::setContourEdgeColor(DataSetId id, float color[3])
    834 {
    835     Contour2D *contour = getContour2D(id);
    836     if (contour) {
    837         contour->setEdgeColor(color);
    838         _needsRedraw = true;
    839     }
     1160void Renderer::setContourEdgeColor(const DataSetId& id, float color[3])
     1161{
     1162    Contour2DHashmap::iterator itr;
     1163
     1164    bool doAll = false;
     1165
     1166    if (id.compare("all") == 0) {
     1167        itr = _contours.begin();
     1168        doAll = true;
     1169    } else {
     1170        itr = _contours.find(id);
     1171    }
     1172    if (itr == _contours.end()) {
     1173        ERROR("Contour2D not found: %s", id.c_str());
     1174        return;
     1175    }
     1176
     1177    do {
     1178        itr->second->setEdgeColor(color);
     1179    } while (doAll && ++itr != _contours.end());
     1180
     1181    _needsRedraw = true;
    8401182}
    8411183
     
    8461188 * this function may not have an effect.
    8471189 */
    848 void Renderer::setContourEdgeWidth(DataSetId id, float edgeWidth)
    849 {
    850     Contour2D *contour = getContour2D(id);
    851     if (contour) {
    852         contour->setEdgeWidth(edgeWidth);
    853         _needsRedraw = true;
    854     }
     1190void Renderer::setContourEdgeWidth(const DataSetId& id, float edgeWidth)
     1191{
     1192    Contour2DHashmap::iterator itr;
     1193
     1194    bool doAll = false;
     1195
     1196    if (id.compare("all") == 0) {
     1197        itr = _contours.begin();
     1198        doAll = true;
     1199    } else {
     1200        itr = _contours.find(id);
     1201    }
     1202    if (itr == _contours.end()) {
     1203        ERROR("Contour2D not found: %s", id.c_str());
     1204        return;
     1205    }
     1206
     1207    do {
     1208        itr->second->setEdgeWidth(edgeWidth);
     1209    } while (doAll && ++itr != _contours.end());
     1210
     1211    _needsRedraw = true;
    8551212}
    8561213
     
    8581215 * \brief Turn contour lighting on/off for the specified DataSet
    8591216 */
    860 void Renderer::setContourLighting(DataSetId id, bool state)
    861 {
    862     Contour2D *contour = getContour2D(id);
    863     if (contour) {
    864         contour->setLighting(state);
    865         _needsRedraw = true;
    866     }
     1217void Renderer::setContourLighting(const DataSetId& id, bool state)
     1218{
     1219    Contour2DHashmap::iterator itr;
     1220
     1221    bool doAll = false;
     1222
     1223    if (id.compare("all") == 0) {
     1224        itr = _contours.begin();
     1225        doAll = true;
     1226    } else {
     1227        itr = _contours.find(id);
     1228    }
     1229    if (itr == _contours.end()) {
     1230        ERROR("Contour2D not found: %s", id.c_str());
     1231        return;
     1232    }
     1233
     1234    do {
     1235        itr->second->setLighting(state);
     1236    } while (doAll && ++itr != _contours.end());
     1237    _needsRedraw = true;
    8671238}
    8681239
     
    8701241 * \brief Create a new PolyData and associate it with the named DataSet
    8711242 */
    872 void Renderer::addPolyData(DataSetId id)
    873 {
    874     DataSet *ds = getDataSet(id);
    875     if (ds == NULL)
    876         return;
    877 
    878     if (getPolyData(id)) {
    879         WARN("Replacing existing polydata %s", id.c_str());
    880         deletePolyData(id);
    881     }
    882 
    883     PolyData *polyData = new PolyData();
    884     _polyDatas[id] = polyData;
    885 
    886     polyData->setDataSet(ds);
    887 
    888     _renderer->AddActor(polyData->getActor());
     1243void Renderer::addPolyData(const DataSetId& id)
     1244{
     1245    DataSetHashmap::iterator itr;
     1246
     1247    bool doAll = false;
     1248
     1249    if (id.compare("all") == 0) {
     1250        itr = _dataSets.begin();
     1251    } else {
     1252        itr = _dataSets.find(id);
     1253    }
     1254    if (itr == _dataSets.end()) {
     1255        ERROR("Unknown dataset %s", id.c_str());
     1256        return;
     1257    }
     1258
     1259    do {
     1260        DataSet *ds = itr->second;
     1261        const DataSetId& dsID = ds->getName();
     1262
     1263        if (getPolyData(dsID)) {
     1264            WARN("Replacing existing polydata %s", dsID.c_str());
     1265            deletePolyData(dsID);
     1266        }
     1267
     1268        PolyData *polyData = new PolyData();
     1269        _polyDatas[dsID] = polyData;
     1270
     1271        polyData->setDataSet(ds);
     1272
     1273        _renderer->AddActor(polyData->getActor());
     1274    } while (doAll && ++itr != _dataSets.end());
    8891275
    8901276    if (_cameraMode == IMAGE)
     
    8971283 * \brief Get the PolyData associated with a named DataSet
    8981284 */
    899 PolyData *Renderer::getPolyData(DataSetId id)
     1285PolyData *Renderer::getPolyData(const DataSetId& id)
    9001286{
    9011287    PolyDataHashmap::iterator itr = _polyDatas.find(id);
     
    9091295
    9101296/**
     1297 * \brief Set opacity of the PolyData for the given DataSet
     1298 */
     1299void Renderer::setPolyDataOpacity(const DataSetId& id, double opacity)
     1300{
     1301    PolyDataHashmap::iterator itr;
     1302   
     1303    bool doAll = false;
     1304
     1305    if (id.compare("all") == 0) {
     1306        itr = _polyDatas.begin();
     1307        doAll = true;
     1308    } else {
     1309        itr = _polyDatas.find(id);
     1310    }
     1311    if (itr == _polyDatas.end()) {
     1312        ERROR("PolyData not found: %s", id.c_str());
     1313        return;
     1314    }
     1315
     1316    do {
     1317        itr->second->setOpacity(opacity);
     1318    } while (doAll && ++itr != _polyDatas.end());
     1319
     1320    _needsRedraw = true;
     1321}
     1322
     1323/**
    9111324 * \brief Turn on/off rendering of the PolyData mapper for the given DataSet
    9121325 */
    913 void Renderer::setPolyDataVisibility(DataSetId id, bool state)
    914 {
    915     PolyData *polyData = getPolyData(id);
    916     if (polyData) {
    917         polyData->setVisibility(state);
    918         _needsRedraw = true;
    919     }
     1326void Renderer::setPolyDataVisibility(const DataSetId& id, bool state)
     1327{
     1328    PolyDataHashmap::iterator itr;
     1329   
     1330    bool doAll = false;
     1331
     1332    if (id.compare("all") == 0) {
     1333        itr = _polyDatas.begin();
     1334        doAll = true;
     1335    } else {
     1336        itr = _polyDatas.find(id);
     1337    }
     1338    if (itr == _polyDatas.end()) {
     1339        ERROR("PolyData not found: %s", id.c_str());
     1340        return;
     1341    }
     1342
     1343    do {
     1344        itr->second->setVisibility(state);
     1345    } while (doAll && ++itr != _polyDatas.end());
     1346
     1347    _needsRedraw = true;
    9201348}
    9211349
     
    9231351 * \brief Set the RGB polygon face color for the specified DataSet
    9241352 */
    925 void Renderer::setPolyDataColor(DataSetId id, float color[3])
    926 {
    927     PolyData *polyData = getPolyData(id);
    928     if (polyData) {
    929         polyData->setColor(color);
    930         _needsRedraw = true;
    931     }
     1353void Renderer::setPolyDataColor(const DataSetId& id, float color[3])
     1354{
     1355    PolyDataHashmap::iterator itr;
     1356   
     1357    bool doAll = false;
     1358
     1359    if (id.compare("all") == 0) {
     1360        itr = _polyDatas.begin();
     1361        doAll = true;
     1362    } else {
     1363        itr = _polyDatas.find(id);
     1364    }
     1365    if (itr == _polyDatas.end()) {
     1366        ERROR("PolyData not found: %s", id.c_str());
     1367        return;
     1368    }
     1369
     1370    do {
     1371        itr->second->setColor(color);
     1372    } while (doAll && ++itr != _polyDatas.end());
     1373    _needsRedraw = true;
    9321374}
    9331375
     
    9351377 * \brief Set the visibility of polygon edges for the specified DataSet
    9361378 */
    937 void Renderer::setPolyDataEdgeVisibility(DataSetId id, bool state)
    938 {
    939     PolyData *polyData = getPolyData(id);
    940     if (polyData) {
    941         polyData->setEdgeVisibility(state);
    942         _needsRedraw = true;
    943     }
     1379void Renderer::setPolyDataEdgeVisibility(const DataSetId& id, bool state)
     1380{
     1381    PolyDataHashmap::iterator itr;
     1382   
     1383    bool doAll = false;
     1384
     1385    if (id.compare("all") == 0) {
     1386        itr = _polyDatas.begin();
     1387        doAll = true;
     1388    } else {
     1389        itr = _polyDatas.find(id);
     1390    }
     1391    if (itr == _polyDatas.end()) {
     1392        ERROR("PolyData not found: %s", id.c_str());
     1393        return;
     1394    }
     1395
     1396    do {
     1397        itr->second->setEdgeVisibility(state);
     1398    } while (doAll && ++itr != _polyDatas.end());
     1399
     1400    _needsRedraw = true;
    9441401}
    9451402
     
    9471404 * \brief Set the RGB polygon edge color for the specified DataSet
    9481405 */
    949 void Renderer::setPolyDataEdgeColor(DataSetId id, float color[3])
    950 {
    951     PolyData *polyData = getPolyData(id);
    952     if (polyData) {
    953         polyData->setEdgeColor(color);
    954         _needsRedraw = true;
    955     }
     1406void Renderer::setPolyDataEdgeColor(const DataSetId& id, float color[3])
     1407{
     1408    PolyDataHashmap::iterator itr;
     1409   
     1410    bool doAll = false;
     1411
     1412    if (id.compare("all") == 0) {
     1413        itr = _polyDatas.begin();
     1414        doAll = true;
     1415    } else {
     1416        itr = _polyDatas.find(id);
     1417    }
     1418    if (itr == _polyDatas.end()) {
     1419        ERROR("PolyData not found: %s", id.c_str());
     1420        return;
     1421    }
     1422
     1423    do {
     1424        itr->second->setEdgeColor(color);
     1425    } while (doAll && ++itr != _polyDatas.end());
     1426
     1427    _needsRedraw = true;
    9561428}
    9571429
     
    9621434 * this function may not have an effect.
    9631435 */
    964 void Renderer::setPolyDataEdgeWidth(DataSetId id, float edgeWidth)
    965 {
    966     PolyData *polyData = getPolyData(id);
    967     if (polyData) {
    968         polyData->setEdgeWidth(edgeWidth);
    969         _needsRedraw = true;
    970     }
     1436void Renderer::setPolyDataEdgeWidth(const DataSetId& id, float edgeWidth)
     1437{
     1438    PolyDataHashmap::iterator itr;
     1439   
     1440    bool doAll = false;
     1441
     1442    if (id.compare("all") == 0) {
     1443        itr = _polyDatas.begin();
     1444        doAll = true;
     1445    } else {
     1446        itr = _polyDatas.find(id);
     1447    }
     1448    if (itr == _polyDatas.end()) {
     1449        ERROR("PolyData not found: %s", id.c_str());
     1450        return;
     1451    }
     1452
     1453    do {
     1454        itr->second->setEdgeWidth(edgeWidth);
     1455    } while (doAll && ++itr != _polyDatas.end());
     1456
     1457    _needsRedraw = true;
    9711458}
    9721459
     
    9741461 * \brief Set wireframe rendering for the specified DataSet
    9751462 */
    976 void Renderer::setPolyDataWireframe(DataSetId id, bool state)
    977 {
    978     PolyData *polyData = getPolyData(id);
    979     if (polyData) {
    980         polyData->setWireframe(state);
    981         _needsRedraw = true;
    982     }
     1463void Renderer::setPolyDataWireframe(const DataSetId& id, bool state)
     1464{
     1465    PolyDataHashmap::iterator itr;
     1466   
     1467    bool doAll = false;
     1468
     1469    if (id.compare("all") == 0) {
     1470        itr = _polyDatas.begin();
     1471        doAll = true;
     1472    } else {
     1473        itr = _polyDatas.find(id);
     1474    }
     1475    if (itr == _polyDatas.end()) {
     1476        ERROR("PolyData not found: %s", id.c_str());
     1477        return;
     1478    }
     1479
     1480    do {
     1481        itr->second->setWireframe(state);
     1482    } while (doAll && ++itr != _polyDatas.end());
     1483
     1484    _needsRedraw = true;
    9831485}
    9841486
     
    9861488 * \brief Turn mesh lighting on/off for the specified DataSet
    9871489 */
    988 void Renderer::setPolyDataLighting(DataSetId id, bool state)
    989 {
    990     PolyData *polyData = getPolyData(id);
    991     if (polyData) {
    992         polyData->setLighting(state);
    993         _needsRedraw = true;
    994     }
     1490void Renderer::setPolyDataLighting(const DataSetId& id, bool state)
     1491{
     1492    PolyDataHashmap::iterator itr;
     1493   
     1494    bool doAll = false;
     1495
     1496    if (id.compare("all") == 0) {
     1497        itr = _polyDatas.begin();
     1498        doAll = true;
     1499    } else {
     1500        itr = _polyDatas.find(id);
     1501    }
     1502    if (itr == _polyDatas.end()) {
     1503        ERROR("PolyData not found: %s", id.c_str());
     1504        return;
     1505    }
     1506
     1507    do {
     1508        itr->second->setLighting(state);
     1509    } while (doAll && ++itr != _polyDatas.end());
     1510
     1511    _needsRedraw = true;
    9951512}
    9961513
     
    12891806        }
    12901807    }
     1808}
     1809
     1810/**
     1811 * \brief Update data ranges for color-mapping
     1812 *
     1813 * \param[in] useCumulative Use cumulative range of all DataSets
     1814 */
     1815void Renderer::updateRanges(bool useCumulative)
     1816{
     1817    for (PseudoColorHashmap::iterator itr = _pseudoColors.begin();
     1818         itr != _pseudoColors.end(); ++itr) {
     1819        vtkLookupTable *lut = itr->second->getLookupTable();
     1820        if (lut) {
     1821            if (useCumulative) {
     1822                lut->SetRange(_cumulativeDataRange);
     1823            } else {
     1824                double range[2];
     1825                if (itr->second->getDataSet()) {
     1826                    itr->second->getDataSet()->getDataRange(range);
     1827                    lut->SetRange(range);
     1828                }
     1829            }
     1830        }
     1831    }
     1832}
     1833
     1834/**
     1835 * \brief Collect cumulative data range of all DataSets
     1836 *
     1837 * \param[inout] range Data range of all DataSets
     1838 */
     1839void Renderer::collectDataRanges(double *range)
     1840{
     1841    range[0] = DBL_MAX;
     1842    range[1] = -DBL_MAX;
     1843
     1844    for (DataSetHashmap::iterator itr = _dataSets.begin();
     1845         itr != _dataSets.end(); ++itr) {
     1846        double r[2];
     1847        itr->second->getDataRange(r);
     1848        range[0] = min2(range[0], r[0]);
     1849        range[1] = max2(range[1], r[1]);
     1850    }
     1851    if (range[0] == DBL_MAX)
     1852        range[0] = 0;
     1853    if (range[1] == -DBL_MAX)
     1854        range[1] = 1;
    12911855}
    12921856
     
    13571921 * \brief Set the opacity of the specified DataSet's associated graphics objects
    13581922 */
    1359 void Renderer::setOpacity(DataSetId id, double opacity)
    1360 {
    1361     PseudoColor *pc = getPseudoColor(id);
    1362     if (pc) {
    1363         pc->setOpacity(opacity);
    1364         _needsRedraw = true;
    1365     }
    1366     Contour2D *contour = getContour2D(id);
    1367     if (contour) {
    1368         contour->setOpacity(opacity);
    1369         _needsRedraw = true;
    1370     }
    1371     PolyData *polyData = getPolyData(id);
    1372     if (polyData) {
    1373         polyData->setOpacity(opacity);
    1374         _needsRedraw = true;
    1375     }
     1923void Renderer::setOpacity(const DataSetId& id, double opacity)
     1924{
     1925    setPseudoColorOpacity(id, opacity);
     1926    setContourOpacity(id, opacity);
     1927    setPolyDataOpacity(id, opacity);
    13761928}
    13771929
     
    13791931 * \brief Turn on/off rendering of the specified DataSet's associated graphics objects
    13801932 */
    1381 void Renderer::setVisibility(DataSetId id, bool state)
     1933void Renderer::setVisibility(const DataSetId& id, bool state)
    13821934{
    13831935    setPseudoColorVisibility(id, state);
     
    14021954            for (Contour2DHashmap::iterator itr = _contours.begin();
    14031955                 itr != _contours.end(); ++itr) {
     1956                itr->second->setClippingPlanes(_clippingPlanes);
     1957            }
     1958            for (PolyDataHashmap::iterator itr = _polyDatas.begin();
     1959                 itr != _polyDatas.end(); ++itr) {
    14041960                itr->second->setClippingPlanes(_clippingPlanes);
    14051961            }
     
    14131969                itr->second->setClippingPlanes(NULL);
    14141970            }
     1971            for (PolyDataHashmap::iterator itr = _polyDatas.begin();
     1972                 itr != _polyDatas.end(); ++itr) {
     1973                itr->second->setClippingPlanes(NULL);
     1974            }
    14151975        }
    14161976        _renderWindow->Render();
     
    14472007 * Note: no interpolation is performed on data
    14482008 */
    1449 double Renderer::getDataValueAtPixel(DataSetId id, int x, int y)
     2009double Renderer::getDataValueAtPixel(const DataSetId& id, int x, int y)
    14502010{
    14512011    vtkSmartPointer<vtkCoordinate> coord = vtkSmartPointer<vtkCoordinate>::New();
     
    14692029 * Note: no interpolation is performed on data
    14702030 */
    1471 double Renderer::getDataValue(DataSetId id, double x, double y, double z)
     2031double Renderer::getDataValue(const DataSetId& id, double x, double y, double z)
    14722032{
    14732033    DataSet *ds = getDataSet(id);
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.h

    r2120 r2170  
    6666    // Data sets
    6767
    68     void addDataSet(DataSetId id);
    69 
    70     void deleteDataSet(DataSetId id);
    71 
    72     DataSet *getDataSet(DataSetId id);
    73 
    74     bool setData(DataSetId id, char *data, int nbytes);
    75 
    76     bool setDataFile(DataSetId id, const char *filename);
    77 
    78     double getDataValueAtPixel(DataSetId id, int x, int y);
    79 
    80     double getDataValue(DataSetId id, double x, double y, double z);
    81 
    82     void setOpacity(DataSetId id, double opacity);
    83 
    84     void setVisibility(DataSetId id, bool state);
     68    void addDataSet(const DataSetId& id);
     69
     70    void deleteDataSet(const DataSetId& id);
     71
     72    DataSet *getDataSet(const DataSetId& id);
     73
     74    bool setData(const DataSetId& id, char *data, int nbytes);
     75
     76    bool setDataFile(const DataSetId& id, const char *filename);
     77
     78    double getDataValueAtPixel(const DataSetId& id, int x, int y);
     79
     80    double getDataValue(const DataSetId& id, double x, double y, double z);
     81
     82    void setOpacity(const DataSetId& id, double opacity);
     83
     84    void setVisibility(const DataSetId& id, bool state);
    8585
    8686    // Render window
     
    132132    // Colormaps
    133133
    134     void addColorMap(ColorMapId id, ColorMap *colorMap);
    135 
    136     void deleteColorMap(ColorMapId id);
    137 
    138     ColorMap *getColorMap(ColorMapId id);
    139 
    140     void renderColorMap(ColorMapId id, const char *title,
     134    void addColorMap(const ColorMapId& id, ColorMap *colorMap);
     135
     136    void deleteColorMap(const ColorMapId& id);
     137
     138    ColorMap *getColorMap(const ColorMapId& id);
     139
     140    bool renderColorMap(const ColorMapId& id,
     141                        const DataSetId& dataSetID,
     142                        const char *title,
    141143                        int width, int height,
    142144                        vtkUnsignedCharArray *imgData);
     
    144146    // Color-mapped surfaces
    145147
    146     void addPseudoColor(DataSetId id);
    147 
    148     void deletePseudoColor(DataSetId id);
    149 
    150     PseudoColor *getPseudoColor(DataSetId id);
    151 
    152     void setPseudoColorColorMap(DataSetId id, ColorMapId colorMapId);
    153 
    154     vtkLookupTable *getPseudoColorColorMap(DataSetId id);
    155 
    156     void setPseudoColorVisibility(DataSetId id, bool state);
    157 
    158     void setPseudoColorEdgeVisibility(DataSetId id, bool state);
    159 
    160     void setPseudoColorEdgeColor(DataSetId id, float color[3]);
    161 
    162     void setPseudoColorEdgeWidth(DataSetId id, float edgeWidth);
    163 
    164     void setPseudoColorLighting(DataSetId id, bool state);
     148    void addPseudoColor(const DataSetId& id);
     149
     150    void deletePseudoColor(const DataSetId& id);
     151
     152    PseudoColor *getPseudoColor(const DataSetId& id);
     153
     154    void setPseudoColorColorMap(const DataSetId& id, const ColorMapId& colorMapId);
     155
     156    vtkLookupTable *getPseudoColorColorMap(const DataSetId& id);
     157
     158    void setPseudoColorOpacity(const DataSetId& id, double opacity);
     159
     160    void setPseudoColorVisibility(const DataSetId& id, bool state);
     161
     162    void setPseudoColorEdgeVisibility(const DataSetId& id, bool state);
     163
     164    void setPseudoColorEdgeColor(const DataSetId& id, float color[3]);
     165
     166    void setPseudoColorEdgeWidth(const DataSetId& id, float edgeWidth);
     167
     168    void setPseudoColorLighting(const DataSetId& id, bool state);
    165169
    166170    // Contour plots
    167171
    168     void addContour2D(DataSetId id);
    169 
    170     void deleteContour2D(DataSetId id);
    171 
    172     Contour2D *getContour2D(DataSetId id);
    173 
    174     void setContours(DataSetId id, int numContours);
    175 
    176     void setContourList(DataSetId id, const std::vector<double>& contours);
    177 
    178     void setContourVisibility(DataSetId id, bool state);
    179 
    180     void setContourEdgeColor(DataSetId id, float color[3]);
    181 
    182     void setContourEdgeWidth(DataSetId id, float edgeWidth);
    183 
    184     void setContourLighting(DataSetId id, bool state);
     172    void addContour2D(const DataSetId& id);
     173
     174    void deleteContour2D(const DataSetId& id);
     175
     176    Contour2D *getContour2D(const DataSetId& id);
     177
     178    void setContours(const DataSetId& id, int numContours);
     179
     180    void setContourList(const DataSetId& id, const std::vector<double>& contours);
     181
     182    void setContourOpacity(const DataSetId& id, double opacity);
     183
     184    void setContourVisibility(const DataSetId& id, bool state);
     185
     186    void setContourEdgeColor(const DataSetId& id, float color[3]);
     187
     188    void setContourEdgeWidth(const DataSetId& id, float edgeWidth);
     189
     190    void setContourLighting(const DataSetId& id, bool state);
    185191
    186192    // Meshes
    187193
    188     void addPolyData(DataSetId id);
     194    void addPolyData(const DataSetId& id);
    189195   
    190     void deletePolyData(DataSetId id);
    191 
    192     PolyData *getPolyData(DataSetId id);
    193 
    194     void setPolyDataVisibility(DataSetId id, bool state);
    195 
    196     void setPolyDataColor(DataSetId id, float color[3]);
    197 
    198     void setPolyDataEdgeVisibility(DataSetId id, bool state);
    199 
    200     void setPolyDataEdgeColor(DataSetId id, float color[3]);
    201 
    202     void setPolyDataEdgeWidth(DataSetId id, float edgeWidth);
    203 
    204     void setPolyDataWireframe(DataSetId id, bool state);
    205 
    206     void setPolyDataLighting(DataSetId id, bool state);
     196    void deletePolyData(const DataSetId& id);
     197
     198    PolyData *getPolyData(const DataSetId& id);
     199
     200    void setPolyDataOpacity(const DataSetId& id, double opacity);
     201
     202    void setPolyDataVisibility(const DataSetId& id, bool state);
     203
     204    void setPolyDataColor(const DataSetId& id, float color[3]);
     205
     206    void setPolyDataEdgeVisibility(const DataSetId& id, bool state);
     207
     208    void setPolyDataEdgeColor(const DataSetId& id, float color[3]);
     209
     210    void setPolyDataEdgeWidth(const DataSetId& id, float edgeWidth);
     211
     212    void setPolyDataWireframe(const DataSetId& id, bool state);
     213
     214    void setPolyDataLighting(const DataSetId& id, bool state);
    207215
    208216private:
     
    220228    void collectBounds(double *bounds, bool onlyVisible);
    221229
     230    void collectDataRanges(double *range);
     231
     232    void updateRanges(bool useCumulative);
     233
    222234    void storeCameraOrientation();
    223235    void restoreCameraOrientation();
     
    234246    double _cameraUp[3];
    235247    float _bgColor[3];
     248    bool _useCumulativeRanges;
     249    double _cumulativeDataRange[2];
    236250
    237251    ColorMapHashmap _colorMaps;
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp

    r2120 r2170  
    172172    {"name", 1, AxisNameOp, 4, 4, "axis title"},
    173173    {"units", 1, AxisUnitsOp, 4, 4, "axis units"},
    174     {"visible", 1, AxisVisibleOp, 4, 4, "axis bool"},
     174    {"visible", 1, AxisVisibleOp, 4, 4, "axis bool"}
    175175};
    176176static int nAxisOps = NumCmdSpecs(axisOps);
     
    298298    {"reset", 2, CameraResetOp, 2, 3, "?all?"},
    299299    {"rotate", 2, CameraRotateOp, 5, 5, "angle angle angle"},
    300     {"zoom", 1, CameraZoomOp, 3, 3, "zoomAmount"},
     300    {"zoom", 1, CameraZoomOp, 3, 3, "zoomAmount"}
    301301};
    302302static int nCameraOps = NumCmdSpecs(cameraOps);
     
    400400                 Tcl_Obj *const *objv)
    401401{
    402     const char *name = Tcl_GetString(objv[2]);
    403     g_renderer->deleteColorMap(name);
     402    if (objc == 3) {
     403        const char *name = Tcl_GetString(objv[2]);
     404        g_renderer->deleteColorMap(name);
     405    } else {
     406        g_renderer->deleteColorMap("all");
     407    }
    404408    return TCL_OK;
    405409}
     
    407411static Rappture::CmdSpec colorMapOps[] = {
    408412    {"add", 1, ColorMapAddOp, 5, 5, "colorMapName colormap alphamap"},
    409     {"delete", 1, ColorMapDeleteOp, 3, 3, "colorMapName"}
     413    {"delete", 1, ColorMapDeleteOp, 2, 3, "?colorMapName?"}
    410414};
    411415static int nColorMapOps = NumCmdSpecs(colorMapOps);
     
    429433                          Tcl_Obj *const *objv)
    430434{
    431     const char *name = Tcl_GetString(objv[4]);
    432     g_renderer->addContour2D(name);
    433435    std::vector<double> contourList;
    434436
     
    448450    }
    449451
    450     g_renderer->setContourList(name, contourList);
     452    if (objc == 5) {
     453        const char *name = Tcl_GetString(objv[4]);
     454        g_renderer->addContour2D(name);
     455        g_renderer->setContourList(name, contourList);
     456    } else {
     457        g_renderer->addContour2D("all");
     458        g_renderer->setContourList("all", contourList);
     459    }
    451460    return TCL_OK;
    452461}
     
    456465                          Tcl_Obj *const *objv)
    457466{
    458     const char *name = Tcl_GetString(objv[4]);
    459     g_renderer->addContour2D(name);
    460467    int numContours;
    461468    if (Tcl_GetIntFromObj(interp, objv[3], &numContours) != TCL_OK) {
    462469        return TCL_ERROR;
    463470    }
    464     g_renderer->setContours(name, numContours);
     471    if (objc == 5) {
     472        const char *name = Tcl_GetString(objv[4]);
     473        g_renderer->addContour2D(name);
     474        g_renderer->setContours(name, numContours);
     475    } else {
     476        g_renderer->addContour2D("all");
     477        g_renderer->setContours("all", numContours);
     478    }
    465479    return TCL_OK;
    466480}
    467481
    468482static Rappture::CmdSpec contour2dAddOps[] = {
    469     {"contourlist", 1, Contour2DAddContourListOp, 5, 5, "contourList dataSetName"},
    470     {"numcontours", 1, Contour2DAddNumContoursOp, 5, 5, "numContours dataSetName"}
     483    {"contourlist", 1, Contour2DAddContourListOp, 4, 5, "contourList ?dataSetName?"},
     484    {"numcontours", 1, Contour2DAddNumContoursOp, 4, 5, "numContours ?dataSetName?"}
    471485};
    472486static int nContour2dAddOps = NumCmdSpecs(contour2dAddOps);
     
    490504                  Tcl_Obj *const *objv)
    491505{
    492     const char *name = Tcl_GetString(objv[2]);
    493     g_renderer->deleteContour2D(name);
     506    if (objc == 3) {
     507        const char *name = Tcl_GetString(objv[2]);
     508        g_renderer->deleteContour2D(name);
     509    } else {
     510        g_renderer->deleteContour2D("all");
     511    }
    494512    return TCL_OK;
    495513}
     
    499517                    Tcl_Obj *const *objv)
    500518{
    501     const char *name = Tcl_GetString(objv[3]);
    502519    bool state;
    503520    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    504521        return TCL_ERROR;
    505522    }
    506     g_renderer->setContourLighting(name, state);
     523    if (objc == 4) {
     524        const char *name = Tcl_GetString(objv[3]);
     525        g_renderer->setContourLighting(name, state);
     526    } else {
     527        g_renderer->setContourLighting("all", state);
     528    }
    507529    return TCL_OK;
    508530}
     
    512534                     Tcl_Obj *const *objv)
    513535{
    514     const char *name = Tcl_GetString(objv[5]);
    515536    float color[3];
    516537    if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||
     
    519540        return TCL_ERROR;
    520541    }
    521     g_renderer->setContourEdgeColor(name, color);
     542    if (objc == 6) {
     543        const char *name = Tcl_GetString(objv[5]);
     544        g_renderer->setContourEdgeColor(name, color);
     545    } else {
     546        g_renderer->setContourEdgeColor("all", color);
     547    }
    522548    return TCL_OK;
    523549}
     
    527553                     Tcl_Obj *const *objv)
    528554{
    529     const char *name = Tcl_GetString(objv[3]);
    530555    float width;
    531556    if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) {
    532557        return TCL_ERROR;
    533558    }
    534     g_renderer->setContourEdgeWidth(name, width);
     559    if (objc == 4) {
     560        const char *name = Tcl_GetString(objv[3]);
     561        g_renderer->setContourEdgeWidth(name, width);
     562    } else {
     563        g_renderer->setContourEdgeWidth("all", width);
     564    }
     565    return TCL_OK;
     566}
     567
     568static int
     569Contour2DOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     570                   Tcl_Obj *const *objv)
     571{
     572    double opacity;
     573    if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) {
     574        return TCL_ERROR;
     575    }
     576    if (objc == 4) {
     577        const char *name = Tcl_GetString(objv[3]);
     578        g_renderer->setContourOpacity(name, opacity);
     579    } else {
     580        g_renderer->setContourOpacity("all", opacity);
     581    }
    535582    return TCL_OK;
    536583}
     
    540587                   Tcl_Obj *const *objv)
    541588{
    542     const char *name = Tcl_GetString(objv[3]);
    543589    bool state;
    544590    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    545591        return TCL_ERROR;
    546592    }
    547     g_renderer->setContourVisibility(name, state);
     593    if (objc == 4) {
     594        const char *name = Tcl_GetString(objv[3]);
     595        g_renderer->setContourVisibility(name, state);
     596    } else {
     597        g_renderer->setContourVisibility("all", state);
     598    }
    548599    return TCL_OK;
    549600}
    550601
    551602static Rappture::CmdSpec contour2dOps[] = {
    552     {"add", 1, Contour2DAddOp, 5, 5, "oper value dataSetName"},
    553     {"delete", 1, Contour2DDeleteOp, 3, 3, "dataSetName"},
    554     {"lighting", 3, Contour2DLightingOp, 4, 4, "bool dataSetName"},
    555     {"linecolor", 5, Contour2DLineColorOp, 6, 6, "r g b dataSetName"},
    556     {"linewidth", 5, Contour2DLineWidthOp, 4, 4, "width dataSetName"},
    557     {"visible", 1, Contour2DVisibleOp, 4, 4, "bool dataSetName"},
     603    {"add", 1, Contour2DAddOp, 4, 5, "oper value ?dataSetName?"},
     604    {"delete", 1, Contour2DDeleteOp, 2, 3, "?dataSetName?"},
     605    {"lighting", 3, Contour2DLightingOp, 3, 4, "bool ?dataSetName?"},
     606    {"linecolor", 5, Contour2DLineColorOp, 5, 6, "r g b ?dataSetName?"},
     607    {"linewidth", 5, Contour2DLineWidthOp, 3, 4, "width ?dataSetName?"},
     608    {"opacity", 1, Contour2DOpacityOp, 3, 4, "value ?dataSetName?"},
     609    {"visible", 1, Contour2DVisibleOp, 3, 4, "bool ?dataSetName?"}
    558610};
    559611static int nContour2dOps = NumCmdSpecs(contour2dOps);
     
    627679                Tcl_Obj *const *objv)
    628680{
    629     const char *name = Tcl_GetString(objv[2]);
    630     TRACE("Deleting dataset %s", name);
    631     g_renderer->deleteDataSet(name);
     681    if (objc == 3) {
     682        const char *name = Tcl_GetString(objv[2]);
     683        TRACE("Deleting dataset %s", name);
     684        g_renderer->deleteDataSet(name);
     685    } else {
     686        g_renderer->deleteDataSet("all");
     687    }
    632688    return TCL_OK;
    633689}
     
    712768                 Tcl_Obj *const *objv)
    713769{
    714     const char *name = Tcl_GetString(objv[3]);
    715770    double opacity;
    716771    if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) {
    717772        return TCL_ERROR;
    718773    }
    719     g_renderer->setOpacity(name, opacity);
     774    if (objc == 4) {
     775        const char *name = Tcl_GetString(objv[3]);
     776        g_renderer->setOpacity(name, opacity);
     777    } else {
     778        g_renderer->setOpacity("all", opacity);
     779    }
    720780    return TCL_OK;
    721781}
     
    725785                 Tcl_Obj *const *objv)
    726786{
    727     const char *name = Tcl_GetString(objv[3]);
    728787    bool state;
    729788    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    730789        return TCL_ERROR;
    731790    }
    732     g_renderer->setVisibility(name, state);
     791    if (objc == 4) {
     792        const char *name = Tcl_GetString(objv[3]);
     793        g_renderer->setVisibility(name, state);
     794    } else {
     795        g_renderer->setVisibility("all", state);
     796    }
    733797    return TCL_OK;
    734798}
     
    736800static Rappture::CmdSpec dataSetOps[] = {
    737801    {"add", 1, DataSetAddOp, 6, 6, "name data follows nBytes"},
    738     {"delete", 1, DataSetDeleteOp, 3, 3, "name"},
     802    {"delete", 1, DataSetDeleteOp, 2, 3, "?name?"},
    739803    {"getvalue", 1, DataSetGetValueOp, 6, 7, "oper x y ?z? name"},
    740     {"opacity", 1, DataSetOpacityOp, 4, 4, "value name"},
    741     {"visible", 1, DataSetVisibleOp, 4, 4, "bool name"}
     804    {"opacity", 1, DataSetOpacityOp, 3, 4, "value ?name?"},
     805    {"visible", 1, DataSetVisibleOp, 3, 4, "bool ?name?"}
    742806};
    743807static int nDataSetOps = NumCmdSpecs(dataSetOps);
     
    763827    if (objc < 4) {
    764828        Tcl_AppendResult(interp, "wrong # args: should be \"",
    765                 Tcl_GetString(objv[0]), " colormapName title width height\"", (char*)NULL);
     829                Tcl_GetString(objv[0]), " colormapName title width height ?dataSetName?\"", (char*)NULL);
    766830        return TCL_ERROR;
    767831    }
     
    778842        vtkSmartPointer<vtkUnsignedCharArray>::New();
    779843
    780     g_renderer->renderColorMap(name, title, width, height, imgData);
     844    if (objc == 6) {
     845        const char *dataSetName = Tcl_GetString(objv[5]);
     846        if (!g_renderer->renderColorMap(name, dataSetName, title, width, height, imgData)) {
     847            Tcl_AppendResult(interp, "Color map \"",
     848                             name, "\" was not found", (char*)NULL);
     849            return TCL_ERROR;
     850        }
     851    } else {
     852        if (!g_renderer->renderColorMap(name, "all", title, width, height, imgData)) {
     853            Tcl_AppendResult(interp, "Color map \"",
     854                             name, "\" was not found", (char*)NULL);
     855            return TCL_ERROR;
     856        }
     857    }
    781858
    782859#ifdef DEBUG
     
    795872               Tcl_Obj *const *objv)
    796873{
    797     const char *name = Tcl_GetString(objv[2]);
    798     g_renderer->addPseudoColor(name);
     874    if (objc == 3) {
     875        const char *name = Tcl_GetString(objv[2]);
     876        g_renderer->addPseudoColor(name);
     877    } else {
     878        g_renderer->addPseudoColor("all");
     879    }
    799880    return TCL_OK;
    800881}
     
    805886{
    806887    const char *colorMapName = Tcl_GetString(objv[2]);
    807     const char *dataSetName = Tcl_GetString(objv[3]);
    808     g_renderer->setPseudoColorColorMap(dataSetName, colorMapName);
     888    if (objc == 4) {
     889        const char *dataSetName = Tcl_GetString(objv[3]);
     890        g_renderer->setPseudoColorColorMap(dataSetName, colorMapName);
     891    } else {
     892        g_renderer->setPseudoColorColorMap("all", colorMapName);
     893    }
    809894    return TCL_OK;
    810895}
     
    814899                  Tcl_Obj *const *objv)
    815900{
    816     const char *name = Tcl_GetString(objv[2]);
    817     g_renderer->deletePseudoColor(name);
    818     return TCL_OK;
    819 }
    820 
    821 static int
    822 PseudoColorVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    823                      Tcl_Obj *const *objv)
    824 {
    825     const char *name = Tcl_GetString(objv[3]);
     901    if (objc == 3) {
     902        const char *name = Tcl_GetString(objv[2]);
     903        g_renderer->deletePseudoColor(name);
     904    } else {
     905        g_renderer->deletePseudoColor("all");
     906    }
     907    return TCL_OK;
     908}
     909
     910static int
     911PseudoColorEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     912                            Tcl_Obj *const *objv)
     913{
    826914    bool state;
    827915    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    828916        return TCL_ERROR;
    829917    }
    830     g_renderer->setPseudoColorVisibility(name, state);
    831     return TCL_OK;
    832 }
    833 
    834 static int
    835 PseudoColorEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc,
    836                             Tcl_Obj *const *objv)
    837 {
    838     const char *name = Tcl_GetString(objv[3]);
     918    if (objc == 4) {
     919        const char *name = Tcl_GetString(objv[3]);
     920        g_renderer->setPseudoColorEdgeVisibility(name, state);
     921    } else {
     922        g_renderer->setPseudoColorEdgeVisibility("all", state);
     923    }
     924    return TCL_OK;
     925}
     926
     927static int
     928PseudoColorLightingOp(ClientData clientData, Tcl_Interp *interp, int objc,
     929                      Tcl_Obj *const *objv)
     930{
    839931    bool state;
    840932    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    841933        return TCL_ERROR;
    842934    }
    843     g_renderer->setPseudoColorEdgeVisibility(name, state);
    844     return TCL_OK;
    845 }
    846 
    847 static int
    848 PseudoColorLightingOp(ClientData clientData, Tcl_Interp *interp, int objc,
    849                       Tcl_Obj *const *objv)
    850 {
    851     const char *name = Tcl_GetString(objv[3]);
    852     bool state;
    853     if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    854         return TCL_ERROR;
    855     }
    856     g_renderer->setPseudoColorLighting(name, state);
     935    if (objc == 4) {
     936        const char *name = Tcl_GetString(objv[3]);
     937        g_renderer->setPseudoColorLighting(name, state);
     938    } else {
     939        g_renderer->setPseudoColorLighting("all", state);
     940    }
    857941    return TCL_OK;
    858942}
     
    862946                       Tcl_Obj *const *objv)
    863947{
    864     const char *name = Tcl_GetString(objv[5]);
    865948    float color[3];
    866949    if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||
     
    869952        return TCL_ERROR;
    870953    }
    871     g_renderer->setPseudoColorEdgeColor(name, color);
     954    if (objc == 6) {
     955        const char *name = Tcl_GetString(objv[5]);
     956        g_renderer->setPseudoColorEdgeColor(name, color);
     957    } else {
     958        g_renderer->setPseudoColorEdgeColor("all", color);
     959    }
    872960    return TCL_OK;
    873961}
     
    877965                       Tcl_Obj *const *objv)
    878966{
    879     const char *name = Tcl_GetString(objv[3]);
    880967    float width;
    881968    if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) {
    882969        return TCL_ERROR;
    883970    }
    884     g_renderer->setPseudoColorEdgeWidth(name, width);
     971    if (objc == 4) {
     972        const char *name = Tcl_GetString(objv[3]);
     973        g_renderer->setPseudoColorEdgeWidth(name, width);
     974    } else {
     975        g_renderer->setPseudoColorEdgeWidth("all", width);
     976    }
     977    return TCL_OK;
     978}
     979
     980static int
     981PseudoColorOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     982                     Tcl_Obj *const *objv)
     983{
     984    double opacity;
     985    if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) {
     986        return TCL_ERROR;
     987    }
     988    if (objc == 4) {
     989        const char *name = Tcl_GetString(objv[3]);
     990        g_renderer->setPseudoColorOpacity(name, opacity);
     991    } else {
     992        g_renderer->setPseudoColorOpacity("all", opacity);
     993    }
     994    return TCL_OK;
     995}
     996
     997static int
     998PseudoColorVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
     999                     Tcl_Obj *const *objv)
     1000{
     1001    bool state;
     1002    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
     1003        return TCL_ERROR;
     1004    }
     1005    if (objc == 4) {
     1006        const char *name = Tcl_GetString(objv[3]);
     1007        g_renderer->setPseudoColorVisibility(name, state);
     1008    } else {
     1009        g_renderer->setPseudoColorVisibility("all", state);
     1010    }
    8851011    return TCL_OK;
    8861012}
    8871013
    8881014static Rappture::CmdSpec pseudoColorOps[] = {
    889     {"add", 1, PseudoColorAddOp, 3, 3, "dataSetName"},
    890     {"colormap", 1, PseudoColorColorMapOp, 4, 4, "colorMapName dataSetName"},
    891     {"delete", 1, PseudoColorDeleteOp, 3, 3, "dataSetName"},
    892     {"edges", 1, PseudoColorEdgeVisibilityOp, 4, 4, "bool dataSetName"},
    893     {"lighting", 3, PseudoColorLightingOp, 4, 4, "bool dataSetName"},
    894     {"linecolor", 5, PseudoColorLineColorOp, 6, 6, "r g b dataSetName"},
    895     {"linewidth", 5, PseudoColorLineWidthOp, 4, 4, "width dataSetName"},
    896     {"visible", 1, PseudoColorVisibleOp, 4, 4, "bool dataSetName"}
     1015    {"add", 1, PseudoColorAddOp, 2, 3, "?dataSetName?"},
     1016    {"colormap", 1, PseudoColorColorMapOp, 3, 4, "colorMapName ?dataSetName?"},
     1017    {"delete", 1, PseudoColorDeleteOp, 2, 3, "?dataSetName?"},
     1018    {"edges", 1, PseudoColorEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"},
     1019    {"lighting", 3, PseudoColorLightingOp, 3, 4, "bool ?dataSetName?"},
     1020    {"linecolor", 5, PseudoColorLineColorOp, 5, 6, "r g b ?dataSetName?"},
     1021    {"linewidth", 5, PseudoColorLineWidthOp, 3, 4, "width ?dataSetName?"},
     1022    {"opacity", 1, PseudoColorOpacityOp, 3, 4, "value ?dataSetName?"},
     1023    {"visible", 1, PseudoColorVisibleOp, 3, 4, "bool ?dataSetName?"}
    8971024};
    8981025static int nPseudoColorOps = NumCmdSpecs(pseudoColorOps);
     
    9161043              Tcl_Obj *const *objv)
    9171044{
    918     const char *name = Tcl_GetString(objv[2]);
    919     g_renderer->addPolyData(name);
     1045    if (objc == 3) {
     1046        const char *name = Tcl_GetString(objv[2]);
     1047        g_renderer->addPolyData(name);
     1048    } else {
     1049        g_renderer->addPolyData("all");
     1050    }
    9201051    return TCL_OK;
    9211052}
     
    9251056                 Tcl_Obj *const *objv)
    9261057{
    927     const char *name = Tcl_GetString(objv[2]);
    928     g_renderer->deletePolyData(name);
     1058    if (objc == 3) {
     1059        const char *name = Tcl_GetString(objv[2]);
     1060        g_renderer->deletePolyData(name);
     1061    } else {
     1062        g_renderer->deletePolyData("all");
     1063    }
    9291064    return TCL_OK;
    9301065}
     
    9341069                Tcl_Obj *const *objv)
    9351070{
    936     const char *name = Tcl_GetString(objv[5]);
    9371071    float color[3];
    9381072    if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||
     
    9411075        return TCL_ERROR;
    9421076    }
    943     g_renderer->setPolyDataColor(name, color);
     1077    if (objc == 6) {
     1078        const char *name = Tcl_GetString(objv[5]);
     1079        g_renderer->setPolyDataColor(name, color);
     1080    } else {
     1081        g_renderer->setPolyDataColor("all", color);
     1082    }
    9441083    return TCL_OK;
    9451084}
     
    9491088                         Tcl_Obj *const *objv)
    9501089{
    951     const char *name = Tcl_GetString(objv[3]);
    9521090    bool state;
    9531091    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    9541092        return TCL_ERROR;
    9551093    }
    956     g_renderer->setPolyDataEdgeVisibility(name, state);
     1094    if (objc == 4) {
     1095        const char *name = Tcl_GetString(objv[3]);
     1096        g_renderer->setPolyDataEdgeVisibility(name, state);
     1097    } else {
     1098        g_renderer->setPolyDataEdgeVisibility("all", state);
     1099    }
    9571100    return TCL_OK;
    9581101}
     
    9621105                   Tcl_Obj *const *objv)
    9631106{
    964     const char *name = Tcl_GetString(objv[3]);
    9651107    bool state;
    9661108    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    9671109        return TCL_ERROR;
    9681110    }
    969     g_renderer->setPolyDataLighting(name, state);
     1111    if (objc == 4) {
     1112        const char *name = Tcl_GetString(objv[3]);
     1113        g_renderer->setPolyDataLighting(name, state);
     1114    } else {
     1115        g_renderer->setPolyDataLighting("all", state);
     1116    }
    9701117    return TCL_OK;
    9711118}
     
    9751122                    Tcl_Obj *const *objv)
    9761123{
    977     const char *name = Tcl_GetString(objv[5]);
    9781124    float color[3];
    9791125    if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||
     
    9821128        return TCL_ERROR;
    9831129    }
    984     g_renderer->setPolyDataEdgeColor(name, color);
     1130    if (objc == 6) {
     1131        const char *name = Tcl_GetString(objv[5]);
     1132        g_renderer->setPolyDataEdgeColor(name, color);
     1133    } else {
     1134        g_renderer->setPolyDataEdgeColor("all", color);
     1135    }
    9851136    return TCL_OK;
    9861137}
     
    9901141                    Tcl_Obj *const *objv)
    9911142{
    992     const char *name = Tcl_GetString(objv[3]);
    9931143    float width;
    9941144    if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) {
    9951145        return TCL_ERROR;
    9961146    }
    997     g_renderer->setPolyDataEdgeWidth(name, width);
     1147    if (objc == 4) {
     1148        const char *name = Tcl_GetString(objv[3]);
     1149        g_renderer->setPolyDataEdgeWidth(name, width);
     1150    } else {
     1151        g_renderer->setPolyDataEdgeWidth("all", width);
     1152    }
     1153    return TCL_OK;
     1154}
     1155
     1156static int
     1157PolyDataOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     1158                  Tcl_Obj *const *objv)
     1159{
     1160    double opacity;
     1161    if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) {
     1162        return TCL_ERROR;
     1163    }
     1164    if (objc == 4) {
     1165        const char *name = Tcl_GetString(objv[3]);
     1166        g_renderer->setPolyDataOpacity(name, opacity);
     1167    } else {
     1168        g_renderer->setPolyDataOpacity("all", opacity);
     1169    }
    9981170    return TCL_OK;
    9991171}
     
    10031175                  Tcl_Obj *const *objv)
    10041176{
    1005     const char *name = Tcl_GetString(objv[3]);
    10061177    bool state;
    10071178    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    10081179        return TCL_ERROR;
    10091180    }
    1010     g_renderer->setPolyDataVisibility(name, state);
     1181    if (objc == 4) {
     1182        const char *name = Tcl_GetString(objv[3]);
     1183        g_renderer->setPolyDataVisibility(name, state);
     1184    } else {
     1185        g_renderer->setPolyDataVisibility("all", state);
     1186    }
    10111187    return TCL_OK;
    10121188}
     
    10161192                    Tcl_Obj *const *objv)
    10171193{
    1018     const char *name = Tcl_GetString(objv[3]);
    10191194    bool state;
    10201195    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    10211196        return TCL_ERROR;
    10221197    }
    1023     g_renderer->setPolyDataWireframe(name, state);
     1198    if (objc == 4) {
     1199        const char *name = Tcl_GetString(objv[3]);
     1200        g_renderer->setPolyDataWireframe(name, state);
     1201    } else {
     1202        g_renderer->setPolyDataWireframe("all", state);
     1203    }
    10241204    return TCL_OK;
    10251205}
    10261206
    10271207static Rappture::CmdSpec polyDataOps[] = {
    1028     {"add", 1, PolyDataAddOp, 3, 3, "dataSetName"},
    1029     {"color", 1, PolyDataColorOp, 6, 6, "r g b dataSetName"},
    1030     {"delete", 1, PolyDataDeleteOp, 3, 3, "dataSetName"},
    1031     {"edges", 1, PolyDataEdgeVisibilityOp, 4, 4, "bool dataSetName"},
    1032     {"lighting", 3, PolyDataLightingOp, 4, 4, "bool dataSetName"},
    1033     {"linecolor", 5, PolyDataLineColorOp, 6, 6, "r g b dataSetName"},
    1034     {"linewidth", 5, PolyDataLineWidthOp, 4, 4, "width dataSetName"},
    1035     {"visible", 1, PolyDataVisibleOp, 4, 4, "bool dataSetName"},
    1036     {"wireframe", 1, PolyDataWireframeOp, 4, 4, "bool dataSetName"}
     1208    {"add", 1, PolyDataAddOp, 2, 3, "?dataSetName?"},
     1209    {"color", 1, PolyDataColorOp, 5, 6, "r g b ?dataSetName?"},
     1210    {"delete", 1, PolyDataDeleteOp, 2, 3, "?dataSetName?"},
     1211    {"edges", 1, PolyDataEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"},
     1212    {"lighting", 3, PolyDataLightingOp, 3, 4, "bool ?dataSetName?"},
     1213    {"linecolor", 5, PolyDataLineColorOp, 5, 6, "r g b ?dataSetName?"},
     1214    {"linewidth", 5, PolyDataLineWidthOp, 3, 4, "width ?dataSetName?"},
     1215    {"opacity", 1, PolyDataOpacityOp, 3, 4, "value ?dataSetName?"},
     1216    {"visible", 1, PolyDataVisibleOp, 3, 4, "bool ?dataSetName?"},
     1217    {"wireframe", 1, PolyDataWireframeOp, 3, 4, "bool ?dataSetName?"}
    10371218};
    10381219static int nPolyDataOps = NumCmdSpecs(polyDataOps);
  • branches/blt4/packages/vizservers/vtkvis/protocol.txt

    r2120 r2170  
    3131       Specify zoom ratio
    3232
     33colormap add <colorMapName> <colorMap> <opacityMap>
     34         colorMap = Tcl list of {value r g b} control points
     35         opacityMap = Tcl list of {value alpha} control points
     36colormap delete <?colorMapName?>
     37
     38legend <colormapName> <legendTitle> <width> <height> <?datasetName?>
     39       Causes legend to be rendered and written back with labels and title
     40
    3341dataset add <datasetName> data follows <nbytes>
    34 dataset delete <datasetName>
     42dataset delete <?datasetName?>
    3543dataset getvalue world <x> <y> <z> <datasetName>
    3644dataset getvalue pixel <x> <y> <datasetName>
    3745        Use pixel for image camera mode
    38 dataset opacity <val> <datasetName>
    39 dataset visible <bool> <datasetName>
     46dataset opacity <val> <?datasetName?>
     47dataset visible <bool> <?datasetName?>
    4048
    41 colormap add <colorMapName> <colorMap> <opacityMap>
    42          colorMap = Tcl list of {value r g b} control points
    43          opacityMap = Tcl list of {value alpha} control points
    44 colormap delete <colorMapName>
     49pseudocolor add <?datasetName?>
     50pseudocolor colormap <colormapName> <?datasetName?>
     51pseudocolor delete <?datasetName?>
     52pseudocolor edges <bool> <?datasetName?>
     53pseudocolor lighting <bool> <?datasetName?>
     54pseudocolor linecolor <r> <g> <b> <?datasetName?>
     55pseudocolor linewidth <val> <?datasetName?>
     56pseudocolor opacity <val> <?datasetName?>
     57pseudocolor visible <bool> <?datasetName?>
    4558
    46 legend <colormapName> <legendTitle> <width> <height>
    47        Causes legend to be rendered and written back with labels and title
     59contour2d add numcontours <n> <?datasetName?>
     60contour2d add contourlist <list> <?datasetName?>
     61          list = {isoval1 isoval2 isoval3...}
     62contour2d delete <?datasetName?>
     63contour2d lighting <bool> <?datasetName?>
     64contour2d linecolor <r> <g> <b> <?datasetName?>
     65contour2d linewidth <val> <?datasetName?>
     66contour2d opacity <val> <?datasetName?>
     67contour2d visible <bool> <?datasetName?>
    4868
    49 pseudocolor add <datasetName>
    50 pseudocolor colormap <colormapName> <datasetName>
    51 pseudocolor delete <datasetName>
    52 pseudocolor edges <bool> <datasetName>
    53 pseudocolor linecolor <r> <g> <b> <datasetName>
    54 pseudocolor linewidth <val> <datasetName>
    55 pseudocolor visible <bool> <datasetName>
    56 
    57 contour2d add numcontours <n> <datasetName>
    58 contour2d add contourlist <list> <datasetName>
    59           list = {isoval1 isoval2 isoval3...}
    60 contour2d delete <datasetName>
    61 contour2d linecolor <r> <g> <b> <datasetName>
    62 contour2d linewidth <val> <datasetName>
    63 contour2d visible <bool> <datasetName>
    64 
    65 polydata add <datasetName>
    66 polydata color <r> <g> <b> <datasetName>
    67 polydata delete <datasetName>
    68 polydata edges <bool> <datasetName>
    69 polydata linecolor <r> <g> <b> <datasetName>
    70 polydata linewidth <val> <datasetName>
    71 polydata visible <bool> <datasetName>
    72 polydata wireframe <bool> <datasetName>
     69polydata add <?datasetName?>
     70polydata color <r> <g> <b> <?datasetName?>
     71polydata delete <?datasetName?>
     72polydata edges <bool> <?datasetName?>
     73polydata lighting <bool> <?datasetName?>
     74polydata linecolor <r> <g> <b> <?datasetName?>
     75polydata linewidth <val> <?datasetName?>
     76polydata opacity <val> <?datasetName?>
     77polydata visible <bool> <?datasetName?>
     78polydata wireframe <bool> <?datasetName?>
    7379
    7480================================================================================
  • branches/blt4/src/core/config.h.in

    r2122 r2170  
    11/* src/core/config.h.in.  Generated from configure.in by autoheader.  */
     2
     3/* Define if building universal (internal helper macro) */
     4#undef AC_APPLE_UNIVERSAL_BUILD
    25
    36/* Build rappture with ffmpeg widgets */
     
    97100#undef HAVE_MEMORY_H
    98101
    99 /* Define to 1 if you have the <Python.h> header file. */
    100 #undef HAVE_PYTHON_H
    101 
    102102/* Define to 1 if you have the <sstream> header file. */
    103103#undef HAVE_SSTREAM
     
    157157#undef PACKAGE_TARNAME
    158158
     159/* Define to the home page for this package. */
     160#undef PACKAGE_URL
     161
    159162/* Define to the version of this package. */
    160163#undef PACKAGE_VERSION
     
    175178#undef STDC_HEADERS
    176179
    177 /* Define to 1 if your processor stores words with the most significant byte
    178    first (like Motorola and SPARC, unlike Intel and VAX). */
    179 #undef WORDS_BIGENDIAN
     180/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
     181   significant byte first (like Motorola and SPARC, unlike Intel). */
     182#if defined AC_APPLE_UNIVERSAL_BUILD
     183# if defined __BIG_ENDIAN__
     184#  define WORDS_BIGENDIAN 1
     185# endif
     186#else
     187# ifndef WORDS_BIGENDIAN
     188#  undef WORDS_BIGENDIAN
     189# endif
     190#endif
Note: See TracChangeset for help on using the changeset viewer.