Changeset 2742


Ignore:
Timestamp:
Dec 27, 2011 12:41:24 PM (11 years ago)
Author:
gah
Message:

sync with trunk

Location:
branches/blt4
Files:
16 added
47 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/aclocal.m4

    r2279 r2742  
    88builtin(include,./cf/rpLangJava.m4)
    99builtin(include,./cf/rpLangMatlab.m4)
     10builtin(include,./cf/rpLangR.m4)
  • branches/blt4/configure

    r2714 r2742  
    609609TK_VERSION
    610610TK_XLIBSW
    611 TCL_SHLIB_LDFLAGS
    612 TCL_SHLIB_LD
    613 TCL_SHLIB_SUFFIX
    614 TCL_SHLIB_CFLAGS
    615 TCL_CFLAGS_DEBUG
    616611TK_LIB_SPEC
    617612TK_INC_SPEC
    618613TCL_VERSION
     614TCL_SHLIB_SUFFIX
     615TCL_SHLIB_LDFLAGS
     616TCL_SHLIB_LD
     617TCL_SHLIB_CFLAGS
     618TCL_CFLAGS_OPTIMIZE
     619TCL_CFLAGS_DEBUG
    619620TCL_LIB_SPEC
    620621TCL_INC_SPEC
     
    673674SED
    674675RUBY
     676R
    675677JAVAH
    676678JAVAC
     
    785787with_tclsh
    786788with_vtk
    787 with_ncurses
    788789with_matlab
    789790with_octave
     
    793794with_python
    794795with_java
     796with_R
    795797with_ruby
    796798enable_shared
     
    14391441  --with-tclsh=DIR        location of tclsh [default=yes]
    14401442  --with-vtk=DIR          location of vtk library [default=yes]
    1441   --with-ncurses=DIR      location of ncurses [default=yes]
    14421443  --with-matlab=DIR       location of matlab and mex compiler [default=yes]
    14431444  --with-octave=DIR       path of default octave compiler `mkoctfile'
     
    14481449  --with-python=DIR       location of python [default=yes]
    14491450  --with-java=DIR         location of java [default=yes]
     1451  --with-R=DIR            location of R interpreter [default=yes]
    14501452  --with-ruby=DIR         location of ruby [default=yes]
    14511453
     
    74457447$as_echo "$VTKDIR" >&6; }
    74467448
    7447 with_ncurses="yes"
    7448 
    7449 # Check whether --with-ncurses was given.
    7450 if test "${with_ncurses+set}" = set; then :
    7451   withval=$with_ncurses;
    7452 else
    7453   with_ncurses=yes
    7454 fi
    7455 
    7456 
    7457 if test "$with_vtk" != "no" ; then
    7458   if test "$with_vtk" = "yes" ; then
    7459     for path in \
    7460      $libdir \
    7461      $prefix/lib \
    7462      $exec_prefix/lib \
    7463      /usr/lib
    7464     do
    7465       for vtk in $path/vtk-* ; do
    7466         if test -d "${vtk}" ; then
    7467           VTKDIR=${vtk}
    7468         fi
    7469       done
    7470       if test "x${VTKDIR}" != "x" ; then
    7471         break
    7472       fi
    7473     done
    7474   fi
    7475 fi
    7476 
    74777449
    74787450
     
    86438615  done
    86448616fi
     8617
     8618
     8619
     8620# Check whether --with-R was given.
     8621if test "${with_R+set}" = set; then :
     8622  withval=$with_R;
     8623else
     8624  with_R=yes
     8625fi
     8626
     8627
     8628R=""
     8629if test "$with_R" != "no" ; then
     8630  if test "$with_R" = "yes" ; then
     8631    # Extract the first word of "R", so it can be a program name with args.
     8632set dummy R; ac_word=$2
     8633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8634$as_echo_n "checking for $ac_word... " >&6; }
     8635if ${ac_cv_path_R+:} false; then :
     8636  $as_echo_n "(cached) " >&6
     8637else
     8638  case $R in
     8639  [\\/]* | ?:[\\/]*)
     8640  ac_cv_path_R="$R" # Let the user override the test with a path.
     8641  ;;
     8642  *)
     8643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8644for as_dir in $PATH
     8645do
     8646  IFS=$as_save_IFS
     8647  test -z "$as_dir" && as_dir=.
     8648    for ac_exec_ext in '' $ac_executable_extensions; do
     8649  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8650    ac_cv_path_R="$as_dir/$ac_word$ac_exec_ext"
     8651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8652    break 2
     8653  fi
     8654done
     8655  done
     8656IFS=$as_save_IFS
     8657
     8658  ;;
     8659esac
     8660fi
     8661R=$ac_cv_path_R
     8662if test -n "$R"; then
     8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5
     8664$as_echo "$R" >&6; }
     8665else
     8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8667$as_echo "no" >&6; }
     8668fi
     8669
     8670
     8671  else
     8672    # Extract the first word of "R", so it can be a program name with args.
     8673set dummy R; ac_word=$2
     8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8675$as_echo_n "checking for $ac_word... " >&6; }
     8676if ${ac_cv_path_R+:} false; then :
     8677  $as_echo_n "(cached) " >&6
     8678else
     8679  case $R in
     8680  [\\/]* | ?:[\\/]*)
     8681  ac_cv_path_R="$R" # Let the user override the test with a path.
     8682  ;;
     8683  *)
     8684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8685as_dummy="${with_R}/bin:${with_R}"
     8686for as_dir in $as_dummy
     8687do
     8688  IFS=$as_save_IFS
     8689  test -z "$as_dir" && as_dir=.
     8690    for ac_exec_ext in '' $ac_executable_extensions; do
     8691  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8692    ac_cv_path_R="$as_dir/$ac_word$ac_exec_ext"
     8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8694    break 2
     8695  fi
     8696done
     8697  done
     8698IFS=$as_save_IFS
     8699
     8700  ;;
     8701esac
     8702fi
     8703R=$ac_cv_path_R
     8704if test -n "$R"; then
     8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5
     8706$as_echo "$R" >&6; }
     8707else
     8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8709$as_echo "no" >&6; }
     8710fi
     8711
     8712
     8713  fi
     8714fi
     8715
    86458716
    86468717
     
    95399610#--------------------------------------------------------------------
    95409611
    9541 for ac_header in ffmpeg/avcodec.h
     9612for ac_header in ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h
    95429613do :
    9543   ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avcodec.h" "ac_cv_header_ffmpeg_avcodec_h" "#define __STDC_CONSTANT_MACROS 1
    9544   #ifdef HAVE_FFMPEG_AVCODEC_H
    9545   # include <ffmpeg/avcodec.h>
    9546   #endif
     9614  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     9615ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
     9616#define __STDC_CONSTANT_MACROS 1
    95479617
    95489618"
    9549 if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then :
     9619if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    95509620  cat >>confdefs.h <<_ACEOF
    9551 #define HAVE_FFMPEG_AVCODEC_H 1
    9552 _ACEOF
    9553 
    9554 fi
    9555 
    9556 done
    9557 
    9558 
    9559 for ac_header in libavcodec/avcodec.h
    9560 do :
    9561   ac_fn_cxx_check_header_compile "$LINENO" "libavcodec/avcodec.h" "ac_cv_header_libavcodec_avcodec_h" "#define __STDC_CONSTANT_MACROS 1
    9562   #ifdef HAVE_LIBAVCODEC_AVCODEC_H
    9563   # include <libavcodec/avcodec.h>
    9564   #endif
    9565 
    9566 "
    9567 if test "x$ac_cv_header_libavcodec_avcodec_h" = xyes; then :
    9568   cat >>confdefs.h <<_ACEOF
    9569 #define HAVE_LIBAVCODEC_AVCODEC_H 1
    9570 _ACEOF
    9571 
    9572 fi
    9573 
    9574 done
    9575 
    9576 
    9577 for ac_header in ffmpeg/avformat.h
    9578 do :
    9579   ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avformat.h" "ac_cv_header_ffmpeg_avformat_h" "#define __STDC_CONSTANT_MACROS 1
    9580   #ifdef HAVE_FFMPEG_AVFORMAT_H
    9581   # include <ffmpeg/avformat.h>
    9582   #endif
    9583 
    9584 "
    9585 if test "x$ac_cv_header_ffmpeg_avformat_h" = xyes; then :
    9586   cat >>confdefs.h <<_ACEOF
    9587 #define HAVE_FFMPEG_AVFORMAT_H 1
    9588 _ACEOF
    9589 
    9590 fi
    9591 
    9592 done
    9593 
    9594 
    9595 for ac_header in libavformat/avformat.h
    9596 do :
    9597   ac_fn_cxx_check_header_compile "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "#define __STDC_CONSTANT_MACROS 1
    9598   #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
    9599   # include <libavformat/avformat.h>
    9600   #endif
    9601 
    9602 "
    9603 if test "x$ac_cv_header_libavformat_avformat_h" = xyes; then :
    9604   cat >>confdefs.h <<_ACEOF
    9605 #define HAVE_LIBAVFORMAT_AVFORMAT_H 1
    9606 _ACEOF
    9607 
    9608 fi
    9609 
    9610 done
    9611 
    9612 
    9613 for ac_header in ffmpeg/avutil.h
    9614 do :
    9615   ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avutil.h" "ac_cv_header_ffmpeg_avutil_h" "#define __STDC_CONSTANT_MACROS 1
    9616   #ifdef HAVE_FFMPEG_AVUTIL_H
    9617   # include <ffmpeg/avutil.h>
    9618   #endif
    9619 
    9620 "
    9621 if test "x$ac_cv_header_ffmpeg_avutil_h" = xyes; then :
    9622   cat >>confdefs.h <<_ACEOF
    9623 #define HAVE_FFMPEG_AVUTIL_H 1
    9624 _ACEOF
    9625 
    9626 fi
    9627 
    9628 done
    9629 
    9630 
    9631 for ac_header in libavutil/avutil.h
    9632 do :
    9633   ac_fn_cxx_check_header_compile "$LINENO" "libavutil/avutil.h" "ac_cv_header_libavutil_avutil_h" "#define __STDC_CONSTANT_MACROS 1
    9634   #ifdef HAVE_LIBAVUTIL_AVUTIL_H
    9635   # include <libavutil/avutil.h>
    9636   #endif
    9637 
    9638 "
    9639 if test "x$ac_cv_header_libavutil_avutil_h" = xyes; then :
    9640   cat >>confdefs.h <<_ACEOF
    9641 #define HAVE_LIBAVUTIL_AVUTIL_H 1
    9642 _ACEOF
    9643 
    9644 fi
    9645 
    9646 done
    9647 
    9648 
    9649 for ac_header in ffmpeg/swscale.h
    9650 do :
    9651   ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/swscale.h" "ac_cv_header_ffmpeg_swscale_h" "#define __STDC_CONSTANT_MACROS 1
    9652   #ifdef HAVE_FFMPEG_SWSCALE_H
    9653   # include <ffmpeg/swscale.h>
    9654   #endif
    9655 
    9656 "
    9657 if test "x$ac_cv_header_ffmpeg_swscale_h" = xyes; then :
    9658   cat >>confdefs.h <<_ACEOF
    9659 #define HAVE_FFMPEG_SWSCALE_H 1
    9660 _ACEOF
    9661 
    9662 fi
    9663 
    9664 done
    9665 
    9666 
    9667 for ac_header in libswscale/swscale.h
    9668 do :
    9669   ac_fn_cxx_check_header_compile "$LINENO" "libswscale/swscale.h" "ac_cv_header_libswscale_swscale_h" "#define __STDC_CONSTANT_MACROS 1
    9670   #ifdef HAVE_LIBSWSCALE_SWSCALE_H
    9671   # include <libswscale/swscale.h>
    9672   #endif
    9673 
    9674 "
    9675 if test "x$ac_cv_header_libswscale_swscale_h" = xyes; then :
    9676   cat >>confdefs.h <<_ACEOF
    9677 #define HAVE_LIBSWSCALE_SWSCALE_H 1
     9621#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    96789622_ACEOF
    96799623
     
    96989642
    96999643  fi
    9700 fi
    9701 
    9702 for ac_func in img_convert
     9644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavcodec" >&5
     9645$as_echo_n "checking for main in -lavcodec... " >&6; }
     9646if ${ac_cv_lib_avcodec_main+:} false; then :
     9647  $as_echo_n "(cached) " >&6
     9648else
     9649  ac_check_lib_save_LIBS=$LIBS
     9650LIBS="-lavcodec  $LIBS"
     9651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     9652/* end confdefs.h.  */
     9653
     9654
     9655int
     9656main ()
     9657{
     9658return main ();
     9659  ;
     9660  return 0;
     9661}
     9662_ACEOF
     9663if ac_fn_cxx_try_link "$LINENO"; then :
     9664  ac_cv_lib_avcodec_main=yes
     9665else
     9666  ac_cv_lib_avcodec_main=no
     9667fi
     9668rm -f core conftest.err conftest.$ac_objext \
     9669    conftest$ac_exeext conftest.$ac_ext
     9670LIBS=$ac_check_lib_save_LIBS
     9671fi
     9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_main" >&5
     9673$as_echo "$ac_cv_lib_avcodec_main" >&6; }
     9674if test "x$ac_cv_lib_avcodec_main" = xyes; then :
     9675  cat >>confdefs.h <<_ACEOF
     9676#define HAVE_LIBAVCODEC 1
     9677_ACEOF
     9678
     9679  LIBS="-lavcodec $LIBS"
     9680
     9681else
     9682  as_fn_error $? "librappture requires libavcodec" "$LINENO" 5
     9683fi
     9684
     9685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5
     9686$as_echo_n "checking for main in -lavutil... " >&6; }
     9687if ${ac_cv_lib_avutil_main+:} false; then :
     9688  $as_echo_n "(cached) " >&6
     9689else
     9690  ac_check_lib_save_LIBS=$LIBS
     9691LIBS="-lavutil  $LIBS"
     9692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     9693/* end confdefs.h.  */
     9694
     9695
     9696int
     9697main ()
     9698{
     9699return main ();
     9700  ;
     9701  return 0;
     9702}
     9703_ACEOF
     9704if ac_fn_cxx_try_link "$LINENO"; then :
     9705  ac_cv_lib_avutil_main=yes
     9706else
     9707  ac_cv_lib_avutil_main=no
     9708fi
     9709rm -f core conftest.err conftest.$ac_objext \
     9710    conftest$ac_exeext conftest.$ac_ext
     9711LIBS=$ac_check_lib_save_LIBS
     9712fi
     9713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5
     9714$as_echo "$ac_cv_lib_avutil_main" >&6; }
     9715if test "x$ac_cv_lib_avutil_main" = xyes; then :
     9716  cat >>confdefs.h <<_ACEOF
     9717#define HAVE_LIBAVUTIL 1
     9718_ACEOF
     9719
     9720  LIBS="-lavutil $LIBS"
     9721
     9722else
     9723  as_fn_error $? "librappture requires libavutil" "$LINENO" 5
     9724fi
     9725
     9726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavformat" >&5
     9727$as_echo_n "checking for main in -lavformat... " >&6; }
     9728if ${ac_cv_lib_avformat_main+:} false; then :
     9729  $as_echo_n "(cached) " >&6
     9730else
     9731  ac_check_lib_save_LIBS=$LIBS
     9732LIBS="-lavformat  $LIBS"
     9733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     9734/* end confdefs.h.  */
     9735
     9736
     9737int
     9738main ()
     9739{
     9740return main ();
     9741  ;
     9742  return 0;
     9743}
     9744_ACEOF
     9745if ac_fn_cxx_try_link "$LINENO"; then :
     9746  ac_cv_lib_avformat_main=yes
     9747else
     9748  ac_cv_lib_avformat_main=no
     9749fi
     9750rm -f core conftest.err conftest.$ac_objext \
     9751    conftest$ac_exeext conftest.$ac_ext
     9752LIBS=$ac_check_lib_save_LIBS
     9753fi
     9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_main" >&5
     9755$as_echo "$ac_cv_lib_avformat_main" >&6; }
     9756if test "x$ac_cv_lib_avformat_main" = xyes; then :
     9757  cat >>confdefs.h <<_ACEOF
     9758#define HAVE_LIBAVFORMAT 1
     9759_ACEOF
     9760
     9761  LIBS="-lavformat $LIBS"
     9762
     9763else
     9764  as_fn_error $? "librappture requires libavformat" "$LINENO" 5
     9765fi
     9766
     9767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lswscale" >&5
     9768$as_echo_n "checking for main in -lswscale... " >&6; }
     9769if ${ac_cv_lib_swscale_main+:} false; then :
     9770  $as_echo_n "(cached) " >&6
     9771else
     9772  ac_check_lib_save_LIBS=$LIBS
     9773LIBS="-lswscale  $LIBS"
     9774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     9775/* end confdefs.h.  */
     9776
     9777
     9778int
     9779main ()
     9780{
     9781return main ();
     9782  ;
     9783  return 0;
     9784}
     9785_ACEOF
     9786if ac_fn_cxx_try_link "$LINENO"; then :
     9787  ac_cv_lib_swscale_main=yes
     9788else
     9789  ac_cv_lib_swscale_main=no
     9790fi
     9791rm -f core conftest.err conftest.$ac_objext \
     9792    conftest$ac_exeext conftest.$ac_ext
     9793LIBS=$ac_check_lib_save_LIBS
     9794fi
     9795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_main" >&5
     9796$as_echo "$ac_cv_lib_swscale_main" >&6; }
     9797if test "x$ac_cv_lib_swscale_main" = xyes; then :
     9798  cat >>confdefs.h <<_ACEOF
     9799#define HAVE_LIBSWSCALE 1
     9800_ACEOF
     9801
     9802  LIBS="-lswscale $LIBS"
     9803
     9804fi
     9805
     9806  for ac_func in avcodec_decode_video2
     9807do :
     9808  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video2" "ac_cv_func_avcodec_decode_video2"
     9809if test "x$ac_cv_func_avcodec_decode_video2" = xyes; then :
     9810  cat >>confdefs.h <<_ACEOF
     9811#define HAVE_AVCODEC_DECODE_VIDEO2 1
     9812_ACEOF
     9813
     9814fi
     9815done
     9816
     9817  for ac_func in avcodec_decode_video
     9818do :
     9819  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video" "ac_cv_func_avcodec_decode_video"
     9820if test "x$ac_cv_func_avcodec_decode_video" = xyes; then :
     9821  cat >>confdefs.h <<_ACEOF
     9822#define HAVE_AVCODEC_DECODE_VIDEO 1
     9823_ACEOF
     9824
     9825fi
     9826done
     9827
     9828  for ac_func in avformat_open_input
     9829do :
     9830  ac_fn_cxx_check_func "$LINENO" "avformat_open_input" "ac_cv_func_avformat_open_input"
     9831if test "x$ac_cv_func_avformat_open_input" = xyes; then :
     9832  cat >>confdefs.h <<_ACEOF
     9833#define HAVE_AVFORMAT_OPEN_INPUT 1
     9834_ACEOF
     9835
     9836fi
     9837done
     9838
     9839  for ac_func in av_open_input_file
     9840do :
     9841  ac_fn_cxx_check_func "$LINENO" "av_open_input_file" "ac_cv_func_av_open_input_file"
     9842if test "x$ac_cv_func_av_open_input_file" = xyes; then :
     9843  cat >>confdefs.h <<_ACEOF
     9844#define HAVE_AV_OPEN_INPUT_FILE 1
     9845_ACEOF
     9846
     9847fi
     9848done
     9849
     9850  for ac_func in avio_close
     9851do :
     9852  ac_fn_cxx_check_func "$LINENO" "avio_close" "ac_cv_func_avio_close"
     9853if test "x$ac_cv_func_avio_close" = xyes; then :
     9854  cat >>confdefs.h <<_ACEOF
     9855#define HAVE_AVIO_CLOSE 1
     9856_ACEOF
     9857
     9858fi
     9859done
     9860
     9861  for ac_func in url_close
     9862do :
     9863  ac_fn_cxx_check_func "$LINENO" "url_close" "ac_cv_func_url_close"
     9864if test "x$ac_cv_func_url_close" = xyes; then :
     9865  cat >>confdefs.h <<_ACEOF
     9866#define HAVE_URL_CLOSE 1
     9867_ACEOF
     9868
     9869fi
     9870done
     9871
     9872  ac_fn_cxx_check_func "$LINENO" "av_find_stream_info" "ac_cv_func_av_find_stream_info"
     9873if test "x$ac_cv_func_av_find_stream_info" = xyes; then :
     9874
     9875else
     9876  as_fn_error $? "oops! no av_find_stream_info?!?" "$LINENO" 5
     9877fi
     9878
     9879  ac_fn_cxx_check_func "$LINENO" "avcodec_find_decoder" "ac_cv_func_avcodec_find_decoder"
     9880if test "x$ac_cv_func_avcodec_find_decoder" = xyes; then :
     9881
     9882else
     9883  as_fn_error $? "oops! no av_codec_find_decoder ?!?" "$LINENO" 5
     9884fi
     9885
     9886  ac_fn_cxx_check_func "$LINENO" "avcodec_open" "ac_cv_func_avcodec_open"
     9887if test "x$ac_cv_func_avcodec_open" = xyes; then :
     9888
     9889else
     9890  as_fn_error $? "oops! avcodec_open ?!?" "$LINENO" 5
     9891fi
     9892
     9893  ac_fn_cxx_check_func "$LINENO" "avcodec_alloc_frame" "ac_cv_func_avcodec_alloc_frame"
     9894if test "x$ac_cv_func_avcodec_alloc_frame" = xyes; then :
     9895
     9896else
     9897  as_fn_error $? "oops! no avcode_alloc_frame ?!?" "$LINENO" 5
     9898fi
     9899
     9900  ac_fn_cxx_check_func "$LINENO" "av_rescale_q" "ac_cv_func_av_rescale_q"
     9901if test "x$ac_cv_func_av_rescale_q" = xyes; then :
     9902
     9903else
     9904  as_fn_error $? "oops! no av_rescale_q ?!?" "$LINENO" 5
     9905fi
     9906
     9907  ac_fn_cxx_check_func "$LINENO" "av_read_frame" "ac_cv_func_av_read_frame"
     9908if test "x$ac_cv_func_av_read_frame" = xyes; then :
     9909
     9910else
     9911  as_fn_error $? "oops! av_read_frame ?!?" "$LINENO" 5
     9912fi
     9913
     9914  ac_fn_cxx_check_func "$LINENO" "av_free" "ac_cv_func_av_free"
     9915if test "x$ac_cv_func_av_free" = xyes; then :
     9916
     9917else
     9918  as_fn_error $? "oops! no av_frame ?!?" "$LINENO" 5
     9919fi
     9920
     9921  ac_fn_cxx_check_func "$LINENO" "avcodec_default_release_buffer" "ac_cv_func_avcodec_default_release_buffer"
     9922if test "x$ac_cv_func_avcodec_default_release_buffer" = xyes; then :
     9923
     9924else
     9925  as_fn_error $? "oops! no avcode_default_release_buffer ?!?" "$LINENO" 5
     9926fi
     9927
     9928  ac_fn_cxx_check_func "$LINENO" "avpicture_get_size" "ac_cv_func_avpicture_get_size"
     9929if test "x$ac_cv_func_avpicture_get_size" = xyes; then :
     9930
     9931else
     9932  as_fn_error $? "oops! no avpicture_get_size ?!?" "$LINENO" 5
     9933fi
     9934
     9935  ac_fn_cxx_check_func "$LINENO" "avpicture_fill" "ac_cv_func_avpicture_fill"
     9936if test "x$ac_cv_func_avpicture_fill" = xyes; then :
     9937
     9938else
     9939  as_fn_error $? "oops! no avpicture_fill ?!?" "$LINENO" 5
     9940fi
     9941
     9942  for ac_func in sws_getCachedContext
     9943do :
     9944  ac_fn_cxx_check_func "$LINENO" "sws_getCachedContext" "ac_cv_func_sws_getCachedContext"
     9945if test "x$ac_cv_func_sws_getCachedContext" = xyes; then :
     9946  cat >>confdefs.h <<_ACEOF
     9947#define HAVE_SWS_GETCACHEDCONTEXT 1
     9948_ACEOF
     9949
     9950fi
     9951done
     9952
     9953  for ac_func in img_convert
    97039954do :
    97049955  ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"
     
    97119962done
    97129963
    9713 for ac_func in sws_scale
     9964  for ac_func in sws_scale
    97149965do :
    97159966  ac_fn_cxx_check_func "$LINENO" "sws_scale" "ac_cv_func_sws_scale"
     
    97229973done
    97239974
     9975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     9976/* end confdefs.h.  */
     9977
     9978#define __STDC_CONSTANT_MACROS 1
     9979#include <stdlib.h>
     9980#ifdef HAVE_FFMPEG_AVCODEC_H
     9981# include <ffmpeg/avcodec.h>
     9982#endif
     9983#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     9984# include <libavcodec/avcodec.h>
     9985#endif
     9986int x = AVMEDIA_TYPE_VIDEO;
     9987
     9988int
     9989main ()
     9990{
     9991
     9992  ;
     9993  return 0;
     9994}
     9995_ACEOF
     9996if ac_fn_cxx_try_compile "$LINENO"; then :
     9997  ac_avmedia_type_video="yes"
     9998else
     9999  ac_avmedia_type_video="no"
     10000fi
     10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     10002  if test "$ac_avmedia_type_video" == "yes" ; then
     10003
     10004$as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h
     10005
     10006  fi
     10007fi
    972410008
    972510009
     
    980110085
    980210086
     10087
     10088
     10089
     10090
     10091
     10092
     10093
    980310094ac_configure_args="--disable-threads --enable-shared"
    980410095
     
    980710098
    980810099
    9809 ac_config_files="$ac_config_files Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile src/objects/RpHash.h gui/Makefile gui/apps/Makefile gui/apps/about gui/apps/encodedata gui/apps/rappture gui/apps/rappture-csh.env gui/apps/rappture.env gui/apps/rappture.use gui/apps/rerun gui/apps/simsim gui/apps/xmldiff gui/pkgIndex.tcl gui/scripts/Makefile gui/src/Makefile builder/Makefile builder/pkgIndex.tcl builder/scripts/Makefile tester/Makefile tester/pkgIndex.tcl tester/scripts/Makefile lang/Makefile lang/java/Makefile lang/java/rappture/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/octave/octave2/Makefile lang/octave/octave3/Makefile lang/ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile lib/Makefile examples/3D/Makefile examples/Makefile examples/app-fermi/2.0/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/java/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/matlab/compiled/Makefile examples/app-fermi/matlab/uncompiled/Makefile examples/app-fermi/octave/octave2/Makefile examples/app-fermi/octave/octave3/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/perl/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/flow/Makefile examples/flow/demo1/Makefile examples/flow/demo2/Makefile examples/flow/demo3/Makefile examples/graph/Makefile examples/objects/Makefile examples/objects/axis/Makefile examples/objects/contour/Makefile examples/objects/curve/Makefile examples/objects/dxWriter/Makefile examples/objects/floatBuffer/Makefile examples/objects/histogram/Makefile examples/objects/library/Makefile examples/objects/number/Makefile examples/objects/path/Makefile examples/objects/plot/Makefile examples/objects/scatter/Makefile examples/objects/string/Makefile examples/objects/tree/Makefile examples/objects/xmlparser/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/datatable/Makefile examples/zoo/datatable/matlab/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/filechoice/Makefile examples/zoo/group/Makefile examples/zoo/histogram/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/integer2/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/loadrun/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/number2/Makefile examples/zoo/parallelepiped/Makefile examples/zoo/periodicelement/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile examples/zoo/unirect2d/Makefile oldtest/Makefile oldtest/src/Makefile"
     10100ac_config_files="$ac_config_files Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile src/objects/RpHash.h gui/Makefile gui/apps/Makefile gui/apps/about gui/apps/encodedata gui/apps/rappture gui/apps/rappture-csh.env gui/apps/rappture.env gui/apps/rappture.use gui/apps/rerun gui/apps/simsim gui/apps/xmldiff gui/pkgIndex.tcl gui/scripts/Makefile gui/src/Makefile builder/Makefile builder/pkgIndex.tcl builder/scripts/Makefile tester/Makefile tester/pkgIndex.tcl tester/scripts/Makefile lang/Makefile lang/java/Makefile lang/java/rappture/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/octave/octave2/Makefile lang/octave/octave3/Makefile lang/R/Makefile lang/ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile lib/Makefile examples/3D/Makefile examples/Makefile examples/app-fermi/2.0/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/java/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/matlab/compiled/Makefile examples/app-fermi/matlab/uncompiled/Makefile examples/app-fermi/octave/octave2/Makefile examples/app-fermi/octave/octave3/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/perl/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/app-fermi/R/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/flow/Makefile examples/flow/demo1/Makefile examples/flow/demo2/Makefile examples/flow/demo3/Makefile examples/graph/Makefile examples/objects/Makefile examples/objects/axis/Makefile examples/objects/contour/Makefile examples/objects/curve/Makefile examples/objects/dxWriter/Makefile examples/objects/floatBuffer/Makefile examples/objects/histogram/Makefile examples/objects/library/Makefile examples/objects/number/Makefile examples/objects/path/Makefile examples/objects/plot/Makefile examples/objects/scatter/Makefile examples/objects/string/Makefile examples/objects/tree/Makefile examples/objects/xmlparser/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/datatable/Makefile examples/zoo/datatable/matlab/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/filechoice/Makefile examples/zoo/group/Makefile examples/zoo/histogram/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/integer2/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/loadrun/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/number2/Makefile examples/zoo/parallelepiped/Makefile examples/zoo/periodicelement/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile examples/zoo/unirect2d/Makefile oldtest/Makefile oldtest/src/Makefile"
    981010101
    981110102cat >confcache <<\_ACEOF
     
    1055310844    "lang/octave/octave2/Makefile") CONFIG_FILES="$CONFIG_FILES lang/octave/octave2/Makefile" ;;
    1055410845    "lang/octave/octave3/Makefile") CONFIG_FILES="$CONFIG_FILES lang/octave/octave3/Makefile" ;;
     10846    "lang/R/Makefile") CONFIG_FILES="$CONFIG_FILES lang/R/Makefile" ;;
    1055510847    "lang/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES lang/ruby/Makefile" ;;
    1055610848    "lang/ruby/build.rb") CONFIG_FILES="$CONFIG_FILES lang/ruby/build.rb" ;;
     
    1058310875    "examples/app-fermi/wrapper/python/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/python/Makefile" ;;
    1058410876    "examples/app-fermi/wrapper/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/tcl/Makefile" ;;
     10877    "examples/app-fermi/R/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/R/Makefile" ;;
    1058510878    "examples/c-example/Makefile") CONFIG_FILES="$CONFIG_FILES examples/c-example/Makefile" ;;
    1058610879    "examples/canvas/Makefile") CONFIG_FILES="$CONFIG_FILES examples/canvas/Makefile" ;;
  • branches/blt4/configure.in

    r2716 r2742  
    166166fi
    167167
    168  
     168
    169169TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
    170170
     
    200200AC_MSG_RESULT([$VTKDIR])
    201201
    202 with_ncurses="yes"
    203 AC_ARG_WITH(
    204     [ncurses],
    205     [AS_HELP_STRING([--with-ncurses[=DIR]],
    206         [location of ncurses @<:@default=yes@:>@])],
    207     [],
    208     [with_ncurses=yes])
    209 
    210 if test "$with_vtk" != "no" ; then
    211   if test "$with_vtk" = "yes" ; then
    212     for path in \
    213      $libdir \
    214      $prefix/lib \
    215      $exec_prefix/lib \
    216      /usr/lib
    217     do
    218       for vtk in $path/vtk-* ; do
    219         if test -d "${vtk}" ; then
    220           VTKDIR=${vtk}
    221         fi
    222       done
    223       if test "x${VTKDIR}" != "x" ; then
    224         break
    225       fi
    226     done
    227   fi
    228 fi
    229 
    230202RP_LANG_MATLAB
    231203RP_LANG_OCTAVE
     
    233205RP_LANG_PYTHON
    234206RP_LANG_JAVA
     207RP_LANG_R
    235208
    236209RUBY=""
     
    313286#--------------------------------------------------------------------
    314287
    315 AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[],
    316 [[#define __STDC_CONSTANT_MACROS 1
    317   #ifdef HAVE_FFMPEG_AVCODEC_H
    318   # include <ffmpeg/avcodec.h>
    319   #endif
    320 ]])
    321 
    322 AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[],
    323 [[#define __STDC_CONSTANT_MACROS 1
    324   #ifdef HAVE_LIBAVCODEC_AVCODEC_H
    325   # include <libavcodec/avcodec.h>
    326   #endif
    327 ]])
    328 
    329 AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[],
    330 [[#define __STDC_CONSTANT_MACROS 1
    331   #ifdef HAVE_FFMPEG_AVFORMAT_H
    332   # include <ffmpeg/avformat.h>
    333   #endif
    334 ]])
    335 
    336 AC_CHECK_HEADERS([libavformat/avformat.h],[],[],
    337 [[#define __STDC_CONSTANT_MACROS 1
    338   #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
    339   # include <libavformat/avformat.h>
    340   #endif
    341 ]])
    342 
    343 AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[],
    344 [[#define __STDC_CONSTANT_MACROS 1
    345   #ifdef HAVE_FFMPEG_AVUTIL_H
    346   # include <ffmpeg/avutil.h>
    347   #endif
    348 ]])
    349 
    350 AC_CHECK_HEADERS([libavutil/avutil.h],[],[],
    351 [[#define __STDC_CONSTANT_MACROS 1
    352   #ifdef HAVE_LIBAVUTIL_AVUTIL_H
    353   # include <libavutil/avutil.h>
    354   #endif
    355 ]])
    356 
    357 AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[],
    358 [[#define __STDC_CONSTANT_MACROS 1
    359   #ifdef HAVE_FFMPEG_SWSCALE_H
    360   # include <ffmpeg/swscale.h>
    361   #endif
    362 ]])
    363 
    364 AC_CHECK_HEADERS([libswscale/swscale.h],[],[],
    365 [[#define __STDC_CONSTANT_MACROS 1
    366   #ifdef HAVE_LIBSWSCALE_SWSCALE_H
    367   # include <libswscale/swscale.h>
    368   #endif
    369 ]])
     288AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[
     289#define __STDC_CONSTANT_MACROS 1
     290])
    370291
    371292HAVE_FFMPEG_LIBS=""
     
    382303    AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets])
    383304  fi
    384 fi
    385 
    386 AC_CHECK_FUNCS(img_convert)
    387 AC_CHECK_FUNCS(sws_scale)
     305  AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(librappture requires libavcodec))
     306  AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(librappture requires libavutil))
     307  AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(librappture requires libavformat))
     308  AC_CHECK_LIB(swscale, main)
     309  AC_CHECK_FUNCS(avcodec_decode_video2)
     310  AC_CHECK_FUNCS(avcodec_decode_video)
     311  AC_CHECK_FUNCS(avformat_open_input)
     312  AC_CHECK_FUNCS(av_open_input_file)
     313  AC_CHECK_FUNCS(avio_close)
     314  AC_CHECK_FUNCS(url_close)
     315  AC_CHECK_FUNC(av_find_stream_info,,
     316  AC_MSG_ERROR(oops! no av_find_stream_info?!?))
     317  AC_CHECK_FUNC(avcodec_find_decoder,,
     318    AC_MSG_ERROR(oops! no av_codec_find_decoder ?!?))
     319  AC_CHECK_FUNC(avcodec_open,,AC_MSG_ERROR(oops! avcodec_open ?!?))
     320  AC_CHECK_FUNC(avcodec_alloc_frame,,
     321    AC_MSG_ERROR(oops! no avcode_alloc_frame ?!?))
     322  AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?))
     323  AC_CHECK_FUNC(av_read_frame,,AC_MSG_ERROR(oops! av_read_frame ?!?))
     324  AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_frame ?!?))
     325  AC_CHECK_FUNC(avcodec_default_release_buffer,,
     326    AC_MSG_ERROR(oops! no avcode_default_release_buffer ?!?))
     327  AC_CHECK_FUNC(avpicture_get_size,,
     328    AC_MSG_ERROR(oops! no avpicture_get_size ?!?))
     329  AC_CHECK_FUNC(avpicture_fill,,AC_MSG_ERROR(oops! no avpicture_fill ?!?))
     330  AC_CHECK_FUNCS(sws_getCachedContext)
     331  AC_CHECK_FUNCS(img_convert)
     332  AC_CHECK_FUNCS(sws_scale)
     333  AC_TRY_COMPILE([
     334#define __STDC_CONSTANT_MACROS 1
     335#include <stdlib.h>
     336#ifdef HAVE_FFMPEG_AVCODEC_H
     337# include <ffmpeg/avcodec.h>
     338#endif
     339#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     340# include <libavcodec/avcodec.h>
     341#endif
     342int x = AVMEDIA_TYPE_VIDEO;
     343],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no")
     344  if test "$ac_avmedia_type_video" == "yes" ; then
     345    AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ])
     346  fi
     347fi
    388348
    389349AC_SUBST(CFLAGS_DEBUG)
     
    434394AC_SUBST(PYTHON_SITE_PACKAGES)
    435395AC_SUBST(PYTHON_VERSION)
     396AC_SUBST(R)
    436397AC_SUBST(RP_BASE)
    437398AC_SUBST(RUBY)
     
    513474    lang/octave/octave2/Makefile
    514475    lang/octave/octave3/Makefile
     476    lang/R/Makefile
    515477    lang/ruby/Makefile
    516478    lang/ruby/build.rb
     
    543505    examples/app-fermi/wrapper/python/Makefile
    544506    examples/app-fermi/wrapper/tcl/Makefile
     507    examples/app-fermi/R/Makefile
    545508    examples/c-example/Makefile
    546509    examples/canvas/Makefile
  • branches/blt4/examples/app-fermi/Makefile.in

    r2541 r2742  
    1414INSTALL_SCRIPT  = ${INSTALL} -m 644
    1515
    16 F77 =           @F77@
    17 CC =            @CC@
    18 CXX =           @CXX@
    19 RUBY =          @RUBY@
    20 PERL =          @PERL@
    21 TCLSH =         @TCLSH@
    22 PYTHON =        @PYTHON@
    23 MEX =           @MEX@
    24 MKOCTFILE2 =    @MKOCTFILE2@
    25 MKOCTFILE3 =    @MKOCTFILE3@
    26 OCTAVE =        $(MKOCTFILE2) $(MKOCTFILE3)
    27 JAVAC =         @JAVAC@
     16F77 =        @F77@
     17CC =         @CC@
     18CXX =        @CXX@
     19RUBY =       @RUBY@
     20PERL =       @PERL@
     21TCLSH =      @TCLSH@
     22PYTHON =     @PYTHON@
     23MEX =        @MEX@
     24MKOCTFILE2 = @MKOCTFILE2@
     25MKOCTFILE3 = @MKOCTFILE3@
     26OCTAVE =     $(MKOCTFILE2) $(MKOCTFILE3)
     27JAVAC =      @JAVAC@
     28R =          @R@
    2829
    2930.PHONY: tcl cee fortran octave matlab perl python ruby java 2.0 wrapper
     
    5152    LANGS += java
    5253endif
     54ifneq ($(R),)
     55    LANGS += R
     56endif
    5357
    5458all:   
  • branches/blt4/gui/apps/Makefile.in

    r2704 r2742  
    2828                $(srcdir)/vtkstreamlines-test \
    2929                $(srcdir)/vtkviewer-test \
     30                $(srcdir)/vtkvolume-test \
    3031                $(srcdir)/flowvis-test \
    3132                $(srcdir)/rpdiff \
     
    5657
    5758distclean: clean
    58         $(RM) encodedata rappture.env rappture rappture.use rerun rpdiff simsim xmldiff
     59        $(RM) encodedata rappture.env rappture rappture.use rerun simsim xmldiff
    5960        $(RM) Makefile *~
    6061
  • branches/blt4/gui/apps/rappture.use.in

    r1988 r2742  
    3535prepend TK_LIBRARY ${libdir}/tk${tcl_version}
    3636
     37prepend R_LIBS ${libdir}/R
     38
    3739tags DEVEL
  • branches/blt4/gui/apps/vtkcontour-test

    r2536 r2742  
    244244    if {"" != $file && [catch {
    245245            set fid [open $file r]
    246             fconfigure $fid -translation binary
     246            fconfigure $fid -translation binary -encoding binary
    247247            set info [read $fid]
    248248            close $fid
  • branches/blt4/gui/apps/vtkstreamlines-test

    r2536 r2742  
    122122    if {"" != $file && [catch {
    123123            set fid [open $file r]
    124             fconfigure $fid -translation binary
     124            fconfigure $fid -translation binary -encoding binary
    125125            set info [read $fid]
    126126            close $fid
     
    143143    if {"" != $file && [catch {
    144144            set fid [open $file r]
    145             fconfigure $fid -translation binary
     145            fconfigure $fid -translation binary -encoding binary
    146146            set info [read $fid]
    147147            close $fid
     
    164164    if {"" != $file && [catch {
    165165            set fid [open $file r]
    166             fconfigure $fid -translation binary
     166            fconfigure $fid -translation binary -encoding binary
    167167            set info [read $fid]
    168168            close $fid
  • branches/blt4/gui/apps/vtkviewer-test

    r2536 r2742  
    9090        return $_data
    9191    }
     92    public method vtkdata {args} {
     93        return $_data
     94    }
    9295    public method values {args} {
    9396        return $_data
     
    116119    if {"" != $file && [catch {
    117120            set fid [open $file r]
    118             fconfigure $fid -translation binary
     121            fconfigure $fid -translation binary -encoding binary
    119122            set info [read $fid]
    120123            close $fid
     
    137140    if {"" != $file && [catch {
    138141            set fid [open $file r]
    139             fconfigure $fid -translation binary
     142            fconfigure $fid -translation binary -encoding binary
    140143            set info [read $fid]
    141144            close $fid
  • branches/blt4/gui/cf/config.guess

    r2706 r2742  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2008-04-14'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    87
    98# This file is free software; you can redistribute it and/or modify it
     
    1918# You should have received a copy of the GNU General Public License
    2019# along with this program; if not, write to the Free Software
    21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    22 # 02110-1301, USA.
     20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    2321#
    2422# As a special exception to the GNU General Public License, if you
     
    2624# configuration script generated by Autoconf, you may include it under
    2725# the same distribution terms that you use for the rest of that program.
    28 
    2926
    3027# Originally written by Per Bothner <per@bothner.com>.
     
    5754
    5855Originally written by Per Bothner.
    59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     57Free Software Foundation, Inc.
    6158
    6259This is free software; see the source for copying conditions.  There is NO
     
    7067  case $1 in
    7168    --time-stamp | --time* | -t )
    72        echo "$timestamp" ; exit ;;
     69       echo "$timestamp" ; exit 0 ;;
    7370    --version | -v )
    74        echo "$version" ; exit ;;
     71       echo "$version" ; exit 0 ;;
    7572    --help | --h* | -h )
    76        echo "$usage"; exit ;;
     73       echo "$usage"; exit 0 ;;
    7774    -- )     # Stop option processing
    7875       shift; break ;;
     
    108105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    109106: ${TMPDIR=/tmp} ;
    110  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    111108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    112  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    113109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    114110dummy=$tmp/dummy ;
     
    127123 ,,*)   CC_FOR_BUILD=$CC ;;
    128124 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    129 esac ; set_cc_for_build= ;'
     125esac ;'
    130126
    131127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    162158            sh3el) machine=shl-unknown ;;
    163159            sh3eb) machine=sh-unknown ;;
    164             sh5el) machine=sh5le-unknown ;;
    165160            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    166161        esac
     
    201196        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    202197        echo "${machine}-${os}${release}"
    203         exit ;;
     198        exit 0 ;;
     199    amiga:OpenBSD:*:*)
     200        echo m68k-unknown-openbsd${UNAME_RELEASE}
     201        exit 0 ;;
     202    arc:OpenBSD:*:*)
     203        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     204        exit 0 ;;
     205    hp300:OpenBSD:*:*)
     206        echo m68k-unknown-openbsd${UNAME_RELEASE}
     207        exit 0 ;;
     208    mac68k:OpenBSD:*:*)
     209        echo m68k-unknown-openbsd${UNAME_RELEASE}
     210        exit 0 ;;
     211    macppc:OpenBSD:*:*)
     212        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     213        exit 0 ;;
     214    mvme68k:OpenBSD:*:*)
     215        echo m68k-unknown-openbsd${UNAME_RELEASE}
     216        exit 0 ;;
     217    mvme88k:OpenBSD:*:*)
     218        echo m88k-unknown-openbsd${UNAME_RELEASE}
     219        exit 0 ;;
     220    mvmeppc:OpenBSD:*:*)
     221        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     222        exit 0 ;;
     223    pmax:OpenBSD:*:*)
     224        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     225        exit 0 ;;
     226    sgi:OpenBSD:*:*)
     227        echo mipseb-unknown-openbsd${UNAME_RELEASE}
     228        exit 0 ;;
     229    sun3:OpenBSD:*:*)
     230        echo m68k-unknown-openbsd${UNAME_RELEASE}
     231        exit 0 ;;
     232    wgrisc:OpenBSD:*:*)
     233        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     234        exit 0 ;;
    204235    *:OpenBSD:*:*)
    205         UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    206         echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
    207         exit ;;
    208     *:ekkoBSD:*:*)
    209         echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
    210         exit ;;
    211     *:SolidBSD:*:*)
    212         echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
    213         exit ;;
    214     macppc:MirBSD:*:*)
    215         echo powerpc-unknown-mirbsd${UNAME_RELEASE}
    216         exit ;;
    217     *:MirBSD:*:*)
    218         echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
    219         exit ;;
     236        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
     237        exit 0 ;;
    220238    alpha:OSF1:*:*)
    221         case $UNAME_RELEASE in
    222         *4.0)
     239        if test $UNAME_RELEASE = "V4.0"; then
    223240                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    224                 ;;
    225         *5.*)
    226                 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
    227                 ;;
    228         esac
     241        fi
    229242        # According to Compaq, /usr/sbin/psrinfo has been available on
    230243        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     
    264277                UNAME_MACHINE="alphaev79" ;;
    265278        esac
    266         # A Pn.n version is a patched version.
    267279        # A Vn.n version is a released version.
    268280        # A Tn.n version is a released field test version.
    269281        # A Xn.n version is an unreleased experimental baselevel.
    270282        # 1.2 uses "1.2" for uname -r.
    271         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    272         exit ;;
     283        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     284        exit 0 ;;
    273285    Alpha\ *:Windows_NT*:*)
    274286        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    276288        # of the specific Alpha model?
    277289        echo alpha-pc-interix
    278         exit ;;
     290        exit 0 ;;
    279291    21064:Windows_NT:50:3)
    280292        echo alpha-dec-winnt3.5
    281         exit ;;
     293        exit 0 ;;
    282294    Amiga*:UNIX_System_V:4.0:*)
    283295        echo m68k-unknown-sysv4
    284         exit ;;
     296        exit 0;;
    285297    *:[Aa]miga[Oo][Ss]:*:*)
    286298        echo ${UNAME_MACHINE}-unknown-amigaos
    287         exit ;;
     299        exit 0 ;;
    288300    *:[Mm]orph[Oo][Ss]:*:*)
    289301        echo ${UNAME_MACHINE}-unknown-morphos
    290         exit ;;
     302        exit 0 ;;
    291303    *:OS/390:*:*)
    292304        echo i370-ibm-openedition
    293         exit ;;
    294     *:z/VM:*:*)
    295         echo s390-ibm-zvmoe
    296         exit ;;
    297     *:OS400:*:*)
    298         echo powerpc-ibm-os400
    299         exit ;;
     305        exit 0 ;;
    300306    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    301307        echo arm-acorn-riscix${UNAME_RELEASE}
    302         exit ;;
    303     arm:riscos:*:*|arm:RISCOS:*:*)
    304         echo arm-unknown-riscos
    305         exit ;;
     308        exit 0;;
    306309    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    307310        echo hppa1.1-hitachi-hiuxmpp
    308         exit ;;
     311        exit 0;;
    309312    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    310313        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
     
    314317                echo pyramid-pyramid-bsd
    315318        fi
    316         exit ;;
     319        exit 0 ;;
    317320    NILE*:*:*:dcosx)
    318321        echo pyramid-pyramid-svr4
    319         exit ;;
    320     DRS?6000:unix:4.0:6*)
    321         echo sparc-icl-nx6
    322         exit ;;
    323     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
     322        exit 0 ;;
     323    DRS?6000:UNIX_SV:4.2*:7*)
    324324        case `/usr/bin/uname -p` in
    325             sparc) echo sparc-icl-nx7; exit ;;
     325            sparc) echo sparc-icl-nx7 && exit 0 ;;
    326326        esac ;;
    327327    sun4H:SunOS:5.*:*)
    328328        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    329         exit ;;
     329        exit 0 ;;
    330330    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    331331        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    332         exit ;;
    333     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
     332        exit 0 ;;
     333    i86pc:SunOS:5.*:*)
    334334        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    335         exit ;;
     335        exit 0 ;;
    336336    sun4*:SunOS:6*:*)
    337337        # According to config.sub, this is the proper way to canonicalize
     
    339339        # it's likely to be more like Solaris than SunOS4.
    340340        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    341         exit ;;
     341        exit 0 ;;
    342342    sun4*:SunOS:*:*)
    343343        case "`/usr/bin/arch -k`" in
     
    348348        # Japanese Language versions have a version number like `4.1.3-JL'.
    349349        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    350         exit ;;
     350        exit 0 ;;
    351351    sun3*:SunOS:*:*)
    352352        echo m68k-sun-sunos${UNAME_RELEASE}
    353         exit ;;
     353        exit 0 ;;
    354354    sun*:*:4.2BSD:*)
    355355        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     
    363363                ;;
    364364        esac
    365         exit ;;
     365        exit 0 ;;
    366366    aushp:SunOS:*:*)
    367367        echo sparc-auspex-sunos${UNAME_RELEASE}
    368         exit ;;
     368        exit 0 ;;
    369369    # The situation for MiNT is a little confusing.  The machine name
    370370    # can be virtually everything (everything which is not
     
    377377    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    378378        echo m68k-atari-mint${UNAME_RELEASE}
    379         exit ;;
     379        exit 0 ;;
    380380    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    381381        echo m68k-atari-mint${UNAME_RELEASE}
    382         exit ;;
     382        exit 0 ;;
    383383    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    384384        echo m68k-atari-mint${UNAME_RELEASE}
    385         exit ;;
     385        exit 0 ;;
    386386    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    387387        echo m68k-milan-mint${UNAME_RELEASE}
    388         exit ;;
     388        exit 0 ;;
    389389    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    390390        echo m68k-hades-mint${UNAME_RELEASE}
    391         exit ;;
     391        exit 0 ;;
    392392    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    393393        echo m68k-unknown-mint${UNAME_RELEASE}
    394         exit ;;
    395     m68k:machten:*:*)
    396         echo m68k-apple-machten${UNAME_RELEASE}
    397         exit ;;
     394        exit 0 ;;
    398395    powerpc:machten:*:*)
    399396        echo powerpc-apple-machten${UNAME_RELEASE}
    400         exit ;;
     397        exit 0 ;;
    401398    RISC*:Mach:*:*)
    402399        echo mips-dec-mach_bsd4.3
    403         exit ;;
     400        exit 0 ;;
    404401    RISC*:ULTRIX:*:*)
    405402        echo mips-dec-ultrix${UNAME_RELEASE}
    406         exit ;;
     403        exit 0 ;;
    407404    VAX*:ULTRIX*:*:*)
    408405        echo vax-dec-ultrix${UNAME_RELEASE}
    409         exit ;;
     406        exit 0 ;;
    410407    2020:CLIX:*:* | 2430:CLIX:*:*)
    411408        echo clipper-intergraph-clix${UNAME_RELEASE}
    412         exit ;;
     409        exit 0 ;;
    413410    mips:*:*:UMIPS | mips:*:*:RISCos)
    414411        eval $set_cc_for_build
     
    434431        }
    435432EOF
    436         $CC_FOR_BUILD -o $dummy $dummy.c &&
    437           dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
    438           SYSTEM_NAME=`$dummy $dummyarg` &&
    439             { echo "$SYSTEM_NAME"; exit; }
     433        $CC_FOR_BUILD -o $dummy $dummy.c \
     434          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     435          && exit 0
    440436        echo mips-mips-riscos${UNAME_RELEASE}
    441         exit ;;
     437        exit 0 ;;
    442438    Motorola:PowerMAX_OS:*:*)
    443439        echo powerpc-motorola-powermax
    444         exit ;;
     440        exit 0 ;;
    445441    Motorola:*:4.3:PL8-*)
    446442        echo powerpc-harris-powermax
    447         exit ;;
     443        exit 0 ;;
    448444    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    449445        echo powerpc-harris-powermax
    450         exit ;;
     446        exit 0 ;;
    451447    Night_Hawk:Power_UNIX:*:*)
    452448        echo powerpc-harris-powerunix
    453         exit ;;
     449        exit 0 ;;
    454450    m88k:CX/UX:7*:*)
    455451        echo m88k-harris-cxux7
    456         exit ;;
     452        exit 0 ;;
    457453    m88k:*:4*:R4*)
    458454        echo m88k-motorola-sysv4
    459         exit ;;
     455        exit 0 ;;
    460456    m88k:*:3*:R3*)
    461457        echo m88k-motorola-sysv3
    462         exit ;;
     458        exit 0 ;;
    463459    AViiON:dgux:*:*)
    464460        # DG/UX returns AViiON for all architectures
     
    476472            echo i586-dg-dgux${UNAME_RELEASE}
    477473        fi
    478         exit ;;
     474        exit 0 ;;
    479475    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    480476        echo m88k-dolphin-sysv3
    481         exit ;;
     477        exit 0 ;;
    482478    M88*:*:R3*:*)
    483479        # Delta 88k system running SVR3
    484480        echo m88k-motorola-sysv3
    485         exit ;;
     481        exit 0 ;;
    486482    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    487483        echo m88k-tektronix-sysv3
    488         exit ;;
     484        exit 0 ;;
    489485    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    490486        echo m68k-tektronix-bsd
    491         exit ;;
     487        exit 0 ;;
    492488    *:IRIX*:*:*)
    493489        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    494         exit ;;
     490        exit 0 ;;
    495491    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    496         echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
    497         exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     492        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
     493        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    498494    i*86:AIX:*:*)
    499495        echo i386-ibm-aix
    500         exit ;;
     496        exit 0 ;;
    501497    ia64:AIX:*:*)
    502498        if [ -x /usr/bin/oslevel ] ; then
     
    506502        fi
    507503        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    508         exit ;;
     504        exit 0 ;;
    509505    *:AIX:2:3)
    510506        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     
    521517                        }
    522518EOF
    523                 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
    524                 then
    525                         echo "$SYSTEM_NAME"
    526                 else
    527                         echo rs6000-ibm-aix3.2.5
    528                 fi
     519                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
     520                echo rs6000-ibm-aix3.2.5
    529521        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    530522                echo rs6000-ibm-aix3.2.4
     
    532524                echo rs6000-ibm-aix3.2
    533525        fi
    534         exit ;;
    535     *:AIX:*:[456])
     526        exit 0 ;;
     527    *:AIX:*:[45])
    536528        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    537529        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     
    546538        fi
    547539        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    548         exit ;;
     540        exit 0 ;;
    549541    *:AIX:*:*)
    550542        echo rs6000-ibm-aix
    551         exit ;;
     543        exit 0 ;;
    552544    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    553545        echo romp-ibm-bsd4.4
    554         exit ;;
     546        exit 0 ;;
    555547    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    556548        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    557         exit ;;                             # report: romp-ibm BSD 4.3
     549        exit 0 ;;                           # report: romp-ibm BSD 4.3
    558550    *:BOSX:*:*)
    559551        echo rs6000-bull-bosx
    560         exit ;;
     552        exit 0 ;;
    561553    DPX/2?00:B.O.S.:*:*)
    562554        echo m68k-bull-sysv3
    563         exit ;;
     555        exit 0 ;;
    564556    9000/[34]??:4.3bsd:1.*:*)
    565557        echo m68k-hp-bsd
    566         exit ;;
     558        exit 0 ;;
    567559    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    568560        echo m68k-hp-bsd4.4
    569         exit ;;
     561        exit 0 ;;
    570562    9000/[34678]??:HP-UX:*:*)
    571563        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     
    629621        if [ ${HP_ARCH} = "hppa2.0w" ]
    630622        then
    631             eval $set_cc_for_build
    632 
    633             # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
    634             # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
    635             # generating 64-bit code.  GNU and HP use different nomenclature:
    636             #
    637             # $ CC_FOR_BUILD=cc ./config.guess
    638             # => hppa2.0w-hp-hpux11.23
    639             # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
    640             # => hppa64-hp-hpux11.23
    641 
    642             if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
    643                 grep __LP64__ >/dev/null
     623            # avoid double evaluation of $set_cc_for_build
     624            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
     625            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
    644626            then
    645627                HP_ARCH="hppa2.0w"
     
    649631        fi
    650632        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    651         exit ;;
     633        exit 0 ;;
    652634    ia64:HP-UX:*:*)
    653635        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    654636        echo ia64-hp-hpux${HPUX_REV}
    655         exit ;;
     637        exit 0 ;;
    656638    3050*:HI-UX:*:*)
    657639        eval $set_cc_for_build
     
    681663        }
    682664EOF
    683         $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
    684                 { echo "$SYSTEM_NAME"; exit; }
     665        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    685666        echo unknown-hitachi-hiuxwe2
    686         exit ;;
     667        exit 0 ;;
    687668    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    688669        echo hppa1.1-hp-bsd
    689         exit ;;
     670        exit 0 ;;
    690671    9000/8??:4.3bsd:*:*)
    691672        echo hppa1.0-hp-bsd
    692         exit ;;
     673        exit 0 ;;
    693674    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    694675        echo hppa1.0-hp-mpeix
    695         exit ;;
     676        exit 0 ;;
    696677    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    697678        echo hppa1.1-hp-osf
    698         exit ;;
     679        exit 0 ;;
    699680    hp8??:OSF1:*:*)
    700681        echo hppa1.0-hp-osf
    701         exit ;;
     682        exit 0 ;;
    702683    i*86:OSF1:*:*)
    703684        if [ -x /usr/sbin/sysversion ] ; then
     
    706687            echo ${UNAME_MACHINE}-unknown-osf1
    707688        fi
    708         exit ;;
     689        exit 0 ;;
    709690    parisc*:Lites*:*:*)
    710691        echo hppa1.1-hp-lites
    711         exit ;;
     692        exit 0 ;;
    712693    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    713694        echo c1-convex-bsd
    714         exit ;;
     695        exit 0 ;;
    715696    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    716697        if getsysinfo -f scalar_acc
     
    718699        else echo c2-convex-bsd
    719700        fi
    720         exit ;;
     701        exit 0 ;;
    721702    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    722703        echo c34-convex-bsd
    723         exit ;;
     704        exit 0 ;;
    724705    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    725706        echo c38-convex-bsd
    726         exit ;;
     707        exit 0 ;;
    727708    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    728709        echo c4-convex-bsd
    729         exit ;;
     710        exit 0 ;;
    730711    CRAY*Y-MP:*:*:*)
    731712        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    732         exit ;;
     713        exit 0 ;;
    733714    CRAY*[A-Z]90:*:*:*)
    734715        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     
    736717              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    737718              -e 's/\.[^.]*$/.X/'
    738         exit ;;
     719        exit 0 ;;
    739720    CRAY*TS:*:*:*)
    740721        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    741         exit ;;
     722        exit 0 ;;
    742723    CRAY*T3E:*:*:*)
    743724        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    744         exit ;;
     725        exit 0 ;;
    745726    CRAY*SV1:*:*:*)
    746727        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    747         exit ;;
     728        exit 0 ;;
    748729    *:UNICOS/mp:*:*)
    749         echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    750         exit ;;
     730        echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     731        exit 0 ;;
    751732    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    752733        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     
    754735        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    755736        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    756         exit ;;
    757     5000:UNIX_System_V:4.*:*)
    758         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    759         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
    760         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    761         exit ;;
     737        exit 0 ;;
    762738    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    763739        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    764         exit ;;
     740        exit 0 ;;
    765741    sparc*:BSD/OS:*:*)
    766742        echo sparc-unknown-bsdi${UNAME_RELEASE}
    767         exit ;;
     743        exit 0 ;;
    768744    *:BSD/OS:*:*)
    769745        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    770         exit ;;
     746        exit 0 ;;
    771747    *:FreeBSD:*:*)
    772         case ${UNAME_MACHINE} in
    773             pc98)
    774                 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    775             amd64)
    776                 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    777             *)
    778                 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    779         esac
    780         exit ;;
     748        # Determine whether the default compiler uses glibc.
     749        eval $set_cc_for_build
     750        sed 's/^        //' << EOF >$dummy.c
     751        #include <features.h>
     752        #if __GLIBC__ >= 2
     753        LIBC=gnu
     754        #else
     755        LIBC=
     756        #endif
     757EOF
     758        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     759        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
     760        exit 0 ;;
    781761    i*:CYGWIN*:*)
    782762        echo ${UNAME_MACHINE}-pc-cygwin
    783         exit ;;
    784     *:MINGW*:*)
     763        exit 0 ;;
     764    i*:MINGW*:*)
    785765        echo ${UNAME_MACHINE}-pc-mingw32
    786         exit ;;
    787     i*:windows32*:*)
    788         # uname -m includes "-pc" on this system.
    789         echo ${UNAME_MACHINE}-mingw32
    790         exit ;;
     766        exit 0 ;;
     767    i*:MSYS*:*)
     768        echo ${UNAME_MACHINE}-pc-msys
     769        exit 0 ;;
    791770    i*:PW*:*)
    792771        echo ${UNAME_MACHINE}-pc-pw32
    793         exit ;;
    794     *:Interix*:[3456]*)
    795         case ${UNAME_MACHINE} in
    796             x86)
    797                 echo i586-pc-interix${UNAME_RELEASE}
    798                 exit ;;
    799             EM64T | authenticamd)
    800                 echo x86_64-unknown-interix${UNAME_RELEASE}
    801                 exit ;;
    802             IA64)
    803                 echo ia64-unknown-interix${UNAME_RELEASE}
    804                 exit ;;
    805         esac ;;
     772        exit 0 ;;
     773    x86:Interix*:3*)
     774        echo i586-pc-interix3
     775        exit 0 ;;
    806776    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    807777        echo i${UNAME_MACHINE}-pc-mks
    808         exit ;;
     778        exit 0 ;;
    809779    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    810780        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    812782        # UNAME_MACHINE based on the output of uname instead of i386?
    813783        echo i586-pc-interix
    814         exit ;;
     784        exit 0 ;;
    815785    i*:UWIN*:*)
    816786        echo ${UNAME_MACHINE}-pc-uwin
    817         exit ;;
    818     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    819         echo x86_64-unknown-cygwin
    820         exit ;;
     787        exit 0 ;;
    821788    p*:CYGWIN*:*)
    822789        echo powerpcle-unknown-cygwin
    823         exit ;;
     790        exit 0 ;;
    824791    prep*:SunOS:5.*:*)
    825792        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    826         exit ;;
     793        exit 0 ;;
    827794    *:GNU:*:*)
    828         # the GNU system
    829795        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    830         exit ;;
    831     *:GNU/*:*:*)
    832         # other systems with GNU libc and userland
    833         echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
    834         exit ;;
     796        exit 0 ;;
    835797    i*86:Minix:*:*)
    836798        echo ${UNAME_MACHINE}-pc-minix
    837         exit ;;
     799        exit 0 ;;
    838800    arm*:Linux:*:*)
    839         eval $set_cc_for_build
    840         if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    841             | grep -q __ARM_EABI__
    842         then
    843             echo ${UNAME_MACHINE}-unknown-linux-gnu
    844         else
    845             echo ${UNAME_MACHINE}-unknown-linux-gnueabi
    846         fi
    847         exit ;;
    848     avr32*:Linux:*:*)
    849801        echo ${UNAME_MACHINE}-unknown-linux-gnu
    850         exit ;;
    851     cris:Linux:*:*)
    852         echo cris-axis-linux-gnu
    853         exit ;;
    854     crisv32:Linux:*:*)
    855         echo crisv32-axis-linux-gnu
    856         exit ;;
    857     frv:Linux:*:*)
    858         echo frv-unknown-linux-gnu
    859         exit ;;
     802        exit 0 ;;
    860803    ia64:Linux:*:*)
    861804        echo ${UNAME_MACHINE}-unknown-linux-gnu
    862         exit ;;
    863     m32r*:Linux:*:*)
    864         echo ${UNAME_MACHINE}-unknown-linux-gnu
    865         exit ;;
     805        exit 0 ;;
    866806    m68*:Linux:*:*)
    867807        echo ${UNAME_MACHINE}-unknown-linux-gnu
    868         exit ;;
     808        exit 0 ;;
    869809    mips:Linux:*:*)
    870810        eval $set_cc_for_build
     
    883823        #endif
    884824EOF
    885         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    886             /^CPU/{
    887                 s: ::g
    888                 p
    889             }'`"
    890         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     825        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     826        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
    891827        ;;
    892828    mips64:Linux:*:*)
     
    906842        #endif
    907843EOF
    908         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    909             /^CPU/{
    910                 s: ::g
    911                 p
    912             }'`"
    913         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     844        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     845        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
    914846        ;;
    915     or32:Linux:*:*)
    916         echo or32-unknown-linux-gnu
    917         exit ;;
    918847    ppc:Linux:*:*)
    919848        echo powerpc-unknown-linux-gnu
    920         exit ;;
     849        exit 0 ;;
    921850    ppc64:Linux:*:*)
    922851        echo powerpc64-unknown-linux-gnu
    923         exit ;;
     852        exit 0 ;;
    924853    alpha:Linux:*:*)
    925854        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     
    935864        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    936865        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    937         exit ;;
     866        exit 0 ;;
    938867    parisc:Linux:*:* | hppa:Linux:*:*)
    939868        # Look for CPU level
     
    943872          *)    echo hppa-unknown-linux-gnu ;;
    944873        esac
    945         exit ;;
     874        exit 0 ;;
    946875    parisc64:Linux:*:* | hppa64:Linux:*:*)
    947876        echo hppa64-unknown-linux-gnu
    948         exit ;;
     877        exit 0 ;;
    949878    s390:Linux:*:* | s390x:Linux:*:*)
    950879        echo ${UNAME_MACHINE}-ibm-linux
    951         exit ;;
    952     sh64*:Linux:*:*)
    953         echo ${UNAME_MACHINE}-unknown-linux-gnu
    954         exit ;;
     880        exit 0 ;;
    955881    sh*:Linux:*:*)
    956882        echo ${UNAME_MACHINE}-unknown-linux-gnu
    957         exit ;;
     883        exit 0 ;;
    958884    sparc:Linux:*:* | sparc64:Linux:*:*)
    959885        echo ${UNAME_MACHINE}-unknown-linux-gnu
    960         exit ;;
    961     vax:Linux:*:*)
    962         echo ${UNAME_MACHINE}-dec-linux-gnu
    963         exit ;;
     886        exit 0 ;;
    964887    x86_64:Linux:*:*)
    965888        echo x86_64-unknown-linux-gnu
    966         exit ;;
    967     xtensa*:Linux:*:*)
    968         echo ${UNAME_MACHINE}-unknown-linux-gnu
    969         exit ;;
     889        exit 0 ;;
    970890    i*86:Linux:*:*)
    971891        # The BFD linker knows what the default object file format is, so
     
    985905          a.out-i386-linux)
    986906                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    987                 exit ;;
     907                exit 0 ;;
     908          coff-i386)
     909                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     910                exit 0 ;;
    988911          "")
    989912                # Either a pre-BFD a.out linker (linux-gnuoldld) or
    990913                # one that does not give us useful --help.
    991914                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
    992                 exit ;;
     915                exit 0 ;;
    993916        esac
    994917        # Determine whether the default compiler is a.out or elf
     
    1007930        # endif
    1008931        #else
    1009         #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
     932        #ifdef __INTEL_COMPILER
    1010933        LIBC=gnu
    1011934        #else
     
    1013936        #endif
    1014937        #endif
    1015         #ifdef __dietlibc__
    1016         LIBC=dietlibc
    1017         #endif
    1018938EOF
    1019         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    1020             /^LIBC/{
    1021                 s: ::g
    1022                 p
    1023             }'`"
    1024         test x"${LIBC}" != x && {
    1025                 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
    1026                 exit
    1027         }
    1028         test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
     939        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     940        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     941        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    1029942        ;;
    1030943    i*86:DYNIX/ptx:4*:*)
     
    1033946        # sysname and nodename.
    1034947        echo i386-sequent-sysv4
    1035         exit ;;
     948        exit 0 ;;
    1036949    i*86:UNIX_SV:4.2MP:2.*)
    1037950        # Unixware is an offshoot of SVR4, but it has its own version
     
    1041954        # Use sysv4.2uw... so that sysv4* matches it.
    1042955        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    1043         exit ;;
     956        exit 0 ;;
    1044957    i*86:OS/2:*:*)
    1045958        # If we were able to find `uname', then EMX Unix compatibility
    1046959        # is probably installed.
    1047960        echo ${UNAME_MACHINE}-pc-os2-emx
    1048         exit ;;
     961        exit 0 ;;
    1049962    i*86:XTS-300:*:STOP)
    1050963        echo ${UNAME_MACHINE}-unknown-stop
    1051         exit ;;
     964        exit 0 ;;
    1052965    i*86:atheos:*:*)
    1053966        echo ${UNAME_MACHINE}-unknown-atheos
    1054         exit ;;
    1055     i*86:syllable:*:*)
    1056         echo ${UNAME_MACHINE}-pc-syllable
    1057         exit ;;
     967        exit 0 ;;
    1058968    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    1059969        echo i386-unknown-lynxos${UNAME_RELEASE}
    1060         exit ;;
     970        exit 0 ;;
    1061971    i*86:*DOS:*:*)
    1062972        echo ${UNAME_MACHINE}-pc-msdosdjgpp
    1063         exit ;;
     973        exit 0 ;;
    1064974    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    1065975        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     
    1069979                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    1070980        fi
    1071         exit ;;
    1072     i*86:*:5:[678]*)
    1073         # UnixWare 7.x, OpenUNIX and OpenServer 6.
     981        exit 0 ;;
     982    i*86:*:5:[78]*)
    1074983        case `/bin/uname -X | grep "^Machine"` in
    1075984            *486*)           UNAME_MACHINE=i486 ;;
     
    1078987        esac
    1079988        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    1080         exit ;;
     989        exit 0 ;;
    1081990    i*86:*:3.2:*)
    1082991        if test -f /usr/options/cb.name; then
     
    10961005                echo ${UNAME_MACHINE}-pc-sysv32
    10971006        fi
    1098         exit ;;
     1007        exit 0 ;;
    10991008    pc:*:*:*)
    11001009        # Left here for compatibility:
     
    11021011        # the processor, so we play safe by assuming i386.
    11031012        echo i386-pc-msdosdjgpp
    1104         exit ;;
     1013        exit 0 ;;
    11051014    Intel:Mach:3*:*)
    11061015        echo i386-pc-mach3
    1107         exit ;;
     1016        exit 0 ;;
    11081017    paragon:*:*:*)
    11091018        echo i860-intel-osf1
    1110         exit ;;
     1019        exit 0 ;;
    11111020    i860:*:4.*:*) # i860-SVR4
    11121021        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
     
    11151024          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
    11161025        fi
    1117         exit ;;
     1026        exit 0 ;;
    11181027    mini*:CTIX:SYS*5:*)
    11191028        # "miniframe"
    11201029        echo m68010-convergent-sysv
    1121         exit ;;
     1030        exit 0 ;;
    11221031    mc68k:UNIX:SYSTEM5:3.51m)
    11231032        echo m68k-convergent-sysv
    1124         exit ;;
     1033        exit 0 ;;
    11251034    M680?0:D-NIX:5.3:*)
    11261035        echo m68k-diab-dnix
    1127         exit ;;
    1128     M68*:*:R3V[5678]*:*)
    1129         test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
    1130     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
     1036        exit 0 ;;
     1037    M68*:*:R3V[567]*:*)
     1038        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
     1039    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
    11311040        OS_REL=''
    11321041        test -r /etc/.relid \
    11331042        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    11341043        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1135           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1044          && echo i486-ncr-sysv4.3${OS_REL} && exit 0
    11361045        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1137           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     1046          && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
    11381047    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    11391048        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1140           && { echo i486-ncr-sysv4; exit; } ;;
     1049          && echo i486-ncr-sysv4 && exit 0 ;;
    11411050    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    11421051        echo m68k-unknown-lynxos${UNAME_RELEASE}
    1143         exit ;;
     1052        exit 0 ;;
    11441053    mc68030:UNIX_System_V:4.*:*)
    11451054        echo m68k-atari-sysv4
    1146         exit ;;
     1055        exit 0 ;;
    11471056    TSUNAMI:LynxOS:2.*:*)
    11481057        echo sparc-unknown-lynxos${UNAME_RELEASE}
    1149         exit ;;
     1058        exit 0 ;;
    11501059    rs6000:LynxOS:2.*:*)
    11511060        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    1152         exit ;;
     1061        exit 0 ;;
    11531062    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
    11541063        echo powerpc-unknown-lynxos${UNAME_RELEASE}
    1155         exit ;;
     1064        exit 0 ;;
    11561065    SM[BE]S:UNIX_SV:*:*)
    11571066        echo mips-dde-sysv${UNAME_RELEASE}
    1158         exit ;;
     1067        exit 0 ;;
    11591068    RM*:ReliantUNIX-*:*:*)
    11601069        echo mips-sni-sysv4
    1161         exit ;;
     1070        exit 0 ;;
    11621071    RM*:SINIX-*:*:*)
    11631072        echo mips-sni-sysv4
    1164         exit ;;
     1073        exit 0 ;;
    11651074    *:SINIX-*:*:*)
    11661075        if uname -p 2>/dev/null >/dev/null ; then
     
    11701079                echo ns32k-sni-sysv
    11711080        fi
    1172         exit ;;
     1081        exit 0 ;;
    11731082    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    11741083                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    11751084        echo i586-unisys-sysv4
    1176         exit ;;
     1085        exit 0 ;;
    11771086    *:UNIX_System_V:4*:FTX*)
    11781087        # From Gerald Hewes <hewes@openmarket.com>.
    11791088        # How about differentiating between stratus architectures? -djm
    11801089        echo hppa1.1-stratus-sysv4
    1181         exit ;;
     1090        exit 0 ;;
    11821091    *:*:*:FTX*)
    11831092        # From seanf@swdc.stratus.com.
    11841093        echo i860-stratus-sysv4
    1185         exit ;;
    1186     i*86:VOS:*:*)
    1187         # From Paul.Green@stratus.com.
    1188         echo ${UNAME_MACHINE}-stratus-vos
    1189         exit ;;
     1094        exit 0 ;;
    11901095    *:VOS:*:*)
    11911096        # From Paul.Green@stratus.com.
    11921097        echo hppa1.1-stratus-vos
    1193         exit ;;
     1098        exit 0 ;;
    11941099    mc68*:A/UX:*:*)
    11951100        echo m68k-apple-aux${UNAME_RELEASE}
    1196         exit ;;
     1101        exit 0 ;;
    11971102    news*:NEWS-OS:6*:*)
    11981103        echo mips-sony-newsos6
    1199         exit ;;
     1104        exit 0 ;;
    12001105    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    12011106        if [ -d /usr/nec ]; then
     
    12041109                echo mips-unknown-sysv${UNAME_RELEASE}
    12051110        fi
    1206         exit ;;
     1111        exit 0 ;;
    12071112    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
    12081113        echo powerpc-be-beos
    1209         exit ;;
     1114        exit 0 ;;
    12101115    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
    12111116        echo powerpc-apple-beos
    1212         exit ;;
     1117        exit 0 ;;
    12131118    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
    12141119        echo i586-pc-beos
    1215         exit ;;
    1216     BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
    1217         echo i586-pc-haiku
    1218         exit ;;
     1120        exit 0 ;;
    12191121    SX-4:SUPER-UX:*:*)
    12201122        echo sx4-nec-superux${UNAME_RELEASE}
    1221         exit ;;
     1123        exit 0 ;;
    12221124    SX-5:SUPER-UX:*:*)
    12231125        echo sx5-nec-superux${UNAME_RELEASE}
    1224         exit ;;
     1126        exit 0 ;;
    12251127    SX-6:SUPER-UX:*:*)
    12261128        echo sx6-nec-superux${UNAME_RELEASE}
    1227         exit ;;
    1228     SX-7:SUPER-UX:*:*)
    1229         echo sx7-nec-superux${UNAME_RELEASE}
    1230         exit ;;
    1231     SX-8:SUPER-UX:*:*)
    1232         echo sx8-nec-superux${UNAME_RELEASE}
    1233         exit ;;
    1234     SX-8R:SUPER-UX:*:*)
    1235         echo sx8r-nec-superux${UNAME_RELEASE}
    1236         exit ;;
     1129        exit 0 ;;
    12371130    Power*:Rhapsody:*:*)
    12381131        echo powerpc-apple-rhapsody${UNAME_RELEASE}
    1239         exit ;;
     1132        exit 0 ;;
    12401133    *:Rhapsody:*:*)
    12411134        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    1242         exit ;;
     1135        exit 0 ;;
    12431136    *:Darwin:*:*)
    1244         UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    1245         case $UNAME_PROCESSOR in
    1246             unknown) UNAME_PROCESSOR=powerpc ;;
     1137        case `uname -p` in
     1138            *86) UNAME_PROCESSOR=i686 ;;
     1139            powerpc) UNAME_PROCESSOR=powerpc ;;
    12471140        esac
    12481141        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    1249         exit ;;
     1142        exit 0 ;;
    12501143    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    12511144        UNAME_PROCESSOR=`uname -p`
     
    12551148        fi
    12561149        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    1257         exit ;;
     1150        exit 0 ;;
    12581151    *:QNX:*:4*)
    12591152        echo i386-pc-qnx
    1260         exit ;;
    1261     NSE-?:NONSTOP_KERNEL:*:*)
    1262         echo nse-tandem-nsk${UNAME_RELEASE}
    1263         exit ;;
    1264     NSR-?:NONSTOP_KERNEL:*:*)
     1153        exit 0 ;;
     1154    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
    12651155        echo nsr-tandem-nsk${UNAME_RELEASE}
    1266         exit ;;
     1156        exit 0 ;;
    12671157    *:NonStop-UX:*:*)
    12681158        echo mips-compaq-nonstopux
    1269         exit ;;
     1159        exit 0 ;;
    12701160    BS2000:POSIX*:*:*)
    12711161        echo bs2000-siemens-sysv
    1272         exit ;;
     1162        exit 0 ;;
    12731163    DS/*:UNIX_System_V:*:*)
    12741164        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
    1275         exit ;;
     1165        exit 0 ;;
    12761166    *:Plan9:*:*)
    12771167        # "uname -m" is not consistent, so use $cputype instead. 386
     
    12841174        fi
    12851175        echo ${UNAME_MACHINE}-unknown-plan9
    1286         exit ;;
     1176        exit 0 ;;
    12871177    *:TOPS-10:*:*)
    12881178        echo pdp10-unknown-tops10
    1289         exit ;;
     1179        exit 0 ;;
    12901180    *:TENEX:*:*)
    12911181        echo pdp10-unknown-tenex
    1292         exit ;;
     1182        exit 0 ;;
    12931183    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    12941184        echo pdp10-dec-tops20
    1295         exit ;;
     1185        exit 0 ;;
    12961186    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    12971187        echo pdp10-xkl-tops20
    1298         exit ;;
     1188        exit 0 ;;
    12991189    *:TOPS-20:*:*)
    13001190        echo pdp10-unknown-tops20
    1301         exit ;;
     1191        exit 0 ;;
    13021192    *:ITS:*:*)
    13031193        echo pdp10-unknown-its
    1304         exit ;;
    1305     SEI:*:*:SEIUX)
    1306         echo mips-sei-seiux${UNAME_RELEASE}
    1307         exit ;;
    1308     *:DragonFly:*:*)
    1309         echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    1310         exit ;;
    1311     *:*VMS:*:*)
    1312         UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1313         case "${UNAME_MACHINE}" in
    1314             A*) echo alpha-dec-vms ; exit ;;
    1315             I*) echo ia64-dec-vms ; exit ;;
    1316             V*) echo vax-dec-vms ; exit ;;
    1317         esac ;;
    1318     *:XENIX:*:SysV)
    1319         echo i386-pc-xenix
    1320         exit ;;
    1321     i*86:skyos:*:*)
    1322         echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
    1323         exit ;;
    1324     i*86:rdos:*:*)
    1325         echo ${UNAME_MACHINE}-pc-rdos
    1326         exit ;;
     1194        exit 0 ;;
    13271195esac
    13281196
     
    13561224
    13571225#if defined (__arm) && defined (__acorn) && defined (__unix)
    1358   printf ("arm-acorn-riscix\n"); exit (0);
     1226  printf ("arm-acorn-riscix"); exit (0);
    13591227#endif
    13601228
     
    14451313EOF
    14461314
    1447 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
    1448         { echo "$SYSTEM_NAME"; exit; }
     1315$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    14491316
    14501317# Apollos put the system type in the environment.
    14511318
    1452 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
     1319test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
    14531320
    14541321# Convex versions that predate uname can use getsysinfo(1)
     
    14591326    c1*)
    14601327        echo c1-convex-bsd
    1461         exit ;;
     1328        exit 0 ;;
    14621329    c2*)
    14631330        if getsysinfo -f scalar_acc
     
    14651332        else echo c2-convex-bsd
    14661333        fi
    1467         exit ;;
     1334        exit 0 ;;
    14681335    c34*)
    14691336        echo c34-convex-bsd
    1470         exit ;;
     1337        exit 0 ;;
    14711338    c38*)
    14721339        echo c38-convex-bsd
    1473         exit ;;
     1340        exit 0 ;;
    14741341    c4*)
    14751342        echo c4-convex-bsd
    1476         exit ;;
     1343        exit 0 ;;
    14771344    esac
    14781345fi
     
    14851352download the most up to date version of the config scripts from
    14861353
    1487   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    1488 and
    1489   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
     1354    ftp://ftp.gnu.org/pub/gnu/config/
    14901355
    14911356If the version you run ($0) is already up to date, please
  • branches/blt4/gui/cf/config.sub

    r2706 r2742  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2008-04-14'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    87
    98# This file is (in principle) common to ALL GNU software.
     
    2322# You should have received a copy of the GNU General Public License
    2423# along with this program; if not, write to the Free Software
    25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    26 # 02110-1301, USA.
    27 #
     24# Foundation, Inc., 59 Temple Place - Suite 330,
     25# Boston, MA 02111-1307, USA.
     26
    2827# As a special exception to the GNU General Public License, if you
    2928# distribute this file as part of a program that contains a
    3029# configuration script generated by Autoconf, you may include it under
    3130# the same distribution terms that you use for the rest of that program.
    32 
    3331
    3432# Please send patches to <config-patches@gnu.org>.  Submit a context
     
    7371GNU config.sub ($timestamp)
    7472
    75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    76 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     73Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     74Free Software Foundation, Inc.
    7775
    7876This is free software; see the source for copying conditions.  There is NO
     
    8684  case $1 in
    8785    --time-stamp | --time* | -t )
    88        echo "$timestamp" ; exit ;;
     86       echo "$timestamp" ; exit 0 ;;
    8987    --version | -v )
    90        echo "$version" ; exit ;;
     88       echo "$version" ; exit 0 ;;
    9189    --help | --h* | -h )
    92        echo "$usage"; exit ;;
     90       echo "$usage"; exit 0 ;;
    9391    -- )     # Stop option processing
    9492       shift; break ;;
     
    102100       # First pass through any local machine types.
    103101       echo $1
    104        exit ;;
     102       exit 0;;
    105103
    106104    * )
     
    121119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    122120case $maybe_os in
    123   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
    124   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
    125   storm-chaos* | os2-emx* | rtmk-nova*)
     121  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    126122    os=-$maybe_os
    127123    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    149145        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    150146        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    151         -apple | -axis | -knuth | -cray)
     147        -apple | -axis)
    152148                os=
    153149                basic_machine=$1
     
    174170                os=-hiuxwe2
    175171                ;;
    176         -sco6)
    177                 os=-sco5v6
    178                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    179                 ;;
    180172        -sco5)
    181173                os=-sco3.2v5
     
    191183                ;;
    192184        -sco3.2v[4-9]*)
    193                 # Don't forget version if it is 3.2v4 or newer.
    194                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    195                 ;;
    196         -sco5v6*)
    197185                # Don't forget version if it is 3.2v4 or newer.
    198186                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    241229        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    242230        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    243         | am33_2.0 \
    244         | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    245         | bfin \
    246         | c4x | clipper \
     231        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     232        | clipper \
    247233        | d10v | d30v | dlx | dsp16xx \
    248         | fido | fr30 | frv \
     234        | fr30 | frv \
    249235        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    250236        | i370 | i860 | i960 | ia64 \
    251         | ip2k | iq2000 \
    252         | m32c | m32r | m32rle | m68000 | m68k | m88k \
    253         | maxq | mb | microblaze | mcore | mep | metag \
     237        | ip2k \
     238        | m32r | m68000 | m68k | m88k | mcore \
    254239        | mips | mipsbe | mipseb | mipsel | mipsle \
    255240        | mips16 \
    256241        | mips64 | mips64el \
    257         | mips64octeon | mips64octeonel \
     242        | mips64vr | mips64vrel \
    258243        | mips64orion | mips64orionel \
    259         | mips64r5900 | mips64r5900el \
    260         | mips64vr | mips64vrel \
    261244        | mips64vr4100 | mips64vr4100el \
    262245        | mips64vr4300 | mips64vr4300el \
    263246        | mips64vr5000 | mips64vr5000el \
    264         | mips64vr5900 | mips64vr5900el \
    265247        | mipsisa32 | mipsisa32el \
    266248        | mipsisa32r2 | mipsisa32r2el \
    267249        | mipsisa64 | mipsisa64el \
    268         | mipsisa64r2 | mipsisa64r2el \
    269250        | mipsisa64sb1 | mipsisa64sb1el \
    270251        | mipsisa64sr71k | mipsisa64sr71kel \
    271252        | mipstx39 | mipstx39el \
    272253        | mn10200 | mn10300 \
    273         | mt \
    274254        | msp430 \
    275         | nios | nios2 \
    276255        | ns16k | ns32k \
    277         | or32 \
     256        | openrisc | or32 \
    278257        | pdp10 | pdp11 | pj | pjl \
    279258        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    280259        | pyramid \
    281         | score \
    282         | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
     260        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    283261        | sh64 | sh64le \
    284         | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
    285         | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
    286         | spu | strongarm \
    287         | tahoe | thumb | tic4x | tic80 | tron \
     262        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     263        | strongarm \
     264        | tahoe | thumb | tic80 | tron \
    288265        | v850 | v850e \
    289266        | we32k \
    290         | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
     267        | x86 | xscale | xstormy16 | xtensa \
    291268        | z8k)
    292269                basic_machine=$basic_machine-unknown
     
    298275                ;;
    299276        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    300                 ;;
    301         ms1)
    302                 basic_machine=mt-unknown
    303277                ;;
    304278
     
    321295        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    322296        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    323         | avr-* | avr32-* \
    324         | bfin-* | bs2000-* \
     297        | avr-* \
     298        | bs2000-* \
    325299        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    326         | clipper-* | craynv-* | cydra-* \
     300        | clipper-* | cydra-* \
    327301        | d10v-* | d30v-* | dlx-* \
    328302        | elxsi-* \
    329         | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
     303        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
    330304        | h8300-* | h8500-* \
    331305        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    332306        | i*86-* | i860-* | i960-* | ia64-* \
    333         | ip2k-* | iq2000-* \
    334         | m32c-* | m32r-* | m32rle-* \
     307        | ip2k-* \
     308        | m32r-* \
    335309        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    336         | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
     310        | m88110-* | m88k-* | mcore-* \
    337311        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    338312        | mips16-* \
    339313        | mips64-* | mips64el-* \
    340         | mips64octeon-* | mips64octeonel-* \
     314        | mips64vr-* | mips64vrel-* \
    341315        | mips64orion-* | mips64orionel-* \
    342         | mips64r5900-* | mips64r5900el-* \
    343         | mips64vr-* | mips64vrel-* \
    344316        | mips64vr4100-* | mips64vr4100el-* \
    345317        | mips64vr4300-* | mips64vr4300el-* \
    346318        | mips64vr5000-* | mips64vr5000el-* \
    347         | mips64vr5900-* | mips64vr5900el-* \
    348319        | mipsisa32-* | mipsisa32el-* \
    349320        | mipsisa32r2-* | mipsisa32r2el-* \
    350321        | mipsisa64-* | mipsisa64el-* \
    351         | mipsisa64r2-* | mipsisa64r2el-* \
    352322        | mipsisa64sb1-* | mipsisa64sb1el-* \
    353323        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    354324        | mipstx39-* | mipstx39el-* \
    355         | mmix-* \
    356         | mt-* \
    357325        | msp430-* \
    358         | nios-* | nios2-* \
    359         | none-* | np1-* | ns16k-* | ns32k-* \
     326        | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
    360327        | orion-* \
    361328        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    363330        | pyramid-* \
    364331        | romp-* | rs6000-* \
    365         | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
     332        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
    366333        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    367         | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
    368         | sparclite-* \
    369         | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
     334        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
     335        | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    370336        | tahoe-* | thumb-* \
    371         | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
     337        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
    372338        | tron-* \
    373339        | v850-* | v850e-* | vax-* \
    374340        | we32k-* \
    375         | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
    376         | xstormy16-* | xtensa*-* \
     341        | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
     342        | xtensa-* \
    377343        | ymp-* \
    378344        | z8k-*)
    379                 ;;
    380         # Recognize the basic CPU types without company name, with glob match.
    381         xtensa*)
    382                 basic_machine=$basic_machine-unknown
    383345                ;;
    384346        # Recognize the various machine names and aliases which stand
     
    398360                os=-udi
    399361                ;;
    400         abacus)
    401                 basic_machine=abacus-unknown
    402                 ;;
    403362        adobe68k)
    404363                basic_machine=m68010-adobe
     
    415374                os=-bsd
    416375                ;;
    417         amd64)
    418                 basic_machine=x86_64-pc
    419                 ;;
    420         amd64-*)
    421                 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
    422                 ;;
    423376        amdahl)
    424377                basic_machine=580-amdahl
     
    452405                os=-dynix
    453406                ;;
    454         blackfin)
    455                 basic_machine=bfin-unknown
    456                 os=-linux
    457                 ;;
    458         blackfin-*)
    459                 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
    460                 os=-linux
    461                 ;;
    462407        c90)
    463408                basic_machine=c90-cray
     
    488433                os=-unicos
    489434                ;;
    490         craynv)
    491                 basic_machine=craynv-cray
    492                 os=-unicosmp
    493                 ;;
    494         cr16)
    495                 basic_machine=cr16-unknown
    496                 os=-elf
    497                 ;;
    498435        crds | unos)
    499436                basic_machine=m68k-crds
    500437                ;;
    501         crisv32 | crisv32-* | etraxfs*)
    502                 basic_machine=crisv32-axis
    503                 ;;
    504438        cris | cris-* | etrax*)
    505439                basic_machine=cris-axis
    506                 ;;
    507         crx)
    508                 basic_machine=crx-unknown
    509                 os=-elf
    510440                ;;
    511441        da30 | da30-*)
     
    530460                basic_machine=m88k-motorola
    531461                os=-sysv3
    532                 ;;
    533         dicos)
    534                 basic_machine=i686-pc
    535                 os=-dicos
    536                 ;;
    537         djgpp)
    538                 basic_machine=i586-pc
    539                 os=-msdosdjgpp
    540462                ;;
    541463        dpx20 | dpx20-*)
     
    689611                os=-sysv
    690612                ;;
    691         m68knommu)
    692                 basic_machine=m68k-unknown
    693                 os=-linux
    694                 ;;
    695         m68knommu-*)
    696                 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
    697                 os=-linux
    698                 ;;
    699613        m88k-omron*)
    700614                basic_machine=m88k-omron
     
    709623                ;;
    710624        mingw32)
    711                 basic_machine=i386-pc
     625                basic_machine=i686-pc
    712626                os=-mingw32
    713627                ;;
    714         mingw32ce)
    715                 basic_machine=arm-unknown
    716                 os=-mingw32ce
     628        msys)
     629                basic_machine=i686-pc
     630                os=-msys
    717631                ;;
    718632        miniframe)
     
    729643                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    730644                ;;
     645        mmix*)
     646                basic_machine=mmix-knuth
     647                os=-mmixware
     648                ;;
    731649        monitor)
    732650                basic_machine=m68k-rom68k
     
    740658                basic_machine=i386-pc
    741659                os=-msdos
    742                 ;;
    743         ms1-*)
    744                 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
    745660                ;;
    746661        mvs)
     
    812727                basic_machine=np1-gould
    813728                ;;
     729        nv1)
     730                basic_machine=nv1-cray
     731                os=-unicosmp
     732                ;;
    814733        nsr-tandem)
    815734                basic_machine=nsr-tandem
     
    819738                os=-proelf
    820739                ;;
    821         openrisc | openrisc-*)
     740        or32 | or32-*)
    822741                basic_machine=or32-unknown
    823                 ;;
    824         os400)
    825                 basic_machine=powerpc-ibm
    826                 os=-os400
     742                os=-coff
    827743                ;;
    828744        OSE68000 | ose68000)
     
    842758                os=-osf
    843759                ;;
    844         parisc)
    845                 basic_machine=hppa-unknown
    846                 os=-linux
    847                 ;;
    848         parisc-*)
    849                 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
    850                 os=-linux
    851                 ;;
    852760        pbd)
    853761                basic_machine=sparc-tti
     
    859767                basic_machine=ns32k-pc532
    860768                ;;
    861         pc98)
    862                 basic_machine=i386-pc
    863                 ;;
    864         pc98-*)
    865                 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
    866                 ;;
    867769        pentium | p5 | k5 | k6 | nexgen | viac3)
    868770                basic_machine=i586-pc
     
    871773                basic_machine=i686-pc
    872774                ;;
    873         pentiumii | pentium2 | pentiumiii | pentium3)
     775        pentiumii | pentium2)
    874776                basic_machine=i686-pc
    875                 ;;
    876         pentium4)
    877                 basic_machine=i786-pc
    878777                ;;
    879778        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    883782                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    884783                ;;
    885         pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
     784        pentiumii-* | pentium2-*)
    886785                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    887                 ;;
    888         pentium4-*)
    889                 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    890786                ;;
    891787        pn)
     
    921817                os=-pw32
    922818                ;;
    923         rdos)
    924                 basic_machine=i386-pc
    925                 os=-rdos
    926                 ;;
    927819        rom68k)
    928820                basic_machine=m68k-rom68k
     
    951843                basic_machine=mipsisa64sb1el-unknown
    952844                ;;
    953         sde)
    954                 basic_machine=mipsisa32-sde
    955                 os=-elf
    956                 ;;
    957         sei)
    958                 basic_machine=mips-sei
    959                 os=-seiux
    960                 ;;
    961845        sequent)
    962846                basic_machine=i386-sequent
     
    966850                os=-hms
    967851                ;;
    968         sh5el)
    969                 basic_machine=sh5le-unknown
    970                 ;;
    971         sh64)
    972                 basic_machine=sh64-unknown
    973                 ;;
    974852        sparclite-wrs | simso-wrs)
    975853                basic_machine=sparclite-wrs
     
    1046924                os=-unicos
    1047925                ;;
     926        tic4x | c4x*)
     927                basic_machine=tic4x-unknown
     928                os=-coff
     929                ;;
    1048930        tic54x | c54x*)
    1049931                basic_machine=tic54x-unknown
     
    1058940                os=-coff
    1059941                ;;
    1060         tile*)
    1061                 basic_machine=tile-unknown
    1062                 os=-linux-gnu
    1063                 ;;
    1064942        tx39)
    1065943                basic_machine=mipstx39-unknown
     
    1075953                basic_machine=m68k-ncr
    1076954                ;;
    1077         tpf)
    1078                 basic_machine=s390x-ibm
    1079                 os=-tpf
    1080                 ;;
    1081955        udi29k)
    1082956                basic_machine=a29k-amd
     
    1121995                basic_machine=hppa1.1-winbond
    1122996                os=-proelf
    1123                 ;;
    1124         xbox)
    1125                 basic_machine=i686-pc
    1126                 os=-mingw32
    1127997                ;;
    1128998        xps | xps100)
     
    11561026                basic_machine=romp-ibm
    11571027                ;;
    1158         mmix)
    1159                 basic_machine=mmix-knuth
    1160                 ;;
    11611028        rs6000)
    11621029                basic_machine=rs6000-ibm
     
    11751042                basic_machine=we32k-att
    11761043                ;;
    1177         sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
     1044        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    11781045                basic_machine=sh-unknown
    11791046                ;;
    1180         sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
     1047        sh64)
     1048                basic_machine=sh64-unknown
     1049                ;;
     1050        sparc | sparcv9 | sparcv9b)
    11811051                basic_machine=sparc-sun
    11821052                ;;
     
    12511121              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    12521122              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1253               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
    1254               | -openbsd* | -solidbsd* \
    1255               | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
    1256               | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1123              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
     1124              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    12571125              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    12581126              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    12591127              | -chorusos* | -chorusrdb* \
    12601128              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1261               | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
    1262               | -uxpv* | -beos* | -mpeix* | -udk* \
     1129              | -mingw32* | -msys* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    12631130              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    12641131              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     
    12661133              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    12671134              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    1268               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1269               | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
     1135              | -powermax* | -dnix*)
    12701136        # Remember, each alternative MUST END IN *, to match a version number.
    12711137                ;;
     
    12851151                ;;
    12861152        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1287               | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
     1153              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
    12881154              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    12891155                ;;
     
    12911157                os=`echo $os | sed -e 's|mac|macos|'`
    12921158                ;;
    1293         -linux-dietlibc)
    1294                 os=-linux-dietlibc
    1295                 ;;
    12961159        -linux*)
    12971160                os=`echo $os | sed -e 's|linux|linux-gnu|'`
     
    13061169                os=-openedition
    13071170                ;;
    1308         -os400*)
    1309                 os=-os400
    1310                 ;;
    13111171        -wince*)
    13121172                os=-wince
     
    13291189        -atheos*)
    13301190                os=-atheos
    1331                 ;;
    1332         -syllable*)
    1333                 os=-syllable
    13341191                ;;
    13351192        -386bsd)
     
    13551212                os=-sysv4
    13561213                ;;
    1357         -tpf*)
    1358                 os=-tpf
    1359                 ;;
    13601214        -triton*)
    13611215                os=-sysv3
     
    13931247        -kaos*)
    13941248                os=-kaos
    1395                 ;;
    1396         -zvmoe)
    1397                 os=-zvmoe
    1398                 ;;
    1399         -dicos*)
    1400                 os=-dicos
    14011249                ;;
    14021250        -none)
     
    14221270
    14231271case $basic_machine in
    1424         score-*)
    1425                 os=-elf
    1426                 ;;
    1427         spu-*)
    1428                 os=-elf
    1429                 ;;
    14301272        *-acorn)
    14311273                os=-riscix1.2
     
    14361278        arm*-semi)
    14371279                os=-aout
    1438                 ;;
    1439         c4x-* | tic4x-*)
    1440                 os=-coff
    14411280                ;;
    14421281        # This must come before the *-dec entry.
     
    14651304                os=-aout
    14661305                ;;
    1467         mep-*)
    1468                 os=-elf
    1469                 ;;
    14701306        mips*-cisco)
    14711307                os=-elf
     
    14861322                os=-beos
    14871323                ;;
    1488         *-haiku)
    1489                 os=-haiku
    1490                 ;;
    14911324        *-ibm)
    14921325                os=-aix
    1493                 ;;
    1494         *-knuth)
    1495                 os=-mmixware
    14961326                ;;
    14971327        *-wec)
     
    16271457                                vendor=ibm
    16281458                                ;;
    1629                         -os400*)
    1630                                 vendor=ibm
    1631                                 ;;
    16321459                        -ptx*)
    16331460                                vendor=sequent
    16341461                                ;;
    1635                         -tpf*)
    1636                                 vendor=ibm
    1637                                 ;;
    16381462                        -vxsim* | -vxworks* | -windiss*)
    16391463                                vendor=wrs
     
    16601484
    16611485echo $basic_machine$os
    1662 exit
     1486exit 0
    16631487
    16641488# Local variables:
  • branches/blt4/gui/scripts/Makefile.in

    r2690 r2742  
    131131                $(srcdir)/vtkcontourviewer.tcl \
    132132                $(srcdir)/vtkstreamlinesviewer.tcl \
     133                $(srcdir)/vtkvolumeviewer.tcl \
     134                $(srcdir)/vtkheightmapviewer.tcl \
    133135                $(srcdir)/xylegend.tcl \
    134136                $(srcdir)/xyprint.tcl \
  • branches/blt4/gui/scripts/field.tcl

    r2690 r2742  
    3535    public method flowhints { cname }
    3636    public method type {}
     37    public method vtkdata {{what -overall}}
    3738
    3839    protected method _build {}
     
    5051    private variable _comp2vtk   ;# maps component name => vtkFloatArray
    5152    private variable _comp2vtkstreamlines   ;# maps component name => vtkFloatArray
     53    private variable _comp2vtkvolume   ;# maps component name => vtkFloatArray
     54    private variable _comp2volume   ;# maps component name => vtkFloatArray
    5255    private variable _comp2dx    ;# maps component name => OpenDX data
    5356    private variable _comp2unirect2d ;# maps component name => unirect2d obj
     
    201204        return ""  ;# no mesh -- it's embedded in the value data
    202205    }
     206    if {[info exists _comp2vtkvolume($what)]} {
     207        return ""  ;# no mesh -- it's embedded in the value data
     208    }
    203209    if {[info exists _comp2unirect2d($what)]} {
    204210        set mobj [lindex $_comp2unirect2d($what) 0]
     
    261267    if { [info exists _comp2vtk($what)] } {
    262268        return ""
     269    }
     270    if { [info exists _comp2vtkvolume($what)] } {
     271        return $_comp2vtkvolume($what)
    263272    }
    264273    if { [info exists _comp2vtkstreamlines($what)] } {
     
    578587    catch {unset _comp2dims}
    579588    catch {unset _comp2style}
     589    array unset _comp2volume
    580590    array unset _comp2vtkstreamlines
    581591    array unset _comp2unirect2d
     
    603613            }
    604614        } elseif {[$_field element $cname.opendx] != ""} {
    605             set type "opendx"
     615            global env
     616            if { [info exists env(VTKVOLUME)] } {
     617                set type "vtkvolume"
     618            } else {
     619                set type "dx"
     620            }
    606621        } elseif {[$_field element $cname.dx] != ""} {
    607             set type "dx"
     622            global env
     623            if { [info exists env(VTKVOLUME)] } {
     624                set type "vtkvolume"
     625            } else {
     626                set type "dx"
     627            }
    608628        }
    609629        set _comp2style($cname) ""
     
    796816            set _comp2style($cname) [$_field get $cname.style]
    797817            incr _counter
     818        } elseif {$type == "vtkvolume"} {
     819            set _comp2dims($cname) "3D"
     820            # Allow redirects to another element.
     821            set data [$_field get -decode no $cname.dx]
     822            set data [Rappture::encoding::decode -as zb64 $data]
     823            if 1 {
     824            set file "/tmp/$cname.dx"
     825            set f [open $file "w"]
     826            puts $f $data
     827            close $f
     828            }
     829            set data [Rappture::ConvertDxToVtk $data]
     830            if 1 {
     831            set file "/tmp/$cname.vtk"
     832            set f [open $file "w"]
     833            puts $f $data
     834            close $f
     835            }
     836            set _comp2vtkvolume($cname) $data
     837            set _comp2style($cname) [$_field get $cname.style]
     838            incr _counter
    798839        } elseif {$type == "vtkstreamlines2"} {
    799840            set _comp2dims($cname) "3D"
     
    801842            set _comp2style($cname) [$_field get $cname.style]
    802843            incr _counter
    803         } elseif {$type == "dx"} {
     844        } elseif {$type == "dx" } {
    804845            #
    805846            # HACK ALERT!  Extract gzipped, base64-encoded OpenDX
     
    809850            set _comp2dims($cname) "3D"
    810851            set _comp2dx($cname)  [$_field get -decode no $cname.dx]
     852            if 1 {
     853            set data  [$_field get -decode yes $cname.dx]
     854            set file "/tmp/junk.dx"
     855            set f [open $file "w"]
     856            puts $f $data
     857            close $f
     858            if { [string match "<ODX>*" $data] } {
     859                set data [string range $data 5 end]
     860                set _comp2dx($cname) \
     861                        [Rappture::encoding::encode -as zb64 $data]
     862            }
     863            }
    811864            set _comp2style($cname) [$_field get $cname.style]
    812865            if {[$_field element $cname.flow] != ""} {
     
    9551008    return $_comp2extents($what)
    9561009}
     1010
     1011# ----------------------------------------------------------------------
     1012# USAGE: blob ?<name>?
     1013#
     1014# Returns a string representing the blob of data for the mesh and values.
     1015# ----------------------------------------------------------------------
     1016itcl::body Rappture::Field::vtkdata {{what -overall}} {
     1017    if {$what == "component0"} {
     1018        set what "component"
     1019    }
     1020    if {[info exists _comp2xy($what)]} {
     1021        return ""
     1022    }
     1023    if { [info exists _comp2vtk($what)] } {
     1024        return ""
     1025    }
     1026    if { [info exists _comp2vtkstreamlines($what)] } {
     1027        # Return the contents of the vtk file.
     1028        return $_comp2vtkstreamlines($what)
     1029    }
     1030    if { [info exists _comp2vtkvolume($what)] } {
     1031        # Return the contents of the vtk file.
     1032        return $_comp2vtkvolume($what)
     1033    }
     1034    if {[info exists _comp2dx($what)]} {
     1035        return $_comp2dx($what)
     1036    }
     1037    if {[info exists _comp2unirect2d($what)]} {
     1038        return [$_comp2unirect2d($what) blob]
     1039    }
     1040    if {[info exists _comp2unirect3d($what)]} {
     1041        return [$_comp2unirect3d($what) blob]
     1042    }
     1043    error "bad option \"$what\": should be [join [lsort [array names _comp2dims]] {, }]"
     1044}
  • branches/blt4/gui/scripts/field2dresult.tcl

    r2208 r2742  
    6161            set servers [Rappture::VisViewer::GetServerList "nanovis"]
    6262        }
    63         "vtkcontour" {
     63        "vtkcontour" - "vtkheightmap" {
    6464            set servers [Rappture::VisViewer::GetServerList "vtkvis"]
    6565        }
     
    7676                itk_component add renderer {
    7777                    Rappture::HeightmapViewer $itk_interior.ren $servers
     78                }
     79            }
     80            "vtkheightmap" {
     81                itk_component add renderer {
     82                    Rappture::VtkHeightmapViewer $itk_interior.ren $servers
    7883                }
    7984            }
  • branches/blt4/gui/scripts/field3dresult.tcl

    r2534 r2742  
    5959            set servers [Rappture::VisViewer::GetServerList "nanovis"]
    6060        }
    61         "vtkcontour" - "vtkstreamlines" {
     61        "vtkcontour" - "vtkstreamlines" - "vtkvolume" - "vtkviewer"  {
    6262            set servers [Rappture::VisViewer::GetServerList "vtkvis"]
    6363        }
     
    8181                    Rappture::FlowvisViewer $itk_interior.ren $servers
    8282                }
     83            }
     84            "vtkvolume" {
     85                catch {
     86                itk_component add renderer {
     87                    Rappture::VtkVolumeViewer $itk_interior.ren $servers
     88                }
     89                } errs
     90                puts stderr errs=$errs
    8391            }
    8492            "vtkstreamlines" {
  • branches/blt4/gui/scripts/molvisviewer.tcl

    r2692 r2742  
    601601                    0,1 $f.cancel
    602602                blt::table $inner \
    603                     0,0 $inner.pdb -anchor w \
    604                     1,0 $inner.image -anchor w \
    605                     2,0 $f -fill x -pady 4
     603                    0,0 $inner.summary -anchor w \
     604                    1,0 $inner.pdb -anchor w \
     605                    2,0 $inner.image -anchor w \
     606                    3,0 $f -fill x -pady 4
    606607                $inner.pdb select
    607608            } else {
     
    12091210    set _view(c) $c
    12101211    if { !$_rotatePending } {
    1211         $_dispatcher event -after 50 !rotate
     1212        $_dispatcher event -after 100 !rotate
    12121213        set _rotatePending 1
    12131214    }
  • branches/blt4/gui/scripts/nanovisviewer.tcl

    r2048 r2742  
    156156    private variable _first ""     ;# This is the topmost volume.
    157157    private variable _buffering 0
    158    
     158
    159159    # This
    160160    # indicates which isomarkers and transfer
     
    181181# ----------------------------------------------------------------------
    182182itcl::body Rappture::NanovisViewer::constructor {hostlist args} {
     183    set _serverType "nanovis"
    183184
    184185    # Draw legend event
     
    237238
    238239    itk_component add 3dview {
    239         label $itk_component(plotarea).vol -image $_image(plot) \
     240        label $itk_component(plotarea).view -image $_image(plot) \
    240241            -highlightthickness 0 -borderwidth 0
    241242    } {
     
    749750        if { ![info exists _vol2style($vol)] } {
    750751            puts stderr "unknown volume $vol"
    751             continue;                   # How does this happen?
     752            continue;                        # How does this happen?
    752753        }
    753754        set tf $_vol2style($vol)
     
    843844        }
    844845    }
     846
     847    # The colormap may have changed. Resync the slicers with the colormap.
     848    set vols [CurrentVolumes -cutplanes]
     849    SendCmd "volume data state $_settings($this-volume) $vols"
     850
     851    # Adjust the cutplane for only the first component in the topmost volume
     852    # (i.e. the first volume designated in the field).
     853    set vol [lindex $vols 0]
     854    foreach axis {x y z} {
     855        # Turn off cutplanes for all volumes
     856        SendCmd "cutplane state 0 $axis"
     857        if { $_settings($this-${axis}cutplane) } {
     858            # Turn on cutplane for this particular volume and set the position
     859            SendCmd "cutplane state 1 $axis $vol"
     860            set pos [expr {0.01*$_settings($this-${axis}cutposition)}]
     861            SendCmd "cutplane position $pos $axis $vol"
     862        }
     863    }
    845864}
    846865
     
    9851004        updatetransferfuncs
    9861005    }
    987 
    988     # Sync the state of slicers
    989     set vols [CurrentVolumes -cutplanes]
    9901006    foreach axis {x y z} {
    991         SendCmd "cutplane state $_settings($this-${axis}cutplane) $axis $vols"
    992         set pos [expr {0.01*$_settings($this-${axis}cutposition)}]
    993         SendCmd "cutplane position $pos $axis $vols"
    994     }
    995     SendCmd "volume data state $_settings($this-volume) $vols"
    996     set _buffering 0;                   # Turn off buffering.
     1007        # Turn off cutplanes for all volumes
     1008        SendCmd "cutplane state 0 $axis"
     1009    }
     1010    set _buffering 0;                        # Turn off buffering.
    9971011    # Actually write the commands to the server socket.  If it fails, we don't
    9981012    # care.  We're finished here.
    9991013    blt::busy hold $itk_component(hull)
    1000     SendBytes $_outbuf;                 
     1014    SendBytes $_outbuf;                       
    10011015    blt::busy release $itk_component(hull)
    1002     set _outbuf "";                     # Clear the buffer.             
     1016    set _outbuf "";                        # Clear the buffer.               
    10031017}
    10041018
     
    10221036            }
    10231037            array set style [lindex [$_first components -style $comp] 0]
    1024             if {$what != "-cutplanes" || $style(-cutplanes)} {
     1038            if { $what != "-cutplanes" || $style(-cutplanes) } {
    10251039                lappend rlist $vol
    10261040            }
     
    13001314            if { [isconnected] } {
    13011315                set vols [CurrentVolumes -cutplanes]
    1302                 SendCmd "cutplane state $bool $axis $vols"
     1316                set vol [lindex $vols 0]
     1317                SendCmd "cutplane state $bool $axis $vol"
    13031318            }
    13041319            if { $bool } {
     
    19922007            set newpos [expr {0.01*$newval}]
    19932008            set vols [CurrentVolumes -cutplanes]
    1994             SendCmd "cutplane position $newpos $axis $vols"
     2009            set vol [lindex $vols 0]
     2010            SendCmd "cutplane position $newpos $axis $vol"
    19952011        }
    19962012        default {
  • branches/blt4/gui/scripts/numberresult.tcl

    r2716 r2742  
    875875    set g $itk_component(plot)
    876876    set elem ""
    877  
     877
    878878    # Peek inside of Blt_ZoomStack package to see if we're currently in the
    879879    # middle of a zoom selection.
     
    889889            # for dealing with xy line plots
    890890            set elem $info(name)
    891 
    892891            # Some elements are generated dynamically and therefore will
    893             # not have a dataobj object associated with them.
     892            # not have a data object associated with them.
    894893            set mapx [$g element cget $elem -mapx]
    895894            set mapy [$g element cget $elem -mapy]
  • branches/blt4/gui/scripts/resultset.tcl

    r2048 r2742  
    10951095    }
    10961096    if { $_active == "" } {
    1097         return
     1097        return;                         # Nothing active. Don't do anything.
    10981098    }
    10991099    eval lappend params [_getValues $_active all]
     
    15271527                if {$col == "xmlobj"} {
    15281528                    set val "#[expr {$which+1}]"
    1529                 } else {
    1530                     set val [lindex [$_results get -format $col $which] 0]
     1529                } else {
     1530                    # Be careful giving singleton elements as the "columns"
     1531                    # argument to "Tuples::get". It is expecting a list.
     1532                    set val [lindex [$_results get -format [list $col] $which] 0]
    15311533                }
    15321534                if {[info exists label2val($val)]} {
     
    16201622            foreach col $_cntlInfo($this-all) {
    16211623                set quantity $_cntlInfo($this-$col-label)
    1622                 set val [lindex [$_results get -format $col $index] 0]
     1624                # Be careful giving singleton elements as the "columns"
     1625                # argument to "Tuples::get". It is expecting a list.
     1626                set val [lindex [$_results get -format [list $col] $index] 0]
    16231627                if {$col == "xmlobj"} {
    16241628                    set num [lindex [$_results find -format xmlobj $val] 0]
  • branches/blt4/gui/scripts/resultviewer.tcl

    r2561 r2742  
    220220                set servers [Rappture::VisViewer::GetServerList "vtkvis"]
    221221                set w $itk_interior.vtkviewer
    222                 catch { Rappture::VtkViewer $w $servers } errs
    223                 puts stderr errs=$errs
     222                Rappture::VtkViewer $w $servers
    224223                set _mode2widget($mode) $w
    225224            }
     
    267266                            if { [$dataobj hints type] == "contour" } {
    268267                                set resultMode "vtkcontour"
     268                            } elseif { [info exists env(VTKHEIGHTMAP)] } {
     269                                set resultMode "vtkheightmap"
    269270                            } else {
    270271                                set resultMode "heightmap"
     
    298299                                }
    299300                            }
     301                            "vtkvolume" {
     302                                set fmt "vtkvolume"
     303                            }
    300304                            "vtkstreamlines" {
    301305                                set fmt "vtkstreamlines"
  • branches/blt4/gui/scripts/sequenceresult.tcl

    r2201 r2742  
    397397    global readyForNextFrame
    398398    set readyForNextFrame 1;            # By default, always ready
    399 
    400     # toggle the button to "play" mode
    401     $itk_component(play) configure \
    402         -bitmap [Rappture::icon play] \
    403         -command [itcl::code $this play]
     399                                       
     400    # Check if the play button still exists. We may be in the process
     401    # of destroying the widget.
     402    if { [info exists itk_component(play)] } {
     403        # toggle the button to "play" mode
     404        $itk_component(play) configure \
     405            -bitmap [Rappture::icon play] \
     406            -command [itcl::code $this play]
     407    }
    404408}
    405409
  • branches/blt4/gui/scripts/sidebarframe.tcl

    r2559 r2742  
    310310# argument can be a panel index, name, or title.
    311311# ----------------------------------------------------------------------
    312 itcl::body Rappture::SidebarFrame::select { which} {
     312itcl::body Rappture::SidebarFrame::select {which} {
    313313    set pname ""
    314314    switch -glob -- $which {
  • branches/blt4/gui/scripts/tool.tcl

    r2646 r2742  
    206206
    207207            if { $status != 0 } {
    208                 foreach {pstatus pid mesg} $::Rappture::Tool::job(control) break
    209                 if { $pstatus != "EXITED" } {
    210                     set result "Abnormal program termination \"$pstatus\": $mesg"
     208                foreach {code pid mesg} $::Rappture::Tool::job(control) break
     209                if { $code != "EXITED" } {
     210                    set result "Abnormal program termination \"$code\": $mesg"
    211211                    return [list $status $result]
    212212                }
    213213            }
    214         }
     214        }
    215215        # ...job is finished
    216216        array set times [Rappture::rusage measure]
     217
    217218        if {[resources -jobprotocol] != "submit"} {
    218219            set id [$_xmlobj get tool.id]
  • branches/blt4/gui/scripts/visviewer.tcl

    r2537 r2742  
    2525    set _servers(vtkvis)  "localhost:2010"
    2626
    27     protected variable _sid ""        ;# socket connection to server
    28     private common _done            ;# Used to indicate status of send.
    29     private variable _buffer        ;# buffer for incoming/outgoing commands
     27    protected variable _serverType "???";# Type of server.
     28    protected variable _sid ""      ;   # socket connection to server
     29    private common _done            ;   # Used to indicate status of send.
     30    private variable _buffer        ;   # buffer for incoming/outgoing commands
    3031    private variable _initialized
    3132    private variable _isOpen 0
     33    private variable _afterId -1
     34    private variable _icon 0
     35
    3236    # Number of milliseconds to wait before idle timeout.
    3337    # If greater than 0, automatically disconnect from the visualization
     
    3741    #private variable _idleTimeout 0;       # No timeout
    3842
    39     protected variable _dispatcher ""   ;# dispatcher for !events
    40     protected variable _hosts ""    ;# list of hosts for server
    41     protected variable _parser ""   ;# interpreter for incoming commands
     43    protected variable _dispatcher ""# dispatcher for !events
     44    protected variable _hosts ""    ;   # list of hosts for server
     45    protected variable _parser ""   ;   # interpreter for incoming commands
    4246    protected variable _image
    4347    protected variable _hostname
     
    5660    private method SendHelper.old {}
    5761    private method CheckConnection {}
     62    private method SplashScreen { state }
    5863
    5964    protected method SendEcho { channel {data ""} }
     
    6772    protected method Color2RGB { color }
    6873    protected method Euler2XYZ { theta phi psi }
     74    protected method StartWaiting {}
     75    protected method StopWaiting {}
     76
     77    private method Waiting { option widget }
    6978
    7079    private proc CheckNameList { namelist }  {
    71         set pattern {^[a-zA-Z0-9\.]+:[0-9]+(,[a-zA-Z0-9\.]+:[0-9]+)*$}
    72         if { ![regexp $pattern $namelist match] } {
    73             error "bad visualization server address \"$namelist\": should be host:port,host:port,..."
     80        foreach host $namelist {
     81            set pattern {^[a-zA-Z0-9\.]+:[0-9]}
     82            if { ![regexp $pattern $host match] } {
     83                error "bad visualization server address \"$host\": should be host:port,host:port,..."
     84            }
    7485        }
    7586    }
    76     public proc GetServerList { tag } {
    77         return $_servers($tag)
    78     }
    79     public proc SetServerList { tag namelist } {
     87    public proc GetServerList { type } {
     88        return $_servers($type)
     89    }
     90    public proc SetServerList { type namelist } {
     91        # Convert the comma separated list into a Tcl list.  OGRE also adds
     92        # a trailing comma that we want to ignore.
     93        regsub -all "," $namelist " " namelist
    8094        CheckNameList $namelist
    81         set _servers($tag) $namelist
     95        set _servers($type) $namelist
     96    }
     97    public proc RemoveServerFromList { type server } {
     98        if { ![info exists _servers($type)] } {
     99            error "unknown server type \"$type\""
     100        }
     101        set i [lsearch $_servers($type) $server]
     102        if { $i < 0 } {
     103            return
     104        }
     105        set _servers($type) [lreplace $_servers($type) $i $i]
    82106    }
    83107    public proc SetPymolServerList { namelist } {
     
    106130    $_dispatcher register !timeout
    107131    $_dispatcher dispatch $this !timeout "[itcl::code $this Disconnect]; list"
     132
     133    $_dispatcher register !waiting
    108134
    109135    CheckNameList $hostlist
     
    118144        $_parser hide $cmd
    119145    }
    120 
    121146    #
    122147    # Set up the widgets in the main body
     
    155180#   Shuffle the list of server hosts.
    156181#
    157 itcl::body Rappture::VisViewer::Shuffle { hostlist } {
    158     set hosts [split $hostlist ,]
     182itcl::body Rappture::VisViewer::Shuffle { hosts } {
    159183    set randomHosts {}
    160184    set ticks [clock clicks]
     
    200224itcl::body Rappture::VisViewer::Connect { hostlist } {
    201225    blt::busy hold $itk_component(hull) -cursor watch
    202     # Can't call update because of all the pending stuff going on
    203     #update
    204    
    205     # Shuffle the list of servers so as to pick random
    206     set servers [Shuffle $hostlist]
    207    
    208     # Get the first server
    209     foreach {hostname port} [split [lindex $servers 0] :] break
    210     set servers [lrange $servers 1 end]
    211    
    212     while {1} {
    213         puts stderr "connecting to $hostname:$port..."
     226
     227    puts stderr "server type is $_serverType"
     228    foreach server [Shuffle $hostlist] {
     229        puts stderr "connecting to $server..."
     230        foreach {hostname port} [split $server ":"] break
    214231        if { [catch {socket $hostname $port} _sid] != 0 } {
    215232            set _sid ""
    216             if {[llength $servers] == 0} {
    217                 blt::busy release $itk_component(hull)
    218                 return 0
    219             }
    220             # Get the next server
    221             foreach {hostname port} [split [lindex $servers 0] :] break
    222             set servers [lrange $servers 1 end]
    223             continue
    224         }
    225         set _hostname $hostname:$port
     233            RemoveServerFromList $_serverType $server
     234            continue
     235        }
     236        set _hostname $server
    226237        fconfigure $_sid -translation binary -encoding binary
    227238       
    228         # Read back a reconnection order
     239        # Read back the server identification string.
    229240        if { [gets $_sid data] <= 0 } {
    230             error "reading from server"
     241            set _sid ""
     242            puts stderr "reading from server"
     243            RemoveServerFromList $_serverType $server
     244            continue
    231245        }
    232246        puts stderr "render server is $data"
     
    242256        return 1
    243257    }
    244     #NOTREACHED
    245258    blt::busy release $itk_component(hull)
     259    set x [expr {[winfo rootx $itk_component(hull)]+10}]
     260    set y [expr {[winfo rooty $itk_component(hull)]+10}]
     261    Rappture::Tooltip::cue @$x,$y "Can't connect to any $_serverType visualization server.  This may be a network problem.  Wait a few moments and try resetting the view."
    246262    return 0
    247263}
     
    254270#
    255271itcl::body Rappture::VisViewer::Disconnect {} {
     272    after cancel $_afterId
    256273    $_dispatcher cancel !timeout
    257274    catch {close $_sid}
     
    307324        Rappture::Tooltip::cue hide
    308325    } else {
    309         Rappture::Tooltip::cue @$x,$y "Can't connect to visualization server.  This may be a network problem.  Wait a few moments and try resetting the view."
     326        Rappture::Tooltip::cue @$x,$y "Can't connect to any $_serverType visualization server.  This may be a network problem.  Wait a few moments and try resetting the view."
    310327        return 0
    311328    }
     
    400417        flush $_sid
    401418    }
    402     if 0 {
    403     if { ![CheckConnection] } {
    404         puts stderr "connection is now down"
    405         return 0
    406     }
    407     }
    408419    return $_done($this)
     420}
     421
     422#
     423# ReceiveBytes --
     424#
     425#    Read some number of bytes from the visualization server.
     426#
     427itcl::body Rappture::VisViewer::StartWaiting {} {
     428    after cancel $_afterId
     429    set _afterId [after 500 [itcl::code $this SplashScreen on]]
     430}
     431
     432itcl::body Rappture::VisViewer::StopWaiting {} {
     433    SplashScreen off
    409434}
    410435
     
    539564    }
    540565}
     566
     567itcl::body Rappture::VisViewer::SplashScreen { state } {
     568    after cancel $_afterId
     569    set _afterId -1
     570    if { $state } {
     571        if { [winfo exists $itk_component(plotarea).view.splash] } {
     572            return
     573        }
     574        set inner [frame $itk_component(plotarea).view.splash]
     575        $inner configure -relief raised -bd 2
     576        label $inner.text1 -text "Rendering, please wait." \
     577            -font "Arial 10"
     578        label $inner.icon
     579        pack $inner -expand yes -anchor c
     580        blt::table $inner \
     581            0,0 $inner.text1 -anchor w \
     582            0,1 $inner.icon
     583        Waiting start $inner.icon
     584    } else {
     585        if { ![winfo exists $itk_component(plotarea).view.splash] } {
     586            return
     587        }
     588        Waiting stop $itk_component(plotarea).view.splash
     589        destroy $itk_component(plotarea).view.splash
     590    }
     591}
     592
     593itcl::body Rappture::VisViewer::Waiting { option widget } {
     594    switch -- $option {
     595        "start" {
     596            $_dispatcher dispatch $this !waiting \
     597                "[itcl::code $this Waiting "next" $widget] ; list"
     598            set _icon 0
     599            $widget configure -image [Rappture::icon bigroller${_icon}]
     600            $_dispatcher event -after 150 !waiting
     601        }
     602        "next" {
     603            incr _icon
     604            if { $_icon >= 8 } {
     605                set _icon 0
     606            }
     607            $widget configure -image [Rappture::icon bigroller${_icon}]
     608            $_dispatcher event -after 150 !waiting
     609        }
     610        "stop" {
     611            $_dispatcher cancel !waiting
     612        }
     613    }
     614}
  • branches/blt4/gui/scripts/vtkcontourviewer.tcl

    r2591 r2742  
    144144# ----------------------------------------------------------------------
    145145itcl::body Rappture::VtkContourViewer::constructor {hostlist args} {
     146    set  _serverType "vtkvis"
    146147    package require vtk
    147148    # Draw legend event
     
    790791            set _image(legend) [image create picture]
    791792        }
     793        $_image(legend) configure -data $bytes
    792794        puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    793         set src [image create picture -data $bytes]
    794         blt::winop image rotate $src $_image(legend) 90
    795         set dst $_image(legend)
    796795        DrawLegend
    797796    }
  • branches/blt4/gui/scripts/vtkstreamlinesviewer.tcl

    r2591 r2742  
    6868    protected method Disconnect {}
    6969    protected method DoResize {}
     70    protected method DoReseed {}
    7071    protected method DoRotate {}
    7172    protected method AdjustSetting {what {value ""}}
    72     protected method FixSettings { args  }
     73    protected method InitSettings { args  }
    7374    protected method Pan {option x y}
    7475    protected method Pick {x y}
     
    7980    protected method Rotate {option x y}
    8081    protected method SendCmd {string}
     82    protected method SendCmdNoWait {string}
    8183    protected method Zoom {option}
    8284
     
    8486    private method BuildAxisTab {}
    8587    private method BuildCameraTab {}
    86     private method BuildColormap { colormap dataobj comp }
    87     private method BuildCutawayTab {}
     88    private method BuildColormap { name colors }
     89    private method BuildCutplaneTab {}
    8890    private method BuildDownloadPopup { widget command }
    8991    private method BuildStreamsTab {}
    9092    private method BuildVolumeTab {}
    9193    private method ConvertToVtkData { dataobj comp }
    92     private method DrawLegend {}
     94    private method DrawLegend { title }
     95    private method Combo { option }
    9396    private method EnterLegend { x y }
    9497    private method EventuallyResize { w h }
     98    private method EventuallyReseed { numPoints }
    9599    private method EventuallyRotate { q }
     100    private method EventuallySetCutplane { axis args }
    96101    private method GetImage { args }
    97102    private method GetVtkData { args }
     
    102107    private method RequestLegend {}
    103108    private method SetColormap { dataobj comp }
     109    private method ChangeColormap { dataobj comp color }
     110    private method ColorsToColormap { color }
    104111    private method SetLegendTip { x y }
    105112    private method SetObjectStyle { dataobj comp }
     
    107114
    108115    private variable _arcball ""
    109     private variable _outbuf       ;# buffer for outgoing commands
    110 
    111     private variable _dlist ""     ;# list of data objects
    112     private variable _allDataObjs
     116    private variable _outbuf       ;    # buffer for outgoing commands
     117
     118    private variable _dlist ""     ;    # list of data objects
    113119    private variable _obj2datasets
    114     private variable _obj2ovride   ;# maps dataobj => style override
    115     private variable _datasets     ;# contains all the dataobj-component
    116                                    ;# datasets in the server
    117     private variable _colormaps    ;# contains all the colormaps
    118                                    ;# in the server.
     120    private variable _obj2ovride   ;    # maps dataobj => style override
     121    private variable _datasets     ;    # contains all the dataobj-component
     122                                   ;    # datasets in the server
     123    private variable _colormaps    ;    # contains all the colormaps
     124                                   ;    # in the server.
    119125    private variable _dataset2style    ;# maps dataobj-component to transfunc
    120     private variable _style2datasets   ;# maps tf back to list of
    121                                     # dataobj-components using the tf.
    122 
    123     private variable _click        ;# info used for rotate operations
    124     private variable _limits       ;# autoscale min/max for all axes
    125     private variable _view         ;# view params for 3D view
     126
     127    private variable _click        ;    # info used for rotate operations
     128    private variable _limits       ;    # autoscale min/max for all axes
     129    private variable _view         ;    # view params for 3D view
    126130    private variable _settings
    127     private variable _volume
    128     private variable _axis
    129     private variable _streamlines
    130     private variable _reset 1      ;# indicates if camera needs to be reset
    131                                     # to starting position.
    132 
    133     private variable _first ""     ;# This is the topmost dataset.
     131    private variable _style;            # Array of current component styles.
     132    private variable _initialStyle;     # Array of initial component styles.
     133    private variable _reset 1;          # indicates if camera needs to be reset
     134                                        # to starting position.
     135
     136    private variable _first ""     ;    # This is the topmost dataset.
    134137    private variable _start 0
    135138    private variable _buffering 0
     
    137140    private variable _seeds
    138141
    139     common _downloadPopup          ;# download options from popup
     142    common _downloadPopup;              # download options from popup
    140143    private common _hardcopy
    141144    private variable _width 0
    142145    private variable _height 0
    143146    private variable _resizePending 0
     147    private variable _reseedPending 0
    144148    private variable _rotatePending 0
     149    private variable _cutplanePending 0
     150    private variable _legendPending 0
    145151    private variable _outline
     152    private variable _vectorFields
     153    private variable _scalarFields
     154    private variable _fields
     155    private variable _currentField ""
     156    private variable _field      ""
     157    private variable _numSeeds 200
     158    private variable _colorMode "vmag";#  Mode of colormap (vmag or scalar)
    146159}
    147160
     
    155168# ----------------------------------------------------------------------
    156169itcl::body Rappture::VtkStreamlinesViewer::constructor {hostlist args} {
     170    set _serverType "vtkvis"
    157171    package require vtk
     172
    158173    # Rebuild event
    159174    $_dispatcher register !rebuild
     
    164179    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
    165180
     181    # Reseed event
     182    $_dispatcher register !reseed
     183    $_dispatcher dispatch $this !reseed "[itcl::code $this DoReseed]; list"
     184
    166185    # Rotate event
    167186    $_dispatcher register !rotate
    168187    $_dispatcher dispatch $this !rotate "[itcl::code $this DoRotate]; list"
    169188
    170     set _outbuf ""
     189    # Legend event
     190    $_dispatcher register !legend
     191    $_dispatcher dispatch $this !legend "[itcl::code $this RequestLegend]; list"
     192
     193    # X-Cutplane event
     194    $_dispatcher register !xcutplane
     195    $_dispatcher dispatch $this !xcutplane \
     196        "[itcl::code $this AdjustSetting cutplane-xposition]; list"
     197
     198    # Y-Cutplane event
     199    $_dispatcher register !ycutplane
     200    $_dispatcher dispatch $this !ycutplane \
     201        "[itcl::code $this AdjustSetting cutplane-yposition]; list"
     202
     203    # Z-Cutplane event
     204    $_dispatcher register !zcutplane
     205    $_dispatcher dispatch $this !zcutplane \
     206        "[itcl::code $this AdjustSetting cutplane-zposition]; list"
    171207
    172208    #
     
    203239    set _limits(zmax) 1.0
    204240
    205     array set _axis [subst {
    206         xgrid           0
    207         ygrid           0
    208         zgrid           0
    209         xcutaway        0
    210         ycutaway        0
    211         zcutaway        0
    212         xposition       0
    213         yposition       0
    214         zposition       0
    215         xdirection      -1
    216         ydirection      -1
    217         zdirection      -1
    218         visible         1
    219         labels          1
    220     }]
    221     array set _volume [subst {
    222         edges           0
    223         lighting        1
    224         opacity         40
    225         visible         1
    226         wireframe       0
    227     }]
    228     array set _streamlines [subst {
    229         seeds           0
    230         visible         1
    231         opacity         100
    232     }]
    233241    array set _settings [subst {
    234         legend          1
     242        axis-xgrid              0
     243        axis-ygrid              0
     244        axis-zgrid              0
     245        axis-xcutplane          0
     246        axis-ycutplane          0
     247        axis-zcutplane          0
     248        axis-xposition          0
     249        axis-yposition          0
     250        axis-zposition          0
     251        axis-visible            1
     252        axis-labels             1
     253        cutplane-edges          0
     254        cutplane-xvisible       0
     255        cutplane-yvisible       0
     256        cutplane-zvisible       0
     257        cutplane-xposition      50
     258        cutplane-yposition      50
     259        cutplane-zposition      50
     260        cutplane-visible        1
     261        cutplane-wireframe      0
     262        cutplane-opacity        100
     263        volume-edges            0
     264        volume-lighting         1
     265        volume-opacity          40
     266        volume-visible          1
     267        volume-wireframe        0
     268        streamlines-seeds       0
     269        streamlines-visible     1
     270        streamlines-opacity     100
     271        streamlines-numpoints   200
     272        streamlines-lighting    1
     273        streamlines-scale       1
     274        legend-visible          1
    235275    }]
    236276
     
    243283    }
    244284
     285    itk_component add fieldmenu {
     286        menu $itk_component(plotarea).menu -bg black -fg white -relief flat \
     287            -tearoff no
     288    } {
     289        usual
     290        ignore -background -foreground -relief -tearoff
     291    }
    245292    set c $itk_component(view)
    246293    bind $c <Configure> [itcl::code $this EventuallyResize %w %h]
     
    299346    Rappture::Tooltip::for $itk_component(zoomout) "Zoom out"
    300347
     348    itk_component add volume {
     349        Rappture::PushButton $f.volume \
     350            -onimage [Rappture::icon volume-on] \
     351            -offimage [Rappture::icon volume-off] \
     352            -variable [itcl::scope _settings(volume-visible)] \
     353            -command [itcl::code $this AdjustSetting volume-visible]
     354    }
     355    $itk_component(volume) select
     356    Rappture::Tooltip::for $itk_component(volume) \
     357        "Don't display the volume"
     358    pack $itk_component(volume) -padx 2 -pady 2
     359
     360    itk_component add streamlines {
     361        Rappture::PushButton $f.streamlines \
     362            -onimage [Rappture::icon streamlines-on] \
     363            -offimage [Rappture::icon streamlines-off] \
     364            -variable [itcl::scope _settings(streamlines-visible)] \
     365            -command [itcl::code $this AdjustSetting streamlines-visible] \
     366    }
     367    $itk_component(streamlines) select
     368    Rappture::Tooltip::for $itk_component(streamlines) \
     369        "Toggle the streamlines on/off"
     370    pack $itk_component(streamlines) -padx 2 -pady 2
     371
     372    itk_component add cutplane {
     373        Rappture::PushButton $f.cutplane \
     374            -onimage [Rappture::icon cutbutton] \
     375            -offimage [Rappture::icon cutbutton] \
     376            -variable [itcl::scope _settings(cutplane-visible)] \
     377            -command [itcl::code $this AdjustSetting cutplane-visible]
     378    }
     379    $itk_component(cutplane) select
     380    Rappture::Tooltip::for $itk_component(cutplane) \
     381        "Show/Hide cutplanes"
     382    pack $itk_component(cutplane) -padx 2 -pady 2
     383
     384
    301385    if { [catch {
    302386        BuildVolumeTab
    303387        BuildStreamsTab
     388        BuildCutplaneTab
    304389        BuildAxisTab
    305         BuildCutawayTab
    306390        BuildCameraTab
    307391    } errs] != 0 } {
     
    389473    eval itk_initialize $args
    390474    Connect
     475    update
    391476}
    392477
     
    396481itcl::body Rappture::VtkStreamlinesViewer::destructor {} {
    397482    Disconnect
    398     $_dispatcher cancel !rebuild
    399     $_dispatcher cancel !resize
    400     $_dispatcher cancel !rotate
    401483    image delete $_image(plot)
    402484    image delete $_image(download)
     
    411493        set _height 500
    412494    }
    413     #puts stderr "DoResize screen size $_width $_height"
    414495    set _start [clock clicks -milliseconds]
    415     #puts stderr "screen size request width=$_width height=$_height"
    416496    SendCmd "screen size $_width $_height"
    417     RequestLegend
     497    set _legendPending 1
    418498
    419499    #SendCmd "imgflush"
     
    431511}
    432512
     513itcl::body Rappture::VtkStreamlinesViewer::DoReseed {} {
     514    foreach dataset [CurrentDatasets -visible] {
     515        foreach {dataobj comp} [split $dataset -] break
     516        # This command works for either random or fmesh seeds
     517        SendCmd "streamlines seed numpts $_numSeeds $dataset"
     518    }
     519    set _reseedPending 0
     520}
     521
    433522itcl::body Rappture::VtkStreamlinesViewer::EventuallyResize { w h } {
    434     #puts stderr "EventuallyResize $w $h"
    435523    set _width $w
    436524    set _height $h
     
    438526    if { !$_resizePending } {
    439527        set _resizePending 1
    440         $_dispatcher event -after 200 !resize
     528        $_dispatcher event -after 400 !resize
     529    }
     530}
     531
     532itcl::body Rappture::VtkStreamlinesViewer::EventuallyReseed { numPoints } {
     533    set _numSeeds $numPoints
     534    if { !$_reseedPending } {
     535        set _reseedPending 1
     536        $_dispatcher event -after 600 !reseed
    441537    }
    442538}
     
    445541
    446542itcl::body Rappture::VtkStreamlinesViewer::EventuallyRotate { q } {
    447     #puts stderr "EventuallyRotate $w $h"
    448543    foreach { _view(qw) _view(qx) _view(qy) _view(qz) } $q break
    449544    if { !$_rotatePending } {
     
    451546        global rotate_delay
    452547        $_dispatcher event -after $rotate_delay !rotate
     548    }
     549}
     550
     551itcl::body Rappture::VtkStreamlinesViewer::EventuallySetCutplane { axis args } {
     552    if { !$_cutplanePending } {
     553        set _cutplanePending 1
     554        $_dispatcher event -after 100 !${axis}cutplane
    453555    }
    454556}
     
    489591        lappend _dlist $dataobj
    490592    }
    491     set _allDataObjs($dataobj) 1
    492593    set _obj2ovride($dataobj-color) $params(-color)
    493594    set _obj2ovride($dataobj-width) $params(-width)
     
    518619        # Remove it from the dataobj list.
    519620        set _dlist [lreplace $_dlist $pos $pos]
    520         foreach comp [$dataobj components] {
    521             SendCmd "dataset visible 0 $dataobj-$comp"
    522         }
     621        SendCmd "dataset visible 0"
    523622        array unset _obj2ovride $dataobj-*
     623        array unset _settings $dataobj-*
    524624        # Append to the end of the dataobj list.
    525625        lappend _dlist $dataobj
     
    571671                }
    572672                if { ![info exists _obj2ovride($dataobj-raise)] } {
    573                     # No setting indicates that the object isn't invisible.
     673                    # No setting indicates that the object isn't visible.
    574674                    continue
    575675                }
     
    707807# ----------------------------------------------------------------------
    708808itcl::body Rappture::VtkStreamlinesViewer::Connect {} {
    709     #puts stderr "Enter Connect: [info level -1]"
    710809    set _hosts [GetServerList "vtkvis"]
    711810    if { "" == $_hosts } {
     
    714813    set result [VisViewer::Connect $_hosts]
    715814    if { $result } {
    716         #puts stderr "Connected to $_hostname sid=$_sid"
    717815        set w [winfo width $itk_component(view)]
    718816        set h [winfo height $itk_component(view)]
     
    748846    VisViewer::Disconnect
    749847
     848    $_dispatcher cancel !rebuild
     849    $_dispatcher cancel !resize
     850    $_dispatcher cancel !reseed
     851    $_dispatcher cancel !rotate
     852    $_dispatcher cancel !xcutplane
     853    $_dispatcher cancel !ycutplane
     854    $_dispatcher cancel !zcutplane
     855    $_dispatcher cancel !legend
    750856    # disconnected -- no more data sitting on server
    751857    set _outbuf ""
     
    753859    array unset _data
    754860    array unset _colormaps
     861    array unset _seeds
     862    array unset _dataset2style
     863    array unset _obj2datasets
    755864}
    756865
     
    760869itcl::body Rappture::VtkStreamlinesViewer::sendto { bytes } {
    761870    SendBytes "$bytes\n"
     871    StartWaiting
    762872}
    763873
     
    774884    } else {
    775885        SendBytes "$string\n"
     886        StartWaiting
     887    }
     888}
     889
     890#
     891# SendCmdNoWait
     892#
     893#       Send commands off to the rendering server.  If we're currently
     894#       sending data objects to the server, buffer the commands to be
     895#       sent later.
     896#
     897itcl::body Rappture::VtkStreamlinesViewer::SendCmdNoWait {string} {
     898    if { $_buffering } {
     899        append _outbuf $string "\n"
     900    } else {
     901        SendBytes "$string\n"
    776902    }
    777903}
     
    792918    array set info $args
    793919    set bytes [ReceiveBytes $info(-bytes)]
     920    StopWaiting
    794921    if { $info(-type) == "image" } {
    795922        if 0 {
     
    810937        set tag $this-print-$info(-token)
    811938        set _hardcopy($tag) $bytes
     939    }
     940    if { $_legendPending } {
     941        RequestLegend
    812942    }
    813943}
     
    863993# ----------------------------------------------------------------------
    864994itcl::body Rappture::VtkStreamlinesViewer::Rebuild {} {
    865 
     995    update
    866996    set w [winfo width $itk_component(view)]
    867997    set h [winfo height $itk_component(view)]
     
    8711001    }
    8721002
     1003    set _buffering 1
     1004    set _legendPending 1
    8731005    # Turn on buffering of commands to the server.  We don't want to
    8741006    # be preempted by a server disconnect/reconnect (which automatically
    8751007    # generates a new call to Rebuild).   
    876     set _buffering 1
    877 
    8781008    set _width $w
    8791009    set _height $h
     
    8921022    DoRotate
    8931023    PanCamera
    894     set _first [lindex [get -objects] 0]
    895     if { $_reset || $_first == "" } {
    896         Zoom reset
    897         set _reset 0
    898     }
    899     FixSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \
    900         axis-visible axis-labels \
    901         streamlines-seeds streamlines-visible streamlines-opacity \
    902         volume-edges volume-lighting volume-opacity volume-visible \
    903         volume-wireframe
    904 
    905     #SendCmd "imgflush"
     1024    set _first ""
     1025    InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \
     1026        axis-visible axis-labels cutplane-visible \
     1027        cutplane-xposition cutplane-yposition cutplane-zposition \
     1028        cutplane-xvisible cutplane-yvisible cutplane-zvisible
     1029
     1030    SendCmd "imgflush"
    9061031
    9071032    set _limits(zmin) ""
     
    9211046                append _outbuf $bytes
    9221047                set _datasets($tag) 1
     1048                SetObjectStyle $dataobj $comp
    9231049            }
    9241050            lappend _obj2datasets($dataobj) $tag
     
    9281054                SendCmd "dataset visible 0 $tag"
    9291055            }
    930             SetObjectStyle $dataobj $comp
    9311056        }
    9321057    }
     
    9361061            array set view $location
    9371062        }
    938     }
    939     foreach axis { x y z } {
    940         set label [$_first hints ${axis}label]
    941         if { $label != "" } {
    942             SendCmd "axis name $axis $label"
    943         }
    944         set units [$_first hints ${axis}units]
    945         if { $units != "" } {
    946             SendCmd "axis units $axis $units"
    947         }
    948     }
    949        
     1063
     1064        if 0 {
     1065            # Tell the server the name of the tool, the version, and dataset
     1066            # that we are rendering.  Have to do it here because we don't know
     1067            # what data objects are using the renderer until be get here.
     1068            set args ""
     1069            lappend args tool [$_first hints toolId]
     1070            lappend args version [$_first hints toolRevision]
     1071            lappend args dataset [$_first hints label]
     1072            SendCmd "clientinfo $args"
     1073        }
     1074
     1075        foreach axis { x y z } {
     1076            set label [$_first hints ${axis}label]
     1077            if { $label != "" } {
     1078                SendCmd "axis name $axis $label"
     1079            }
     1080            set units [$_first hints ${axis}units]
     1081            if { $units != "" } {
     1082                SendCmd "axis units $axis $units"
     1083            }
     1084        }
     1085        array unset _scalarFields
     1086        array unset _vectorFields
     1087        set _currentField [$_first hints default]
     1088        $itk_component(field) choices delete 0 end
     1089        $itk_component(fieldmenu) delete 0 end
     1090        array unset _fields
     1091        foreach { name title units } [$_first hints vectors] {
     1092            set _vectorFields($title) $name
     1093            $itk_component(field) choices insert end "$name" "$title"
     1094            $itk_component(fieldmenu) add radiobutton -label "$title" \
     1095                -value $title -variable [itcl::scope _currentField] \
     1096                -selectcolor red \
     1097                -activebackground black \
     1098                -activeforeground white \
     1099                -font "Arial 8" \
     1100                -command [itcl::code $this Combo invoke]
     1101            set _fields($name) [list $title $units]
     1102        }
     1103        foreach { name title units } [$_first hints scalars] {
     1104            set _scalarFields($title) $name
     1105            $itk_component(field) choices insert end "$name" "$title"
     1106            $itk_component(fieldmenu) add radiobutton -label "$title" \
     1107                -value $title -variable [itcl::scope _currentField] \
     1108                -selectcolor red \
     1109                -activebackground black \
     1110                -activeforeground white \
     1111                -font "Arial 8" \
     1112                -command [itcl::code $this Combo invoke]
     1113            set _fields($name) [list $title $units]
     1114        }
     1115        $itk_component(field) value $_currentField
     1116    }
     1117
     1118    InitSettings streamlines-visible streamlines-palette volume-visible
     1119
     1120    if { $_reset } {
     1121        InitSettings streamlines-seeds streamlines-opacity \
     1122            streamlines-numpoints streamlines-lighting \
     1123            streamlines-palette streamlines-field \
     1124            volume-edges volume-lighting volume-opacity volume-wireframe
     1125        Zoom reset
     1126        set _reset 0
     1127    }
    9501128    set _buffering 0;                        # Turn off buffering.
    9511129
     
    9531131    # care.  We're finished here.
    9541132    blt::busy hold $itk_component(hull)
    955     SendBytes $_outbuf;                       
     1133    sendto $_outbuf;                       
    9561134    blt::busy release $itk_component(hull)
    9571135    set _outbuf "";                        # Clear the buffer.               
     
    11631341
    11641342# ----------------------------------------------------------------------
    1165 # USAGE: FixSettings <what> ?<value>?
     1343# USAGE: InitSettings <what> ?<value>?
    11661344#
    11671345# Used internally to update rendering settings whenever parameters
     
    11691347# to the back end.
    11701348# ----------------------------------------------------------------------
    1171 itcl::body Rappture::VtkStreamlinesViewer::FixSettings { args } {
    1172     foreach setting $args {
    1173         AdjustSetting $setting
     1349itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } {
     1350    foreach spec $args {
     1351        if { [info exists _settings($_first-$spec)] } {
     1352            # Reset global setting with dataobj specific setting
     1353            set _settings($spec) $_settings($_first-$spec)
     1354        }
     1355        AdjustSetting $spec
    11741356    }
    11751357}
     
    11881370    switch -- $what {
    11891371        "volume-opacity" {
    1190             set val $_volume(opacity)
     1372            set val $_settings(volume-opacity)
    11911373            set sval [expr { 0.01 * double($val) }]
    1192             foreach dataset [CurrentDatasets -visible $_first] {
     1374            foreach dataset [CurrentDatasets -visible] {
    11931375                SendCmd "polydata opacity $sval $dataset"
    11941376            }
    11951377        }
    11961378        "volume-wireframe" {
    1197             set bool $_volume(wireframe)
    1198             foreach dataset [CurrentDatasets -visible $_first] {
     1379            set bool $_settings(volume-wireframe)
     1380            foreach dataset [CurrentDatasets -visible] {
    11991381                SendCmd "polydata wireframe $bool $dataset"
    12001382            }
    12011383        }
    12021384        "volume-visible" {
    1203             set bool $_volume(visible)
    1204             foreach dataset [CurrentDatasets -visible $_first] {
     1385            set bool $_settings(volume-visible)
     1386            foreach dataset [CurrentDatasets -visible] {
    12051387                SendCmd "polydata visible $bool $dataset"
    12061388            }
     1389            if { $bool } {
     1390                Rappture::Tooltip::for $itk_component(volume) \
     1391                    "Hide the volume"
     1392            } else {
     1393                Rappture::Tooltip::for $itk_component(volume) \
     1394                    "Show the volume"
     1395            }
    12071396        }
    12081397        "volume-lighting" {
    1209             set bool $_volume(lighting)
    1210             foreach dataset [CurrentDatasets -visible $_first] {
     1398            set bool $_settings(volume-lighting)
     1399            foreach dataset [CurrentDatasets -visible] {
    12111400                SendCmd "polydata lighting $bool $dataset"
    12121401            }
    12131402        }
    12141403        "volume-edges" {
    1215             set bool $_volume(edges)
    1216             foreach dataset [CurrentDatasets -visible $_first] {
     1404            set bool $_settings(volume-edges)
     1405            foreach dataset [CurrentDatasets -visible] {
    12171406                SendCmd "polydata edges $bool $dataset"
    12181407            }
    12191408        }
    12201409        "axis-visible" {
    1221             set bool $_axis(visible)
     1410            set bool $_settings(axis-visible)
    12221411            SendCmd "axis visible all $bool"
    12231412        }
    12241413        "axis-labels" {
    1225             set bool $_axis(labels)
     1414            set bool $_settings(axis-labels)
    12261415            SendCmd "axis labels all $bool"
    12271416        }
    1228         "axis-xgrid" {
    1229             set bool $_axis(xgrid)
    1230             SendCmd "axis grid x $bool"
    1231         }
    1232         "axis-ygrid" {
    1233             set bool $_axis(ygrid)
    1234             SendCmd "axis grid y $bool"
    1235         }
    1236         "axis-zgrid" {
    1237             set bool $_axis(zgrid)
    1238             SendCmd "axis grid z $bool"
     1417        "axis-xgrid" - "axis-ygrid" - "axis-zgrid" {
     1418            set axis [string range $what 5 5]
     1419            set bool $_settings($what)
     1420            SendCmd "axis grid $axis $bool"
    12391421        }
    12401422        "axis-mode" {
    12411423            set mode [$itk_component(axismode) value]
    12421424            set mode [$itk_component(axismode) translate $mode]
     1425            set _settings($what) $mode
    12431426            SendCmd "axis flymode $mode"
    12441427        }
    1245         "axis-xcutaway" - "axis-ycutaway" - "axis-zcutaway" {
    1246             set axis [string range $what 5 5]
    1247             set bool $_axis(${axis}cutaway)
     1428        "cutplane-edges" {
     1429            set bool $_settings($what)
     1430            foreach dataset [CurrentDatasets -visible] {
     1431                SendCmd "cutplane edges $bool $dataset"
     1432            }
     1433        }
     1434        "cutplane-visible" {
     1435            set bool $_settings($what)
     1436            foreach dataset [CurrentDatasets -visible] {
     1437                SendCmd "cutplane visible $bool $dataset"
     1438            }
     1439        }
     1440        "cutplane-wireframe" {
     1441            set bool $_settings($what)
     1442            foreach dataset [CurrentDatasets -visible] {
     1443                SendCmd "cutplane wireframe $bool $dataset"
     1444            }
     1445        }
     1446        "cutplane-lighting" {
     1447            set bool $_settings($what)
     1448            foreach dataset [CurrentDatasets -visible] {
     1449                SendCmd "cutplane lighting $bool $dataset"
     1450            }
     1451        }
     1452        "cutplane-opacity" {
     1453            set val $_settings($what)
     1454            set sval [expr { 0.01 * double($val) }]
     1455            foreach dataset [CurrentDatasets -visible] {
     1456                SendCmd "cutplane opacity $sval $dataset"
     1457            }
     1458        }
     1459        "cutplane-xvisible" - "cutplane-yvisible" - "cutplane-zvisible" {
     1460            set axis [string range $what 9 9]
     1461            set bool $_settings($what)
    12481462            if { $bool } {
    1249                 set pos [expr $_axis(${axis}position) * 0.01]
    1250                 set dir $_axis(${axis}direction)
    12511463                $itk_component(${axis}CutScale) configure -state normal \
    12521464                    -troughcolor white
    1253                 SendCmd "renderer clipplane $axis $pos $dir"
    12541465            } else {
    12551466                $itk_component(${axis}CutScale) configure -state disabled \
    12561467                    -troughcolor grey82
    1257                 SendCmd "renderer clipplane $axis 1 -1"
    12581468            }
    1259         }
    1260         "axis-xposition" - "axis-yposition" - "axis-zposition" -
    1261         "axis-xdirection" - "axis-ydirection" - "axis-zdirection" {
    1262             set axis [string range $what 5 5]
    1263             #set dir $_axis(${axis}direction)
    1264             set pos [expr $_axis(${axis}position) * 0.01]
    1265             SendCmd "renderer clipplane ${axis} $pos -1"
     1469            SendCmd "cutplane axis $axis $bool"
     1470        }
     1471        "cutplane-xposition" - "cutplane-yposition" - "cutplane-zposition" {
     1472            set axis [string range $what 9 9]
     1473            set pos [expr $_settings($what) * 0.01]
     1474            SendCmd "cutplane slice ${axis} ${pos}"
     1475            set _cutplanePending 0
    12661476        }
    12671477        "streamlines-seeds" {
    1268             set bool $_streamlines(seeds)
    1269             foreach dataset [CurrentDatasets -visible $_first] {
     1478            set bool $_settings($what)
     1479            foreach dataset [CurrentDatasets -visible] {
    12701480                SendCmd "streamlines seed visible $bool $dataset"
    12711481            }
    12721482        }
     1483        "streamlines-numpoints" {
     1484            set density $_settings($what)
     1485            EventuallyReseed $density
     1486        }
    12731487        "streamlines-visible" {
    1274             set bool $_streamlines(visible)
    1275             foreach dataset [CurrentDatasets -visible $_first] {
     1488            set bool $_settings($what)
     1489            foreach dataset [CurrentDatasets -visible] {
    12761490                SendCmd "streamlines visible $bool $dataset"
    12771491            }
     1492            if { $bool } {
     1493                Rappture::Tooltip::for $itk_component(streamlines) \
     1494                    "Hide the streamlines"
     1495            } else {
     1496                Rappture::Tooltip::for $itk_component(streamlines) \
     1497                    "Show the streamlines"
     1498            }
    12781499        }
    12791500        "streamlines-mode" {
    12801501            set mode [$itk_component(streammode) value]
    1281             foreach dataset [CurrentDatasets -visible $_first] {
     1502            set _settings(streamlines-mode) $mode
     1503            foreach dataset [CurrentDatasets -visible] {
    12821504                switch -- $mode {
    12831505                    "lines" {
     
    12851507                    }
    12861508                    "ribbons" {
    1287                         SendCmd "streamlines ribbons 1 0 $dataset"
     1509                        SendCmd "streamlines ribbons 3 0 $dataset"
    12881510                    }
    12891511                    "tubes" {
    1290                         SendCmd "streamlines tubes 5 1 $dataset"
     1512                        SendCmd "streamlines tubes 5 3 $dataset"
    12911513                    }
    12921514                }
    12931515            }
    12941516        }
     1517        "streamlines-palette" {
     1518            set palette [$itk_component(palette) value]
     1519            set _settings(streamlines-palette) $palette
     1520            foreach dataset [CurrentDatasets -visible $_first] {
     1521                foreach {dataobj comp} [split $dataset -] break
     1522                ChangeColormap $dataobj $comp $palette
     1523            }
     1524            set _legendPending 1
     1525        }
    12951526        "streamlines-opacity" {
    1296             set val $_streamlines(opacity)
     1527            set val $_settings(streamlines-opacity)
    12971528            set sval [expr { 0.01 * double($val) }]
    12981529            foreach dataset [CurrentDatasets -visible $_first] {
     
    13001531            }
    13011532        }
     1533        "streamlines-scale" {
     1534            set val $_settings(streamlines-scale)
     1535            set sval [expr { 0.01 * double($val) }]
     1536            foreach dataset [CurrentDatasets -visible $_first] {
     1537                SendCmd "streamlines scale $sval $sval $sval $dataset"
     1538            }
     1539        }
     1540        "streamlines-lighting" {
     1541            set bool $_settings(streamlines-lighting)
     1542            foreach dataset [CurrentDatasets -visible $_first] {
     1543                SendCmd "streamlines lighting $bool $dataset"
     1544            }
     1545        }
     1546        "streamlines-field" {
     1547            set new [$itk_component(field) value]
     1548            set value [$itk_component(field) translate $new]
     1549            set _settings(streamlines-field) $value
     1550            if { [info exists _scalarFields($new)] } {
     1551                set name $_scalarFields($new)
     1552                set _colorMode scalar
     1553                set _currentField $new
     1554            } elseif { [info exists _vectorFields($new)] } {
     1555                set name $_vectorFields($new)
     1556                set _colorMode vmag
     1557                set _currentField $new
     1558            } else {
     1559                puts stderr "unknown field \"$new\""
     1560                return
     1561            }
     1562            foreach dataset [CurrentDatasets -visible] {
     1563                puts stderr "streamlines colormode $_colorMode ${name} $dataset"
     1564                puts stderr "cutplane colormode $_colorMode ${name} $dataset"
     1565                SendCmd "streamlines colormode $_colorMode ${name} $dataset"
     1566                SendCmd "cutplane colormode $_colorMode ${name} $dataset"
     1567            }
     1568            set _legendPending 1
     1569        }
    13021570        default {
    13031571            error "don't know how to fix $what"
     
    13141582#
    13151583itcl::body Rappture::VtkStreamlinesViewer::RequestLegend {} {
    1316     #puts stderr "RequestLegend _first=$_first"
    1317     #puts stderr "RequestLegend width=$_width height=$_height"
    13181584    set font "Arial 8"
    13191585    set lineht [font metrics $font -linespace]
    13201586    set c $itk_component(legend)
    13211587    set w 12
    1322     set h [expr {$_height - 2 * ($lineht + 2)}]
     1588    set h [expr {$_height - 3 * ($lineht + 2)}]
    13231589    if { $h < 1} {
    13241590        return
    13251591    }
     1592    if { [info exists _scalarFields($_currentField)] } {
     1593        set name $_scalarFields($_currentField)
     1594    } elseif { [info exists _vectorFields($_currentField)] } {
     1595        set name $_vectorFields($_currentField)
     1596    } else {
     1597        return
     1598    }
    13261599    # Set the legend on the first streamlines dataset.
    1327     foreach dataset [CurrentDatasets -visible] {
     1600    foreach dataset [CurrentDatasets -visible $_first] {
    13281601        foreach {dataobj comp} [split $dataset -] break
    13291602        if { [info exists _dataset2style($dataset)] } {
    1330             #puts stderr "RequestLegend w=$w h=$h"
    1331             SendCmd "legend $_dataset2style($dataset) vmag {} $w $h 0"
     1603            SendCmdNoWait \
     1604                "legend $_dataset2style($dataset) $_colorMode $name {} $w $h 0"
    13321605            break;
    13331606        }
    13341607    }
     1608}
     1609
     1610#
     1611# ChangeColormap --
     1612#
     1613itcl::body Rappture::VtkStreamlinesViewer::ChangeColormap {dataobj comp color} {
     1614    set tag $dataobj-$comp
     1615    if { ![info exist _style($tag)] } {
     1616        error "no initial colormap"
     1617    }
     1618    array set style $_style($tag)
     1619    set style(-color) $color
     1620    set _style($tag) [array get style]
     1621    SetColormap $dataobj $comp
    13351622}
    13361623
     
    13401627itcl::body Rappture::VtkStreamlinesViewer::SetColormap { dataobj comp } {
    13411628    array set style {
    1342         -color rainbow
     1629        -color BGYOR
    13431630        -levels 6
    13441631        -opacity 1.0
    13451632    }
    13461633    set tag $dataobj-$comp
    1347     array set style [$dataobj style $comp]
    1348     set colormap "$style(-color):$style(-levels):$style(-opacity)"
    1349     if { [info exists _colormaps($colormap)] } {
    1350         puts stderr "Colormap $colormap already built"
    1351         return $colormap
    1352     }
    1353     if { ![info exists _dataset2style($tag)] } {
    1354         set _dataset2style($tag) $colormap
    1355         lappend _style2datasets($colormap) $tag
    1356     }
    1357     if { ![info exists _colormaps($colormap)] } {
    1358         # Build the pseudo colormap if it doesn't exist.
    1359         BuildColormap $colormap $dataobj $comp
    1360         set _colormaps($colormap) 1
    1361     }
    1362     SendCmd "streamlines colormap $colormap $tag"
    1363     return $colormap
    1364 }
    1365 
    1366 #
    1367 # BuildColormap --
    1368 #
    1369 itcl::body Rappture::VtkStreamlinesViewer::BuildColormap { colormap dataobj comp } {
    1370     array set style {
    1371         -color rainbow
    1372         -levels 6
    1373         -opacity 1.0
    1374     }
    1375     array set style [$dataobj style $comp]
    1376     if {$style(-color) == "rainbow"} {
    1377         set style(-color) "white:yellow:green:cyan:blue:magenta"
    1378     }
    1379     set clist [split $style(-color) :]
     1634    if { ![info exists _initialStyle($tag)] } {
     1635        # Save the initial component style.
     1636        set _initialStyle($tag) [$dataobj style $comp]
     1637    }
     1638
     1639    # Override defaults with initial style defined in xml.
     1640    array set style $_initialStyle($tag)
     1641
     1642    if { ![info exists _style($tag)] } {
     1643        set _style($tag) [array get style]
     1644    }
     1645    # Override initial style with current style.
     1646    array set style $_style($tag)
     1647
     1648    set name "$style(-color):$style(-levels):$style(-opacity)"
     1649    if { ![info exists _colormaps($name)] } {
     1650        BuildColormap $name [array get style]
     1651        set _colormaps($name) 1
     1652    }
     1653    if { ![info exists _dataset2style($tag)] ||
     1654         $_dataset2style($tag) != $name } {
     1655        SendCmd "streamlines colormap $name $tag"
     1656        SendCmd "cutplane colormap $name $tag"
     1657        set _dataset2style($tag) $name
     1658    }
     1659}
     1660
     1661itcl::body Rappture::VtkStreamlinesViewer::ColorsToColormap { colors } {
     1662    switch -- $colors {
     1663        "grey-to-blue" {
     1664            return {
     1665                0.0                      0.200 0.200 0.200
     1666                0.14285714285714285      0.400 0.400 0.400
     1667                0.2857142857142857       0.600 0.600 0.600
     1668                0.42857142857142855      0.900 0.900 0.900
     1669                0.5714285714285714       0.800 1.000 1.000
     1670                0.7142857142857143       0.600 1.000 1.000
     1671                0.8571428571428571       0.400 0.900 1.000
     1672                1.0                      0.000 0.600 0.800
     1673            }
     1674        }
     1675        "blue-to-grey" {
     1676            return {
     1677                0.0                     0.000 0.600 0.800
     1678                0.14285714285714285     0.400 0.900 1.000
     1679                0.2857142857142857      0.600 1.000 1.000
     1680                0.42857142857142855     0.800 1.000 1.000
     1681                0.5714285714285714      0.900 0.900 0.900
     1682                0.7142857142857143      0.600 0.600 0.600
     1683                0.8571428571428571      0.400 0.400 0.400
     1684                1.0                     0.200 0.200 0.200
     1685            }
     1686        }
     1687        "blue" {
     1688            return {
     1689                0.0                     0.900 1.000 1.000
     1690                0.1111111111111111      0.800 0.983 1.000
     1691                0.2222222222222222      0.700 0.950 1.000
     1692                0.3333333333333333      0.600 0.900 1.000
     1693                0.4444444444444444      0.500 0.833 1.000
     1694                0.5555555555555556      0.400 0.750 1.000
     1695                0.6666666666666666      0.300 0.650 1.000
     1696                0.7777777777777778      0.200 0.533 1.000
     1697                0.8888888888888888      0.100 0.400 1.000
     1698                1.0                     0.000 0.250 1.000
     1699            }
     1700        }
     1701        "brown-to-blue" {
     1702            return {
     1703                0.0                             0.200   0.100   0.000
     1704                0.09090909090909091             0.400   0.187   0.000
     1705                0.18181818181818182             0.600   0.379   0.210
     1706                0.2727272727272727              0.800   0.608   0.480
     1707                0.36363636363636365             0.850   0.688   0.595
     1708                0.45454545454545453             0.950   0.855   0.808
     1709                0.5454545454545454              0.800   0.993   1.000
     1710                0.6363636363636364              0.600   0.973   1.000
     1711                0.7272727272727273              0.400   0.940   1.000
     1712                0.8181818181818182              0.200   0.893   1.000
     1713                0.9090909090909091              0.000   0.667   0.800
     1714                1.0                             0.000   0.480   0.600
     1715            }
     1716        }
     1717        "blue-to-brown" {
     1718            return {
     1719                0.0                             0.000   0.480   0.600
     1720                0.09090909090909091             0.000   0.667   0.800
     1721                0.18181818181818182             0.200   0.893   1.000
     1722                0.2727272727272727              0.400   0.940   1.000
     1723                0.36363636363636365             0.600   0.973   1.000
     1724                0.45454545454545453             0.800   0.993   1.000
     1725                0.5454545454545454              0.950   0.855   0.808
     1726                0.6363636363636364              0.850   0.688   0.595
     1727                0.7272727272727273              0.800   0.608   0.480
     1728                0.8181818181818182              0.600   0.379   0.210
     1729                0.9090909090909091              0.400   0.187   0.000
     1730                1.0                             0.200   0.100   0.000
     1731            }
     1732        }
     1733        "blue-to-orange" {
     1734            return {
     1735                0.0                             0.000   0.167   1.000
     1736                0.09090909090909091             0.100   0.400   1.000
     1737                0.18181818181818182             0.200   0.600   1.000
     1738                0.2727272727272727              0.400   0.800   1.000
     1739                0.36363636363636365             0.600   0.933   1.000
     1740                0.45454545454545453             0.800   1.000   1.000
     1741                0.5454545454545454              1.000   1.000   0.800
     1742                0.6363636363636364              1.000   0.933   0.600
     1743                0.7272727272727273              1.000   0.800   0.400
     1744                0.8181818181818182              1.000   0.600   0.200
     1745                0.9090909090909091              1.000   0.400   0.100
     1746                1.0                             1.000   0.167   0.000
     1747            }
     1748        }
     1749        "orange-to-blue" {
     1750            return {
     1751                0.0                             1.000   0.167   0.000
     1752                0.09090909090909091             1.000   0.400   0.100
     1753                0.18181818181818182             1.000   0.600   0.200
     1754                0.2727272727272727              1.000   0.800   0.400
     1755                0.36363636363636365             1.000   0.933   0.600
     1756                0.45454545454545453             1.000   1.000   0.800
     1757                0.5454545454545454              0.800   1.000   1.000
     1758                0.6363636363636364              0.600   0.933   1.000
     1759                0.7272727272727273              0.400   0.800   1.000
     1760                0.8181818181818182              0.200   0.600   1.000
     1761                0.9090909090909091              0.100   0.400   1.000
     1762                1.0                             0.000   0.167   1.000
     1763            }
     1764        }
     1765        "rainbow" {
     1766            set clist {
     1767                "#EE82EE"
     1768                "#4B0082"
     1769                "blue"
     1770                "#008000"
     1771                "yellow"
     1772                "#FFA500"
     1773                "red"
     1774            }
     1775        }
     1776        "BGYOR" {
     1777            set clist {
     1778                "blue"
     1779                "#008000"
     1780                "yellow"
     1781                "#FFA500"
     1782                "red"
     1783            }
     1784        }
     1785        "ROYGB" {
     1786            set clist {
     1787                "red"
     1788                "#FFA500"
     1789                "yellow"
     1790                "#008000"
     1791                "blue"
     1792            }
     1793        }
     1794        "RYGCB" {
     1795            set clist {
     1796                "red"
     1797                "yellow"
     1798                "green"
     1799                "cyan"
     1800                "blue"
     1801            }
     1802        }
     1803        "BCGYR" {
     1804            set clist {
     1805                "blue"
     1806                "cyan"
     1807                "green"
     1808                "yellow"
     1809                "red"
     1810            }
     1811        }
     1812        "spectral" {
     1813            return {
     1814                0.0 0.150 0.300 1.000
     1815                0.1 0.250 0.630 1.000
     1816                0.2 0.450 0.850 1.000
     1817                0.3 0.670 0.970 1.000
     1818                0.4 0.880 1.000 1.000
     1819                0.5 1.000 1.000 0.750
     1820                0.6 1.000 0.880 0.600
     1821                0.7 1.000 0.680 0.450
     1822                0.8 0.970 0.430 0.370
     1823                0.9 0.850 0.150 0.196
     1824                1.0 0.650 0.000 0.130
     1825            }
     1826        }
     1827        "green-to-magenta" {
     1828            return {
     1829                0.0 0.000 0.316 0.000
     1830                0.06666666666666667 0.000 0.526 0.000
     1831                0.13333333333333333 0.000 0.737 0.000
     1832                0.2 0.000 0.947 0.000
     1833                0.26666666666666666 0.316 1.000 0.316
     1834                0.3333333333333333 0.526 1.000 0.526
     1835                0.4 0.737 1.000 0.737
     1836                0.4666666666666667 1.000 1.000 1.000
     1837                0.5333333333333333 1.000 0.947 1.000
     1838                0.6 1.000 0.737 1.000
     1839                0.6666666666666666 1.000 0.526 1.000
     1840                0.7333333333333333 1.000 0.316 1.000
     1841                0.8 0.947 0.000 0.947
     1842                0.8666666666666667 0.737 0.000 0.737
     1843                0.9333333333333333 0.526 0.000 0.526
     1844                1.0 0.316 0.000 0.316
     1845            }
     1846        }
     1847        "greyscale" {
     1848            return {
     1849                0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0
     1850            }
     1851        }
     1852        "nanohub" {
     1853            set clist "white yellow green cyan blue magenta"
     1854        }
     1855        default {
     1856            set clist $colors
     1857        }
     1858    }
    13801859    set cmap {}
    13811860    for {set i 0} {$i < [llength $clist]} {incr i} {
     
    13841863        append cmap "$x [Color2RGB $color] "
    13851864    }
     1865    return $cmap
     1866}
     1867
     1868#
     1869# BuildColormap --
     1870#
     1871itcl::body Rappture::VtkStreamlinesViewer::BuildColormap { name styles } {
     1872    array set style $styles
     1873    set cmap [ColorsToColormap $style(-color)]
    13861874    if { [llength $cmap] == 0 } {
    13871875        set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0"
    13881876    }
    1389     if { ![info exists _volume(opacity)] } {
    1390         set _volume(opacity) $style(-opacity)
    1391     }
    1392     set max $_volume(opacity)
     1877    if { ![info exists _settings(volume-opacity)] } {
     1878        set _settings(volume-opacity) $style(-opacity)
     1879    }
     1880    set max $_settings(volume-opacity)
    13931881
    13941882    set wmap "0.0 1.0 1.0 1.0"
    1395     SendCmd "colormap add $colormap { $cmap } { $wmap }"
     1883    SendCmd "colormap add $name { $cmap } { $wmap }"
    13961884}
    13971885
     
    14181906
    14191907itcl::body Rappture::VtkStreamlinesViewer::limits { dataobj } {
    1420 
     1908    return
    14211909    array unset _limits $dataobj-*
    14221910    foreach comp [$dataobj components] {
     
    14261914            set tmpfile file[pid].vtk
    14271915            set f [open "$tmpfile" "w"]
     1916            fconfigure $f -translation binary -encoding binary
    14281917            puts $f $data
    14291918            close $f
    14301919            set reader [vtkDataSetReader $tag-xvtkDataSetReader]
    14311920            $reader SetFileName $tmpfile
    1432             $reader ReadAllNormalsOn
    14331921            $reader ReadAllScalarsOn
    14341922            $reader ReadAllVectorsOn
     
    14391927            set pointData [$output GetPointData]
    14401928            puts stderr "\#scalars=[$reader GetNumberOfScalarsInFile]"
    1441             puts stderr "\#vectors=[$reader GetNumberOfVectorsInFile]"
    1442             puts stderr "\#tensors=[$reader GetNumberOfTensorsInFile]"
    1443             puts stderr "\#normals=[$reader GetNumberOfNormalsInFile]"
    14441929            puts stderr "\#fielddata=[$reader GetNumberOfFieldDataInFile]"
    14451930            puts stderr "fielddataname=[$reader GetFieldDataNameInFile 0]"
     
    14471932            set pointData [$output GetPointData]
    14481933            puts stderr "field \#arrays=[$fieldData GetNumberOfArrays]"
     1934            for { set i 0 } { $i < [$fieldData GetNumberOfArrays] } { incr i } {
     1935                puts stderr [$fieldData GetArrayName $i]
     1936            }
    14491937            puts stderr "point \#arrays=[$pointData GetNumberOfArrays]"
     1938            for { set i 0 } { $i < [$pointData GetNumberOfArrays] } { incr i } {
     1939                set name [$pointData GetArrayName $i]
     1940                if { ![info exists _fields($name)] } {
     1941                    $itk_component(field) choices insert end "$name" "$name"
     1942                    set _fields($name) 1
     1943                }
     1944            }
    14501945            puts stderr "field \#components=[$fieldData GetNumberOfComponents]"
    14511946            puts stderr "point \#components=[$pointData GetNumberOfComponents]"
     
    14931988    checkbutton $inner.volume \
    14941989        -text "Show Volume" \
    1495         -variable [itcl::scope _volume(visible)] \
     1990        -variable [itcl::scope _settings(volume-visible)] \
    14961991        -command [itcl::code $this AdjustSetting volume-visible] \
    14971992        -font "Arial 9"
     
    14991994    checkbutton $inner.wireframe \
    15001995        -text "Show Wireframe" \
    1501         -variable [itcl::scope _volume(wireframe)] \
     1996        -variable [itcl::scope _settings(volume-wireframe)] \
    15021997        -command [itcl::code $this AdjustSetting volume-wireframe] \
    15031998        -font "Arial 9"
     
    15052000    checkbutton $inner.lighting \
    15062001        -text "Enable Lighting" \
    1507         -variable [itcl::scope _volume(lighting)] \
     2002        -variable [itcl::scope _settings(volume-lighting)] \
    15082003        -command [itcl::code $this AdjustSetting volume-lighting] \
    15092004        -font "Arial 9"
     
    15112006    checkbutton $inner.edges \
    15122007        -text "Show Edges" \
    1513         -variable [itcl::scope _volume(edges)] \
     2008        -variable [itcl::scope _settings(volume-edges)] \
    15142009        -command [itcl::code $this AdjustSetting volume-edges] \
    15152010        -font "Arial 9"
     
    15172012    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    15182013    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1519         -variable [itcl::scope _volume(opacity)] \
     2014        -variable [itcl::scope _settings(volume-opacity)] \
    15202015        -width 10 \
    15212016        -showvalue off \
     
    15422037    set inner [$itk_component(main) insert end \
    15432038        -title "Streams Settings" \
    1544         -icon [Rappture::icon stream]]
     2039        -icon [Rappture::icon streamlines-on]]
    15452040    $inner configure -borderwidth 4
    15462041
    15472042    checkbutton $inner.streamlines \
    15482043        -text "Show Streamlines" \
    1549         -variable [itcl::scope _streamlines(visible)] \
     2044        -variable [itcl::scope _settings(streamlines-visible)] \
    15502045        -command [itcl::code $this AdjustSetting streamlines-visible] \
    15512046        -font "Arial 9"
     2047   
     2048    checkbutton $inner.lighting \
     2049        -text "Enable Lighting" \
     2050        -variable [itcl::scope _settings(streamlines-lighting)] \
     2051        -command [itcl::code $this AdjustSetting streamlines-lighting] \
     2052        -font "Arial 9"
    15522053
    15532054    checkbutton $inner.seeds \
    15542055        -text "Show Seeds" \
    1555         -variable [itcl::scope _streamlines(seeds)] \
     2056        -variable [itcl::scope _settings(streamlines-seeds)] \
    15562057        -command [itcl::code $this AdjustSetting streamlines-seeds] \
    15572058        -font "Arial 9"
     
    15702071    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    15712072    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1572         -variable [itcl::scope _streamlines(opacity)] \
     2073        -variable [itcl::scope _settings(streamlines-opacity)] \
    15732074        -width 10 \
    15742075        -showvalue off \
    15752076        -command [itcl::code $this AdjustSetting streamlines-opacity]
    15762077
     2078    label $inner.density_l -text "Number of Seeds" -font "Arial 9"
     2079    ::scale $inner.density -from 1 -to 1000 -orient horizontal \
     2080        -variable [itcl::scope _settings(streamlines-numpoints)] \
     2081        -width 10 \
     2082        -showvalue on \
     2083        -command [itcl::code $this AdjustSetting streamlines-numpoints]
     2084
     2085    label $inner.scale_l -text "Scale" -font "Arial 9"
     2086    ::scale $inner.scale -from 1 -to 100 -orient horizontal \
     2087        -variable [itcl::scope _settings(streamlines-scale)] \
     2088        -width 10 \
     2089        -showvalue off \
     2090        -command [itcl::code $this AdjustSetting streamlines-scale]
     2091
     2092    label $inner.field_l -text "Field" -font "Arial 9"
     2093    itk_component add field {
     2094        Rappture::Combobox $inner.field -width 10 -editable no
     2095    }
     2096    bind $inner.field <<Value>> \
     2097        [itcl::code $this AdjustSetting streamlines-field]
     2098
     2099    label $inner.palette_l -text "Palette" -font "Arial 9"
     2100    itk_component add palette {
     2101        Rappture::Combobox $inner.palette -width 10 -editable no
     2102    }
     2103    $inner.palette choices insert end \
     2104        "BCGYR"              "BCGYR"            \
     2105        "BGYOR"              "BGYOR"            \
     2106        "blue"               "blue"             \
     2107        "blue-to-brown"      "blue-to-brown"    \
     2108        "blue-to-orange"     "blue-to-orange"   \
     2109        "blue-to-grey"       "blue-to-grey"     \
     2110        "green-to-magenta"   "green-to-magenta" \
     2111        "greyscale"          "greyscale"        \
     2112        "nanohub"            "nanohub"          \
     2113        "rainbow"            "rainbow"          \
     2114        "spectral"           "spectral"         \
     2115        "ROYGB"              "ROYGB"            \
     2116        "RYGCB"              "RYGCB"            \
     2117        "brown-to-blue"      "brown-to-blue"    \
     2118        "grey-to-blue"       "grey-to-blue"     \
     2119        "orange-to-blue"     "orange-to-blue"   
     2120
     2121    $itk_component(palette) value "BCGYR"
     2122    bind $inner.palette <<Value>> \
     2123        [itcl::code $this AdjustSetting streamlines-palette]
     2124
    15772125    blt::table $inner \
    15782126        0,0 $inner.streamlines -anchor w -pady 2 -cspan 2 \
    1579         1,0 $inner.seeds       -anchor w -pady 2 -cspan 2 \
    1580         2,0 $inner.mode_l      -anchor w -pady 2  \
    1581         2,1 $inner.mode        -anchor w -pady 2  \
    1582         3,0 $inner.opacity_l   -anchor w -pady 2  \
    1583         4,0 $inner.opacity     -fill x   -pady 2 -cspan 2
     2127        1,0 $inner.lighting    -anchor w -pady 2 -cspan 2 \
     2128        2,0 $inner.seeds       -anchor w -pady 2 -cspan 2 \
     2129        3,0 $inner.density_l   -anchor w -pady 2 -cspan 2 \
     2130        4,0 $inner.density     -fill x   -pady 2 -cspan 2 \
     2131        5,0 $inner.mode_l      -anchor w -pady 2  \
     2132        5,1 $inner.mode        -anchor w -pady 2  \
     2133        6,0 $inner.opacity_l   -anchor w -pady 2 -cspan 2 \
     2134        7,0 $inner.opacity     -fill x   -pady 2 -cspan 2 \
     2135        8,0 $inner.field_l     -anchor w -pady 2  \
     2136        8,1 $inner.field       -anchor w -pady 2  \
     2137        9,0 $inner.palette_l   -anchor w -pady 2  \
     2138        9,1 $inner.palette     -anchor w -pady 2  \
     2139       
    15842140
    15852141    blt::table configure $inner r* c* -resize none
    1586     blt::table configure $inner r5 c1 c2 -resize expand
     2142    blt::table configure $inner r10 c1 c2 -resize expand
    15872143}
    15882144
     
    15992155    checkbutton $inner.visible \
    16002156        -text "Show Axes" \
    1601         -variable [itcl::scope _axis(visible)] \
     2157        -variable [itcl::scope _settings(axis-visible)] \
    16022158        -command [itcl::code $this AdjustSetting axis-visible] \
    16032159        -font "Arial 9"
     
    16052161    checkbutton $inner.labels \
    16062162        -text "Show Axis Labels" \
    1607         -variable [itcl::scope _axis(labels)] \
     2163        -variable [itcl::scope _settings(axis-labels)] \
    16082164        -command [itcl::code $this AdjustSetting axis-labels] \
    16092165        -font "Arial 9"
     
    16112167    checkbutton $inner.gridx \
    16122168        -text "Show X Grid" \
    1613         -variable [itcl::scope _axis(xgrid)] \
     2169        -variable [itcl::scope _settings(axis-xgrid)] \
    16142170        -command [itcl::code $this AdjustSetting axis-xgrid] \