Changeset 2742


Ignore:
Timestamp:
Dec 27, 2011, 12:41:24 PM (13 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] \
    16152171        -font "Arial 9"
    16162172    checkbutton $inner.gridy \
    16172173        -text "Show Y Grid" \
    1618         -variable [itcl::scope _axis(ygrid)] \
     2174        -variable [itcl::scope _settings(axis-ygrid)] \
    16192175        -command [itcl::code $this AdjustSetting axis-ygrid] \
    16202176        -font "Arial 9"
    16212177    checkbutton $inner.gridz \
    16222178        -text "Show Z Grid" \
    1623         -variable [itcl::scope _axis(zgrid)] \
     2179        -variable [itcl::scope _settings(axis-zgrid)] \
    16242180        -command [itcl::code $this AdjustSetting axis-zgrid] \
    16252181        -font "Arial 9"
     
    16872243}
    16882244
    1689 itcl::body Rappture::VtkStreamlinesViewer::BuildCutawayTab {} {
     2245itcl::body Rappture::VtkStreamlinesViewer::BuildCutplaneTab {} {
    16902246
    16912247    set fg [option get $itk_component(hull) font Font]
    16922248   
    16932249    set inner [$itk_component(main) insert end \
    1694         -title "Cutaway Along Axis" \
     2250        -title "Cutplane Settings" \
    16952251        -icon [Rappture::icon cutbutton]]
    16962252
    16972253    $inner configure -borderwidth 4
     2254
     2255    checkbutton $inner.visible \
     2256        -text "Show Cutplanes" \
     2257        -variable [itcl::scope _settings(cutplane-visible)] \
     2258        -command [itcl::code $this AdjustSetting cutplane-visible] \
     2259        -font "Arial 9"
     2260
     2261    checkbutton $inner.wireframe \
     2262        -text "Show Wireframe" \
     2263        -variable [itcl::scope _settings(cutplane-wireframe)] \
     2264        -command [itcl::code $this AdjustSetting cutplane-wireframe] \
     2265        -font "Arial 9"
     2266
     2267    checkbutton $inner.lighting \
     2268        -text "Enable Lighting" \
     2269        -variable [itcl::scope _settings(cutplane-lighting)] \
     2270        -command [itcl::code $this AdjustSetting cutplane-lighting] \
     2271        -font "Arial 9"
     2272
     2273    checkbutton $inner.edges \
     2274        -text "Show Edges" \
     2275        -variable [itcl::scope _settings(cutplane-edges)] \
     2276        -command [itcl::code $this AdjustSetting cutplane-edges] \
     2277        -font "Arial 9"
     2278
     2279    label $inner.opacity_l -text "Opacity" -font "Arial 9"
     2280    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
     2281        -variable [itcl::scope _settings(cutplane-opacity)] \
     2282        -width 10 \
     2283        -showvalue off \
     2284        -command [itcl::code $this AdjustSetting cutplane-opacity]
     2285    $inner.opacity set $_settings(cutplane-opacity)
    16982286
    16992287    # X-value slicer...
     
    17022290            -onimage [Rappture::icon x-cutplane] \
    17032291            -offimage [Rappture::icon x-cutplane] \
    1704             -command [itcl::code $this AdjustSetting axis-xcutaway] \
    1705             -variable [itcl::scope _axis(xcutaway)]
     2292            -command [itcl::code $this AdjustSetting cutplane-xvisible] \
     2293            -variable [itcl::scope _settings(cutplane-xvisible)]
    17062294    }
    17072295    Rappture::Tooltip::for $itk_component(xCutButton) \
    1708         "Toggle the X-axis cutaway on/off"
     2296        "Toggle the X-axis cutplane on/off"
    17092297
    17102298    itk_component add xCutScale {
     
    17122300            -width 10 -orient vertical -showvalue yes \
    17132301            -borderwidth 1 -highlightthickness 0 \
    1714             -command [itcl::code $this Slice move x] \
    1715             -variable [itcl::scope _axis(xposition)]
     2302            -command [itcl::code $this EventuallySetCutplane x] \
     2303            -variable [itcl::scope _settings(cutplane-xposition)]
    17162304    } {
    17172305        usual
    17182306        ignore -borderwidth -highlightthickness
    17192307    }
    1720     # Set the default cutaway value before disabling the scale.
    1721     $itk_component(xCutScale) set 100
     2308    # Set the default cutplane value before disabling the scale.
     2309    $itk_component(xCutScale) set 50
    17222310    $itk_component(xCutScale) configure -state disabled
    17232311    Rappture::Tooltip::for $itk_component(xCutScale) \
    17242312        "@[itcl::code $this Slice tooltip x]"
    1725 
    1726     itk_component add xDirButton {
    1727         Rappture::PushButton $inner.xdir \
    1728             -onimage [Rappture::icon arrow-down] \
    1729             -onvalue -1 \
    1730             -offimage [Rappture::icon arrow-up] \
    1731             -offvalue 1 \
    1732             -command [itcl::code $this AdjustSetting axis-xdirection] \
    1733             -variable [itcl::scope _axis(xdirection)]
    1734     }
    1735     set _axis(xdirection) -1
    1736     Rappture::Tooltip::for $itk_component(xDirButton) \
    1737         "Toggle the direction of the X-axis cutaway"
    17382313
    17392314    # Y-value slicer...
     
    17422317            -onimage [Rappture::icon y-cutplane] \
    17432318            -offimage [Rappture::icon y-cutplane] \
    1744             -command [itcl::code $this AdjustSetting axis-ycutaway] \
    1745             -variable [itcl::scope _axis(ycutaway)]
     2319            -command [itcl::code $this AdjustSetting cutplane-yvisible] \
     2320            -variable [itcl::scope _settings(cutplane-yvisible)]
    17462321    }
    17472322    Rappture::Tooltip::for $itk_component(yCutButton) \
    1748         "Toggle the Y-axis cutaway on/off"
     2323        "Toggle the Y-axis cutplane on/off"
    17492324
    17502325    itk_component add yCutScale {
     
    17522327            -width 10 -orient vertical -showvalue yes \
    17532328            -borderwidth 1 -highlightthickness 0 \
    1754             -command [itcl::code $this Slice move y] \
    1755             -variable [itcl::scope _axis(yposition)]
     2329            -command [itcl::code $this EventuallySetCutplane y] \
     2330            -variable [itcl::scope _settings(cutplane-yposition)]
    17562331    } {
    17572332        usual
     
    17602335    Rappture::Tooltip::for $itk_component(yCutScale) \
    17612336        "@[itcl::code $this Slice tooltip y]"
    1762     # Set the default cutaway value before disabling the scale.
    1763     $itk_component(yCutScale) set 100
     2337    # Set the default cutplane value before disabling the scale.
     2338    $itk_component(yCutScale) set 50
    17642339    $itk_component(yCutScale) configure -state disabled
    1765 
    1766     itk_component add yDirButton {
    1767         Rappture::PushButton $inner.ydir \
    1768             -onimage [Rappture::icon arrow-down] \
    1769             -onvalue -1 \
    1770             -offimage [Rappture::icon arrow-up] \
    1771             -offvalue 1 \
    1772             -command [itcl::code $this AdjustSetting axis-ydirection] \
    1773             -variable [itcl::scope _axis(ydirection)]
    1774     }
    1775     Rappture::Tooltip::for $itk_component(yDirButton) \
    1776         "Toggle the direction of the Y-axis cutaway"
    1777     set _axis(ydirection) -1
    17782340
    17792341    # Z-value slicer...
     
    17822344            -onimage [Rappture::icon z-cutplane] \
    17832345            -offimage [Rappture::icon z-cutplane] \
    1784             -command [itcl::code $this AdjustSetting axis-zcutaway] \
    1785             -variable [itcl::scope _axis(zcutaway)]
     2346            -command [itcl::code $this AdjustSetting cutplane-zvisible] \
     2347            -variable [itcl::scope _settings(cutplane-zvisible)]
    17862348    }
    17872349    Rappture::Tooltip::for $itk_component(zCutButton) \
    1788         "Toggle the Z-axis cutaway on/off"
     2350        "Toggle the Z-axis cutplane on/off"
    17892351
    17902352    itk_component add zCutScale {
     
    17922354            -width 10 -orient vertical -showvalue yes \
    17932355            -borderwidth 1 -highlightthickness 0 \
    1794             -command [itcl::code $this Slice move z] \
    1795             -variable [itcl::scope _axis(zposition)]
     2356            -command [itcl::code $this EventuallySetCutplane z] \
     2357            -variable [itcl::scope _settings(cutplane-zposition)]
    17962358    } {
    17972359        usual
    17982360        ignore -borderwidth -highlightthickness
    17992361    }
    1800     $itk_component(zCutScale) set 100
     2362    $itk_component(zCutScale) set 50
    18012363    $itk_component(zCutScale) configure -state disabled
    18022364    #$itk_component(zCutScale) configure -state disabled
     
    18042366        "@[itcl::code $this Slice tooltip z]"
    18052367
    1806     itk_component add zDirButton {
    1807         Rappture::PushButton $inner.zdir \
    1808             -onimage [Rappture::icon arrow-down] \
    1809             -onvalue -1 \
    1810             -offimage [Rappture::icon arrow-up] \
    1811             -offvalue 1 \
    1812             -command [itcl::code $this AdjustSetting axis-zdirection] \
    1813             -variable [itcl::scope _axis(zdirection)]
    1814     }
    1815     set _axis(zdirection) -1
    1816     Rappture::Tooltip::for $itk_component(zDirButton) \
    1817         "Toggle the direction of the Z-axis cutaway"
    1818 
    18192368    blt::table $inner \
    1820         0,0 $itk_component(xCutButton)  -anchor e -padx 2 -pady 2 \
    1821         1,0 $itk_component(xCutScale)   -fill y \
    1822         0,1 $itk_component(yCutButton)  -anchor e -padx 2 -pady 2 \
    1823         1,1 $itk_component(yCutScale)   -fill y \
    1824         0,2 $itk_component(zCutButton)  -anchor e -padx 2 -pady 2 \
    1825         1,2 $itk_component(zCutScale)   -fill y \
     2369        0,0 $inner.visible              -anchor w -pady 2 -cspan 4 \
     2370        1,0 $inner.lighting             -anchor w -pady 2 -cspan 4 \
     2371        2,0 $inner.wireframe            -anchor w -pady 2 -cspan 4 \
     2372        3,0 $inner.edges                -anchor w -pady 2 -cspan 4 \
     2373        4,0 $inner.opacity_l            -anchor w -pady 2 -cspan 3 \
     2374        5,0 $inner.opacity              -fill x   -pady 2 -cspan 3 \
     2375        6,0 $itk_component(xCutButton)  -anchor e -padx 2 -pady 2 \
     2376        7,0 $itk_component(xCutScale)   -fill y \
     2377        6,1 $itk_component(yCutButton)  -anchor e -padx 2 -pady 2 \
     2378        7,1 $itk_component(yCutScale)   -fill y \
     2379        6,2 $itk_component(zCutButton)  -anchor e -padx 2 -pady 2 \
     2380        7,2 $itk_component(zCutScale)   -fill y \
    18262381
    18272382    blt::table configure $inner r* c* -resize none
    1828     blt::table configure $inner r1 c3 -resize expand
     2383    blt::table configure $inner r7 c3 -resize expand
    18292384}
    18302385
     
    18992454        }
    19002455    }
    1901     return [list .txt $bytes]
     2456    return [list .vtk $bytes]
    19022457}
    19032458
     
    19572512    set tag $dataobj-$comp
    19582513    set style [$dataobj style $comp]
    1959     #puts stderr "style $dataobj-$comp \"$style\""
    1960     if { $dataobj != $_first } {
    1961         set settings(-wireframe) 1
    1962     }
    19632514    array set settings {
    19642515        -color \#808080
     
    19732524        -visible 1
    19742525    }
     2526    if { $dataobj != $_first } {
     2527        set settings(-opacity) 1
     2528    }
    19752529    array set settings $style
    19762530    SendCmd "streamlines add $tag"
    1977     SendCmd "streamlines seed visible off"
     2531    SendCmd "streamlines seed visible off $tag"
    19782532    set seeds [$dataobj hints seeds]
    19792533    if { $seeds != "" && ![info exists _seeds($dataobj)] } {
    19802534        set length [string length $seeds]
    1981         set stag $dataobj-seeds
    1982         SendCmd "dataset add $stag data follows $length"
     2535        SendCmd "streamlines seed fmesh 200 data follows $length $tag"
    19832536        SendCmd "$seeds"
    1984         SendCmd "dataset visible 0 $stag"
    1985         SendCmd "streamlines seed random 1000 $stag"
    19862537        set _seeds($dataobj) 1
    19872538    }
     2539    SendCmd "cutplane add $tag"
     2540    SendCmd "cutplane edges 0 $tag"
     2541    SendCmd "cutplane wireframe 0 $tag"
     2542    SendCmd "cutplane lighting 1 $tag"
     2543    SendCmd "cutplane linewidth 1 $tag"
     2544    #SendCmd "cutplane linecolor 1 1 1 $tag"
     2545    #SendCmd "cutplane visible $tag"
     2546    foreach axis { x y z } {
     2547        SendCmd "cutplane slice $axis 1.0 $tag"
     2548        SendCmd "cutplane axis $axis 0 $tag"
     2549    }
     2550
    19882551    SendCmd "polydata add $tag"
    19892552    SendCmd "polydata edges $settings(-edges) $tag"
    1990     set _volume(edges) $settings(-edges)
     2553    set _settings(volume-edges) $settings(-edges)
    19912554    SendCmd "polydata color [Color2RGB $settings(-color)] $tag"
    19922555    SendCmd "polydata lighting $settings(-lighting) $tag"
    1993     set _volume(lighting) $settings(-lighting)
     2556    set _settings(volume-lighting) $settings(-lighting)
    19942557    SendCmd "polydata linecolor [Color2RGB $settings(-edgecolor)] $tag"
    19952558    SendCmd "polydata linewidth $settings(-linewidth) $tag"
    19962559    SendCmd "polydata opacity $settings(-opacity) $tag"
    1997     set _volume(opacity) $settings(-opacity)
     2560    set _settings(volume-opacity) $settings(-opacity)
    19982561    SendCmd "polydata wireframe $settings(-wireframe) $tag"
    1999     set _volume(wireframe) $settings(-wireframe)
    2000     set _volume(opacity) [expr $settings(-opacity) * 100.0]
     2562    set _settings(volume-wireframe) $settings(-wireframe)
     2563    set _settings(volume-opacity) [expr $settings(-opacity) * 100.0]
    20012564    SetColormap $dataobj $comp
    20022565}
     
    20172580# ----------------------------------------------------------------------
    20182581itcl::body Rappture::VtkStreamlinesViewer::ReceiveLegend { colormap title vmin vmax size } {
    2019     #puts stderr "ReceiveLegend colormap=$colormap title=$title range=$vmin,$vmax size=$size"
     2582    set _legendPending 0
     2583    puts stderr "ReceiveLegend colormap=$colormap title=$title range=$vmin,$vmax size=$size"
    20202584    set _limits(vmin) $vmin
    20212585    set _limits(vmax) $vmax
    20222586    set _title $title
     2587    regsub {\(mag\)} $title "" _title
    20232588    if { [IsConnected] } {
    20242589        set bytes [ReceiveBytes $size]
     
    20282593        $_image(legend) configure -data $bytes
    20292594        #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    2030         DrawLegend
     2595        if { [catch {DrawLegend $_title} errs] != 0 } {
     2596            puts stderr errs=$errs
     2597        }
    20312598    }
    20322599}
     
    20382605#       of the contour plot area.
    20392606#
    2040 itcl::body Rappture::VtkStreamlinesViewer::DrawLegend {} {
     2607itcl::body Rappture::VtkStreamlinesViewer::DrawLegend { name } {
    20412608    set c $itk_component(view)
    20422609    set w [winfo width $c]
     
    20452612    set lineht [font metrics $font -linespace]
    20462613   
    2047     if { $_settings(legend) } {
     2614    if { [info exists _fields($name)] } {
     2615        foreach { title units } $_fields($name) break
     2616        if { $units != "" } {
     2617            set title [format "%s (%s)" $title $units]
     2618        }
     2619    } else {
     2620        set title $name
     2621    }
     2622    if { $_settings(legend-visible) } {
    20482623        set x [expr $w - 2]
    20492624        if { [$c find withtag "legend"] == "" } {
    2050             $c create image $x [expr {$lineht+2}] \
     2625            set y 2
     2626            $c create text $x $y \
    20512627                -anchor ne \
    2052                 -image $_image(legend) -tags "colormap legend"
    2053             $c create text $x 2 \
     2628                -fill $itk_option(-plotforeground) -tags "title legend" \
     2629                -font $font
     2630            incr y $lineht
     2631            $c create text $x $y \
    20542632                -anchor ne \
    20552633                -fill $itk_option(-plotforeground) -tags "vmax legend" \
    20562634                -font $font
     2635            incr y $lineht
     2636            $c create image $x $y \
     2637                -anchor ne \
     2638                -image $_image(legend) -tags "colormap legend"
    20572639            $c create text $x [expr {$h-2}] \
    20582640                -anchor se \
     
    20632645            $c bind colormap <Motion> [itcl::code $this MotionLegend %x %y]
    20642646        }
     2647        $c bind title <ButtonPress> [itcl::code $this Combo post]
     2648        $c bind title <Enter> [itcl::code $this Combo activate]
     2649        $c bind title <Leave> [itcl::code $this Combo deactivate]
    20652650        # Reset the item coordinates according the current size of the plot.
    2066         $c coords colormap $x [expr {$lineht+2}]
     2651        $c itemconfigure title -text $title
    20672652        if { $_limits(vmin) != "" } {
    20682653            $c itemconfigure vmin -text [format %g $_limits(vmin)]
     
    20712656            $c itemconfigure vmax -text [format %g $_limits(vmax)]
    20722657        }
    2073         $c coords vmin $x [expr {$h-2}]
    2074         $c coords vmax $x 2
     2658        set y 2
     2659        $c coords title $x $y
     2660        incr y $lineht
     2661        $c coords vmax $x $y
     2662        incr y $lineht
     2663        $c coords colormap $x $y
     2664        $c coords vmin $x [expr {$h - 2}]
    20752665    }
    20762666}
     
    21132703    set coords [$c coords colormap]
    21142704    set imgX [expr $w - [image width $_image(legend)] - 2]
    2115     set imgY [expr $y - $lineht - 2]
    2116 
     2705    set imgY [expr $y - 2 * ($lineht + 2)]
     2706
     2707    if { [info exists _fields($_title)] } {
     2708        foreach { title units } $_fields($_title) break
     2709        if { $units != "" } {
     2710            set title [format "%s (%s)" $title $units]
     2711        }
     2712    } else {
     2713        set title $_title
     2714    }
    21172715    # Make a swatch of the selected color
    21182716    if { [catch { $_image(legend) get 10 $imgY } pixel] != 0 } {
     
    21292727
    21302728    # Compute the value of the point
    2131     set t [expr 1.0 - (double($imgY) / double($imgHeight-1))]
    2132     #puts stderr "t=$t x=$x y=$y imgY=$imgY"
    2133     set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)]
     2729    if { [info exists _limits(vmax)] && [info exists _limits(vmin)] } {
     2730        set t [expr 1.0 - (double($imgY) / double($imgHeight-1))]
     2731        set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)]
     2732    } else {
     2733        set value 0.0
     2734    }
    21342735    set tipx [expr $x + 15]
    21352736    set tipy [expr $y - 5]
    2136     #puts stderr "tipx=$tipx tipy=$tipy x=$x y=$y"
    2137     Rappture::Tooltip::text $c "$_title $value"
     2737    Rappture::Tooltip::text $c "$title $value"
    21382738    Rappture::Tooltip::tooltip show $c +$tipx,+$tipy   
    21392739}
     
    21522752        "move" {
    21532753            set axis [lindex $args 0]
    2154             set oldval $_axis(${axis}position)
     2754            set oldval $_settings(axis-${axis}position)
    21552755            set newval [lindex $args 1]
    21562756            if {[llength $args] != 2} {
     
    21582758            }
    21592759            set newpos [expr {0.01*$newval}]
    2160             SendCmd "renderer clipplane $axis $newpos -1"
     2760            SendCmd "cutplane slice $axis $newpos"
    21612761        }
    21622762        "tooltip" {
     
    21702770    }
    21712771}
     2772
     2773
     2774# ----------------------------------------------------------------------
     2775# USAGE: _dropdown post
     2776# USAGE: _dropdown unpost
     2777# USAGE: _dropdown select
     2778#
     2779# Used internally to handle the dropdown list for this combobox.  The
     2780# post/unpost options are invoked when the list is posted or unposted
     2781# to manage the relief of the controlling button.  The select option
     2782# is invoked whenever there is a selection from the list, to assign
     2783# the value back to the gauge.
     2784# ----------------------------------------------------------------------
     2785itcl::body Rappture::VtkStreamlinesViewer::Combo {option} {
     2786    set c $itk_component(view)
     2787    switch -- $option {
     2788        post {
     2789            foreach { x1 y1 x2 y2 } [$c bbox title] break
     2790            set x1 [expr [winfo width $itk_component(view)] - [winfo reqwidth $itk_component(fieldmenu)]]
     2791            set x [expr $x1 + [winfo rootx $itk_component(view)]]
     2792            set y [expr $y2 + [winfo rooty $itk_component(view)]]
     2793            puts stderr "combo x=$x y=$y"
     2794            tk_popup $itk_component(fieldmenu) $x $y
     2795        }
     2796        activate {
     2797            $c itemconfigure title -fill red
     2798        }
     2799        deactivate {
     2800            $c itemconfigure title -fill white
     2801        }
     2802        invoke {
     2803            $itk_component(field) value $_currentField
     2804            AdjustSetting streamlines-field
     2805        }
     2806        default {
     2807            error "bad option \"$option\": should be post, unpost, select"
     2808        }
     2809    }
     2810}
  • branches/blt4/gui/scripts/vtkviewer.tcl

    r2591 r2742  
    153153# ----------------------------------------------------------------------
    154154itcl::body Rappture::VtkViewer::constructor {hostlist args} {
     155    set _serverType "vtkvis"
    155156    package require vtk
     157
    156158    # Rebuild event
    157159    $_dispatcher register !rebuild
     
    13851387            set tmpfile file[pid].vtk
    13861388            set f [open "$tmpfile" "w"]
     1389            fconfigure $f -translation binary -encoding binary
    13871390            puts $f $data
    13881391            close $f
    13891392            set reader [vtkDataSetReader $tag-xvtkDataSetReader]
    13901393            $reader SetFileName $tmpfile
    1391             $reader ReadFromInputStringOn
    13921394            $reader ReadAllNormalsOn
    13931395            $reader ReadAllScalarsOn
     
    14161418            rename $output ""
    14171419            rename $reader ""
    1418             rename $arr ""
    14191420            file delete $tmpfile
    14201421        }
     
    18851886        SendCmd "glyphs wireframe $settings(-wireframe) $tag"
    18861887        #SendCmd "glyphs ccolor [Color2RGB $settings(-color)] $tag"
    1887         #SendCmd "glyphs colormode ccolor $tag"
    1888         SendCmd "glyphs smode vcomp $tag"
     1888        #SendCmd "glyphs colormode ccolor {} $tag"
     1889        SendCmd "glyphs smode vcomp {} $tag"
    18891890        SendCmd "glyphs opacity $settings(-opacity) $tag"
    18901891        SendCmd "glyphs visible $settings(-visible) $tag"
  • branches/blt4/gui/scripts/xylegend.tcl

    r1923 r2742  
    6868    private variable _unmapHidden 0
    6969
    70     constructor {args} { graph }
     70    constructor {graph args} {}
    7171    destructor {}
    7272
  • branches/blt4/gui/scripts/xyprint.tcl

    r2692 r2742  
    3838    private variable _preview "";       # Preview image.
    3939    private variable _savedSettings;    # Array of settings.
    40     private variable _legendFontFamily ""
    41     private variable _legendFontSize ""
    42     private variable _tickFontFamily ""
    43     private variable _titleFontFamily ""
    44     private variable _tickFontSize ""
    45     private variable _titleFontSize ""
    46     private variable _format ""
    47     private variable _axis ""
    48     private variable _style ""
    49     private variable _position ""
    5040
    5141    private common _oldSettingsFile "~/.rpsettings"
     
    9282    # Same dialog may be used for different graphs
    9383    private common _settings
    94     private common _fonts
    9584    private common _wait
    9685}
     
    119108        label $itk_interior.preview \
    120109            -highlightthickness 0 -bd 0 -image $_preview -width 2.5i \
    121                 -height 2.25i -background grey -padx 10 -pady 10
     110                -height 2.5i -background grey
    122111    } {
    123112        ignore -background
     
    165154    set _clone ""
    166155    set _graph ""
    167     foreach font [array names _fonts] {
    168         font delete $font
    169     }
    170     array unset _fonts
    171156}
    172157
     
    420405            -majorticks {} -minorticks {}
    421406        $_clone axis configure $axis \
    422             -tickfont $_fonts($axis-ticks) \
    423             -titlefont $_fonts($axis-title)
     407            -tickfont $tickfont \
     408            -titlefont $titlefont
    424409    }
    425410    set count 0
     
    491476    set w [Inches2Pixels $_settings($this-layout-width) 3.4]
    492477    set h [Inches2Pixels $_settings($this-layout-height) 3.4]
     478    $_clone snap $img -width $w -height $h
     479
    493480    set pixelsPerInch [winfo pixels . 1i]
    494481    set cw [winfo width $itk_component(preview)]
     
    507494    set sy [expr double($maxheight)/$h]
    508495    set s [expr min($sx,$sy)]
    509     $_clone snap $img -width $w -height $h
    510496
    511497    set pw [expr int(round($s * $w))]
     
    544530
    545531itcl::body Rappture::XyPrint::GetAxisType { axis } {
    546     return [$_clone axis type $axis]
     532    foreach type { x y x2 y2 } {
     533        set axes [$_clone ${type}axis use]
     534        if { [lsearch $axes $axis] >= 0 } {
     535            return [string range $type 0 0]
     536        }
     537    }
     538    return ""
    547539}
    548540
    549541itcl::body Rappture::XyPrint::GetAxis {} {
    550     set axis $_settings($this-axis-selected)
    551     foreach option { -grid -min -max -loose -title -stepsize -subdivisions } {
     542    set axis [$itk_component(axis_combo) current]
     543    foreach option { -min -max -loose -title -stepsize -subdivisions } {
    552544        set _settings($this-axis$option) [$_clone axis cget $axis $option]
    553545    }
     546    foreach attr { fontfamily fontsize fontweight fontslant } {
     547        set specific $this-$axis-ticks
     548        set general $this-axis-ticks
     549        set _settings(${general}-${attr}) $_settings(${specific}-${attr})
     550        set specific $this-$axis-title
     551        set general $this-axis-title
     552        set _settings(${general}-${attr}) $_settings(${specific}-${attr})
     553    }
    554554    set type [GetAxisType $axis]
    555     if { $type != "" } {
    556         set _settings($this-axis-plotpad${type}) \
    557             [Pixels2Inches [$_clone cget -plotpad${type}]]
    558         set _settings($this-axis-zero) [$_clone marker cget ${type}-zero -hide]
    559     }
     555    if { [$_clone grid cget -map${type}] == $axis } {
     556        set _settings($this-axis-grid) 1
     557    }  else {
     558        set _settings($this-axis-grid) 0
     559    }
     560    set _settings($this-axis-plotpad${type}) \
     561        [Pixels2Inches [$_clone cget -plotpad${type}]]
     562    set _settings($this-axis-zero) [$_clone marker cget ${type}-zero -hide]
    560563}
    561564
     
    745748    set _settings($this-legend-anchor)    [$page.anchor current]
    746749    if { $_clone != "" } {
    747         font configure $_fonts(legend) \
    748             -family $_settings($this-legend-font-family) \
    749             -size $_settings($this-legend-font-size) \
    750             -weight $_settings($this-legend-font-weight) \
    751             -slant $_settings($this-legend-font-slant)
     750        lappend font $_settings($this-legend-fontfamily)
     751        lappend font $_settings($this-legend-fontsize)
     752        lappend font $_settings($this-legend-fontweight)
     753        lappend font $_settings($this-legend-fontslant)
    752754        foreach option { -hide -position -anchor -borderwidth } {
    753755            SetComponentOption legend $option
    754756        }
    755         $_clone legend configure -font fixed -font $_fonts(legend)
     757        $_clone legend configure -font fixed -font $font
    756758    }
    757759    ApplyElementSettings
     
    952954        -onvalue "bold" -offvalue "normal" \
    953955        -command [itcl::code $this ApplyLegendSettings] \
    954         -variable [itcl::scope _settings($this-legend-font-weight)]
     956        -variable [itcl::scope _settings($this-legend-fontweight)]
    955957    Rappture::Tooltip::for $page.fontweight \
    956958        "Use the bold version of the font."
     
    962964        -onvalue "italic" -offvalue "roman" \
    963965        -command [itcl::code $this ApplyLegendSettings] \
    964         -variable [itcl::scope _settings($this-legend-font-slant)]
     966        -variable [itcl::scope _settings($this-legend-fontslant)]
    965967    Rappture::Tooltip::for $page.fontslant \
    966968        "Use the italic version of the font."
     
    982984        5,1 $page.label -fill x -cspan 5 \
    983985        6,0 $page.color_l -anchor e \
    984         6,1 $page.color -fill x  \
    985         6,2 $page.symbol_l -anchor e \
    986         6,3 $page.symbol -fill both -cspan 3 \
    987         7,0 $page.dashes_l -anchor e \
    988         7,1 $page.dashes -fill x
     986        6,1 $page.color -fill x \
     987        6,2 $page.symbol_l -anchor e \
     988        6,3 $page.symbol -fill both -cspan 3 \
     989        7,0 $page.dashes_l -anchor e \
     990        7,1 $page.dashes -fill x \
    989991
    990992    blt::table configure $page r* -resize none -pady { 0 2 }
     993    blt::table configure $page c3 c4 -resize none
    991994    blt::table configure $page r8 -resize both
    992995
     
    10261029        "Set the title of the current axis."
    10271030
    1028     label $page.min_l -text "min" 
     1031    label $page.min_l -text "min"
    10291032    entry $page.min -width 10 \
    10301033        -textvariable [itcl::scope _settings($this-axis-min)]
     
    10331036        "Set the minimum limit for the current axis. If empty, the minimum is automatically determined."
    10341037
    1035     label $page.max_l -text "max" 
     1038    label $page.max_l -text "max"
    10361039    entry $page.max -width 10 \
    10371040        -textvariable [itcl::scope _settings($this-axis-max)]
     
    10401043        "Set the maximum limit for the current axis. If empty, the maximum is automatically determined."
    10411044
    1042     label $page.subdivisions_l -text "subdivisions" 
     1045    label $page.subdivisions_l -text "subdivisions"
    10431046    entry $page.subdivisions \
    10441047        -textvariable [itcl::scope _settings($this-axis-subdivisions)]
     
    10481051        "Set the number of subdivisions (minor ticks) for the current axis."
    10491052
    1050     label $page.stepsize_l -text "step size" 
     1053    label $page.stepsize_l -text "step size"
    10511054    entry $page.stepsize \
    10521055        -textvariable [itcl::scope _settings($this-axis-stepsize)]
     
    11441147        -onvalue "bold" -offvalue "normal" \
    11451148        -command [itcl::code $this ApplyAxisSettings] \
    1146         -variable [itcl::scope _settings($this-axis-tickfont-weight)]
     1149        -variable [itcl::scope _settings($this-axis-ticks-fontweight)]
    11471150    Rappture::Tooltip::for $page.tickfontweight \
    11481151        "Use the bold version of the tick font."
     
    11541157        -onvalue "italic" -offvalue "roman" \
    11551158        -command [itcl::code $this ApplyAxisSettings] \
    1156         -variable [itcl::scope _settings($this-axis-tickfont-slant)]
     1159        -variable [itcl::scope _settings($this-axis-ticks-fontslant)]
    11571160    Rappture::Tooltip::for $page.tickfontslant \
    11581161        "Use the italic version of the tick font."
     
    12201223        -onvalue "bold" -offvalue "normal" \
    12211224        -command [itcl::code $this ApplyAxisSettings] \
    1222         -variable [itcl::scope _settings($this-axis-titlefont-weight)]
     1225        -variable [itcl::scope _settings($this-axis-title-fontweight)]
    12231226    Rappture::Tooltip::for $page.titlefontweight \
    12241227        "Use the bold version of the title font."
     
    12301233        -onvalue "italic" -offvalue "roman" \
    12311234        -command [itcl::code $this ApplyAxisSettings] \
    1232         -variable [itcl::scope _settings($this-axis-titlefont-slant)]
     1235        -variable [itcl::scope _settings($this-axis-title-fontslant)]
    12331236    Rappture::Tooltip::for $page.titlefontslant \
    12341237        "Use the italic version of the title font."
     
    12631266        8,4 $page.plotpad -fill both -cspan 3
    12641267
    1265     blt::table configure $page  c0 c7 c8 -resize none
     1268    blt::table configure $page  c0 c4 c5 c6 c7 c8 -resize none
    12661269}
    12671270
     
    12721275
    12731276itcl::body Rappture::XyPrint::ApplyAxisSettings {} {
    1274     if { $_clone == "" } {
    1275         return
    1276     }
    1277     set axis $_settings($this-axis-selected)
     1277    set axis [$itk_component(axis_combo) current]
    12781278    set type [GetAxisType $axis]
    12791279    set page $itk_component(axis_page)
     
    12821282        SetNamedComponentOption axis $axis $option
    12831283    }
     1284    set _settings($this-axis-ticks-fontfamily)  [$page.tickfontfamily value]
     1285    set _settings($this-axis-ticks-fontsize)    [$page.tickfontsize value]
     1286    set _settings($this-axis-title-fontfamily)  [$page.titlefontfamily value]
     1287    set _settings($this-axis-title-fontsize)    [$page.titlefontsize value]
     1288
     1289    set tickfont {}
     1290    set titlefont {}
     1291
     1292    foreach attr { fontfamily fontsize fontweight fontslant } {
     1293        set specific $this-$axis-ticks
     1294        set general  $this-axis-ticks
     1295        set _settings(${specific}-${attr}) $_settings(${general}-${attr})
     1296        lappend tickfont $_settings(${general}-${attr})
     1297        set specific $this-$axis-title
     1298        set general  $this-axis-title
     1299        set _settings(${specific}-${attr}) $_settings(${general}-${attr})
     1300        lappend titlefont $_settings(${general}-${attr})
     1301    }
     1302    $_clone axis configure $axis -tickfont $tickfont -titlefont $titlefont
    12841303    $_clone marker configure ${type}-zero -hide $_settings($this-axis-zero)
    1285     font configure $axis-title \
    1286         -family $_settings($this-axis-titlefont-family) \
    1287         -size   $_settings($this-axis-titlefont-size) \
    1288         -weight $_settings($this-axis-titlefont-weight) \
    1289         -slant  $_settings($this-axis-titlefont-slant)
    1290     font configure $axis-ticks \
    1291         -family $_settings($this-axis-tickfont-family) \
    1292         -size   $_settings($this-axis-tickfont-size) \
    1293         -weight $_settings($this-axis-tickfont-weight) \
    1294         -slant  $_settings($this-axis-tickfont-slant)
    1295     $_clone axis configure $axis -tickfont fixed -titlefont fixed
    1296     $_clone axis configure $axis -tickfont $axis-ticks -titlefont $axis-title
    12971304    GetAxis
    12981305    RegeneratePreview
     
    13461353    # Always set to "ps" "ieee"
    13471354    set _settings($this-general-format) ps
    1348     set _settings($this-general-style)  ieee
     1355    set _settings($this-general-style) ieee
    13491356    set _settings($this-general-remember) 0
    13501357    set page $itk_component(graph_page)
     1358    $page.format value [$page.format label $_settings($this-general-format)]
     1359    $page.style value [$page.style label $_settings($this-general-style)]
    13511360
    13521361    # Layout settings
     
    13751384    set _settings($this-legend-borderwidth) 0
    13761385
    1377     array unset info
    1378     array set info [font configure legend]
    1379     set _settings($this-legend-font-family) $info(-family)
    1380     set _settings($this-legend-font-size)   $info(-size)
    1381     set _settings($this-legend-font-weight) $info(-weight)
    1382     set _settings($this-legend-font-slant)  $info(-slant)
    1383     if { $info(-weight) == "bold" } {
     1386    $page.fontfamily value $_settings($this-legend-fontfamily)
     1387    $page.fontsize value $_settings($this-legend-fontsize)
     1388    if { $_settings($this-legend-fontweight) == "bold" } {
    13841389        set _settings($this-legend-font-bold) 1
    13851390    }
     
    13871392    set _settings($this-legend-position) [$_clone legend cget -position]
    13881393    set _settings($this-legend-anchor) [$_clone legend cget -anchor]
     1394    $page.position value \
     1395        [$page.position label $_settings($this-legend-position)]
    13891396    $page.anchor value [$page.anchor label $_settings($this-legend-anchor)]
    13901397    GetElement
     
    14081415
    14091416    array set info [font configure $axis-title]
    1410     set _settings($this-axis-titlefont-family) $info(-family)
    1411     set _settings($this-axis-titlefont-size)   $info(-size)
    1412     set _settings($this-axis-titlefont-weight) $info(-weight)
    1413     set _settings($this-axis-titlefont-slant)  $info(-slant)
     1417    set _settings($this-axis-title-fontfamily) $info(-family)
     1418    set _settings($this-axis-title-fontsize)   $info(-size)
     1419    set _settings($this-axis-title-fontweight) $info(-weight)
     1420    set _settings($this-axis-title-fontslant)  $info(-slant)
    14141421
    14151422    array set info [font configure $axis-ticks]
    1416     set _settings($this-axis-tickfont-family) $info(-family)
    1417     set _settings($this-axis-tickfont-size)   $info(-size)
    1418     set _settings($this-axis-tickfont-weight) $info(-weight)
    1419     set _settings($this-axis-tickfont-slant)  $info(-slant)
     1423    set _settings($this-axis-tick-fontfamily) $info(-family)
     1424    set _settings($this-axis-tick-fontsize)   $info(-size)
     1425    set _settings($this-axis-tick-fontweight) $info(-weight)
     1426    set _settings($this-axis-tick-fontslant)  $info(-slant)
    14201427
    14211428    # Always hide the zero line.
     
    14461453    set parser [interp create -safe]
    14471454    $parser alias xyprint [itcl::code $this restore]
    1448     $parser alias font font
    14491455    set f [open $_settingsFile "r"]
    14501456    set code [read $f]
     
    14591465        $parser eval $_savedSettings($key)
    14601466    }
    1461     foreach {name value} [$parser eval "array get general"] {
    1462         set _settings($this-graph-$name) $value
     1467    # Restore settings to this instance
     1468    foreach {name value} [$parser eval "array get settings"] {
     1469        set _settings($this-$name) $value
    14631470    }
    14641471    interp delete $parser
     
    15001507    # Create stanza associated with tool and plot title.
    15011508    # General settings
    1502     append out "    set general(format) $_settings($this-general-format)\n"
    1503     append out "    set general(style) $_settings($this-general-style)\n"
    1504 
    1505     foreach font [array names _fonts] {
    1506         append out "    font configure $font"
    1507         array unset info
    1508         array set info [font configure $font]
    1509         foreach opt { -family -size -weight -slant } {
    1510             set value [list $info($opt)]
    1511             append out " $opt $value"
    1512         }
    1513         append out "\n"
    1514     }
     1509    set length [string length "${this}-"]
     1510    append out "    array set settings {\n"
     1511    foreach item [array names _settings ${this}-*] {
     1512        set field [string range $item $length end]
     1513        if { [regexp {^element-[0-9]+$} $field] } {
     1514            continue
     1515        }
     1516        set value $_settings($item)
     1517        append out "        [list $field] [list $value]\n"
     1518    }
     1519    append out "    }\n"
     1520    # Legend font
     1521    lappend legendfont $_settings($this-legend-fontfamily)
     1522    lappend legendfont $_settings($this-legend-fontsize)
     1523    lappend legendfont $_settings($this-legend-fontweight)
     1524    lappend legendfont $_settings($this-legend-fontslant)
     1525    # Axis tick font
     1526    lappend axistickfont $_settings($this-axis-ticks-fontfamily)
     1527    lappend axistickfont $_settings($this-axis-ticks-fontsize)
     1528    lappend axistickfont $_settings($this-axis-ticks-fontweight)
     1529    lappend axistickfont $_settings($this-axis-ticks-fontslant)
     1530    # Axis title font
     1531    lappend axistitlefont $_settings($this-axis-title-fontfamily)
     1532    lappend axistitlefont $_settings($this-axis-title-fontsize)
     1533    lappend axistitlefont $_settings($this-axis-title-fontweight)
     1534    lappend axistitlefont $_settings($this-axis-title-fontslant)
    15151535    append out "\n"
    15161536
     
    15301550        append out " $opt $value"
    15311551    }
    1532     append out " -font legend\n"
     1552    append out " -font \"$legendfont\"\n"
    15331553
    15341554    # Element settings
     
    15591579        append out "    if \{ \[preview axis names \"$axis\"\] == \"$axis\" \} \{\n"
    15601580        append out "        preview axis configure \"$axis\""
    1561         foreach opt { -hide -min -max -loose -title -stepsize -subdivisions } {
     1581        foreach opt { -grid -hide -min -max -loose -title -stepsize -subdivisions } {
    15621582            set value [list [$_clone axis cget $axis $opt]]
    15631583            append out " $opt $value"
    15641584        }
    1565         append out " -tickfont \"$axis-ticks\""
    1566         append out " -titlefont \"$axis-title\"\n"
     1585        append out " -tickfont \"$axistickfont\""
     1586        append out " -titlefont \"$axistitlefont\"\n"
    15671587        set hide [$_clone marker cget ${axis}-zero -hide]
    15681588        append out "        preview marker configure \"${axis}-zero\" -hide $hide\n"
  • branches/blt4/gui/scripts/xyresult.tcl

    r2692 r2742  
    173173
    174174    # Add bindings so you can mouse over points to see values:
    175     bind $itk_component(plot) <Motion> \
     175    #
     176    $itk_component(plot) element bind all <Enter> \
    176177        [itcl::code $this Hilite at %x %y]
    177     bind $itk_component(plot) <Leave> \
     178    $itk_component(plot) element bind all <Motion> \
     179        [itcl::code $this Hilite at %x %y]
     180    $itk_component(plot) element bind all <Leave> \
    178181        [itcl::code $this Hilite off %x %y]
    179182
  • branches/blt4/gui/src/Makefile.in

    r2706 r2742  
    5252                RapptureGUI_Init.o \
    5353                RpCanvPlacard.o \
    54                 RpDiffview.o
     54                RpDiffview.o \
     55                RpConvertDxToVtk.o
    5556
    5657name            = RapptureGUI$(version)
  • branches/blt4/gui/src/RapptureGUI_Init.c

    r2170 r2742  
    4545        return TCL_ERROR;
    4646    }
     47    if (RpConvertDxToVtk_Init(interp) != TCL_OK) {
     48        return TCL_ERROR;
     49    }
    4750    return TCL_OK;
    4851}
  • branches/blt4/lang/Makefile.in

    r2307 r2742  
    2020PYTHON          = @PYTHON_DISTUTILS@
    2121MEX             = @MEX@
    22 OCTAVE          = @OCTAVE_VERSION@
    23 JAVAC           = @JAVAC@
     22OCTAVE          = @OCTAVE_VERSION@
     23JAVAC           = @JAVAC@
     24R               = @R@
    2425
    2526# Rappture requires it. We always build a Tcl language API.
     
    4445  LANGS += java
    4546endif
     47ifneq ($(R),)
     48  LANGS += R
     49endif
    4650
    47 .PHONY: tcl octave matlab perl python ruby java
     51.PHONY: tcl octave matlab perl python ruby java R
    4852
    4953all:
  • branches/blt4/lang/tcl/scripts/Makefile.in

    r2274 r2742  
    5656                note \
    5757                number \
     58                periodicelement \
    5859                phase \
    5960                string
     
    8081
    8182tclIndex: install-objects install-types install-validations $(FILES)
    82         $(TCLSH) $(srcdir)/../tclconfig/mkindex.tcl --srcdir $(srcdir) \
     83        $(TCLSH) $(srcdir)/../cf/mkindex.tcl --srcdir $(srcdir) \
    8384                --outfile tclIndex
    84         $(TCLSH) $(srcdir)/../tclconfig/mkobjects.tcl --srcdir $(srcdir) \
     85        $(TCLSH) $(srcdir)/../cf/mkobjects.tcl --srcdir $(srcdir) \
    8586                $(OBJECTS)
    8687
  • branches/blt4/lang/tcl/src/Makefile.in

    r2705 r2742  
    5151LIBS = \
    5252        -L../../../src/core -lrappture \
    53         $(TCL_LIB_SPEC) -lexpat -lz -lm -lstdc++
     53        $(TCL_LIB_SPEC) -lncurses -lexpat -lz -lm -lstdc++
    5454
    5555OBJS = \
    5656        Rappture_Init.o \
     57        RpCurses.o \
    5758        RpDaemon.o \
    5859        RpEncodeTclInterface.o \
  • branches/blt4/packages/vizservers/configure

    r2681 r2742  
    85298529  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    85308530ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
    8531 #define SIZEOF_LONG ${ac_cv_sizeof_long}
    8532 #if SIZEOF_LONG == 8
    8533 #  define INT64_C(c)  c ## L
    8534 #  define UINT64_C(c) c ## UL
    8535 #else
    8536 #  define INT64_C(c)  c ## LL
    8537 #  define UINT64_C(c) c ## ULL
    8538 #endif
     8531#define __STDC_CONSTANT_MACROS 1
    85398532
    85408533"
     
    85498542
    85508543CPPFLAGS=$save_CPPFLAGS
     8544
     8545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavcodec" >&5
     8546$as_echo_n "checking for main in -lavcodec... " >&6; }
     8547if ${ac_cv_lib_avcodec_main+:} false; then :
     8548  $as_echo_n "(cached) " >&6
     8549else
     8550  ac_check_lib_save_LIBS=$LIBS
     8551LIBS="-lavcodec  $LIBS"
     8552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8553/* end confdefs.h.  */
     8554
     8555
     8556int
     8557main ()
     8558{
     8559return main ();
     8560  ;
     8561  return 0;
     8562}
     8563_ACEOF
     8564if ac_fn_cxx_try_link "$LINENO"; then :
     8565  ac_cv_lib_avcodec_main=yes
     8566else
     8567  ac_cv_lib_avcodec_main=no
     8568fi
     8569rm -f core conftest.err conftest.$ac_objext \
     8570    conftest$ac_exeext conftest.$ac_ext
     8571LIBS=$ac_check_lib_save_LIBS
     8572fi
     8573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_main" >&5
     8574$as_echo "$ac_cv_lib_avcodec_main" >&6; }
     8575if test "x$ac_cv_lib_avcodec_main" = xyes; then :
     8576  cat >>confdefs.h <<_ACEOF
     8577#define HAVE_LIBAVCODEC 1
     8578_ACEOF
     8579
     8580  LIBS="-lavcodec $LIBS"
     8581
     8582else
     8583  as_fn_error $? "requires libavcodec" "$LINENO" 5
     8584fi
     8585
     8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5
     8587$as_echo_n "checking for main in -lavutil... " >&6; }
     8588if ${ac_cv_lib_avutil_main+:} false; then :
     8589  $as_echo_n "(cached) " >&6
     8590else
     8591  ac_check_lib_save_LIBS=$LIBS
     8592LIBS="-lavutil  $LIBS"
     8593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8594/* end confdefs.h.  */
     8595
     8596
     8597int
     8598main ()
     8599{
     8600return main ();
     8601  ;
     8602  return 0;
     8603}
     8604_ACEOF
     8605if ac_fn_cxx_try_link "$LINENO"; then :
     8606  ac_cv_lib_avutil_main=yes
     8607else
     8608  ac_cv_lib_avutil_main=no
     8609fi
     8610rm -f core conftest.err conftest.$ac_objext \
     8611    conftest$ac_exeext conftest.$ac_ext
     8612LIBS=$ac_check_lib_save_LIBS
     8613fi
     8614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5
     8615$as_echo "$ac_cv_lib_avutil_main" >&6; }
     8616if test "x$ac_cv_lib_avutil_main" = xyes; then :
     8617  cat >>confdefs.h <<_ACEOF
     8618#define HAVE_LIBAVUTIL 1
     8619_ACEOF
     8620
     8621  LIBS="-lavutil $LIBS"
     8622
     8623else
     8624  as_fn_error $? "requires libavutil" "$LINENO" 5
     8625fi
     8626
     8627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavformat" >&5
     8628$as_echo_n "checking for main in -lavformat... " >&6; }
     8629if ${ac_cv_lib_avformat_main+:} false; then :
     8630  $as_echo_n "(cached) " >&6
     8631else
     8632  ac_check_lib_save_LIBS=$LIBS
     8633LIBS="-lavformat  $LIBS"
     8634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8635/* end confdefs.h.  */
     8636
     8637
     8638int
     8639main ()
     8640{
     8641return main ();
     8642  ;
     8643  return 0;
     8644}
     8645_ACEOF
     8646if ac_fn_cxx_try_link "$LINENO"; then :
     8647  ac_cv_lib_avformat_main=yes
     8648else
     8649  ac_cv_lib_avformat_main=no
     8650fi
     8651rm -f core conftest.err conftest.$ac_objext \
     8652    conftest$ac_exeext conftest.$ac_ext
     8653LIBS=$ac_check_lib_save_LIBS
     8654fi
     8655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_main" >&5
     8656$as_echo "$ac_cv_lib_avformat_main" >&6; }
     8657if test "x$ac_cv_lib_avformat_main" = xyes; then :
     8658  cat >>confdefs.h <<_ACEOF
     8659#define HAVE_LIBAVFORMAT 1
     8660_ACEOF
     8661
     8662  LIBS="-lavformat $LIBS"
     8663
     8664else
     8665  as_fn_error $? "requires libavformat" "$LINENO" 5
     8666fi
     8667
     8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lswscale" >&5
     8669$as_echo_n "checking for main in -lswscale... " >&6; }
     8670if ${ac_cv_lib_swscale_main+:} false; then :
     8671  $as_echo_n "(cached) " >&6
     8672else
     8673  ac_check_lib_save_LIBS=$LIBS
     8674LIBS="-lswscale  $LIBS"
     8675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8676/* end confdefs.h.  */
     8677
     8678
     8679int
     8680main ()
     8681{
     8682return main ();
     8683  ;
     8684  return 0;
     8685}
     8686_ACEOF
     8687if ac_fn_cxx_try_link "$LINENO"; then :
     8688  ac_cv_lib_swscale_main=yes
     8689else
     8690  ac_cv_lib_swscale_main=no
     8691fi
     8692rm -f core conftest.err conftest.$ac_objext \
     8693    conftest$ac_exeext conftest.$ac_ext
     8694LIBS=$ac_check_lib_save_LIBS
     8695fi
     8696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_main" >&5
     8697$as_echo "$ac_cv_lib_swscale_main" >&6; }
     8698if test "x$ac_cv_lib_swscale_main" = xyes; then :
     8699  cat >>confdefs.h <<_ACEOF
     8700#define HAVE_LIBSWSCALE 1
     8701_ACEOF
     8702
     8703  LIBS="-lswscale $LIBS"
     8704
     8705fi
     8706
     8707for ac_func in avcodec_decode_video2
     8708do :
     8709  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video2" "ac_cv_func_avcodec_decode_video2"
     8710if test "x$ac_cv_func_avcodec_decode_video2" = xyes; then :
     8711  cat >>confdefs.h <<_ACEOF
     8712#define HAVE_AVCODEC_DECODE_VIDEO2 1
     8713_ACEOF
     8714
     8715fi
     8716done
     8717
     8718for ac_func in avcodec_decode_video
     8719do :
     8720  ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video" "ac_cv_func_avcodec_decode_video"
     8721if test "x$ac_cv_func_avcodec_decode_video" = xyes; then :
     8722  cat >>confdefs.h <<_ACEOF
     8723#define HAVE_AVCODEC_DECODE_VIDEO 1
     8724_ACEOF
     8725
     8726fi
     8727done
     8728
     8729for ac_func in avformat_open_input
     8730do :
     8731  ac_fn_cxx_check_func "$LINENO" "avformat_open_input" "ac_cv_func_avformat_open_input"
     8732if test "x$ac_cv_func_avformat_open_input" = xyes; then :
     8733  cat >>confdefs.h <<_ACEOF
     8734#define HAVE_AVFORMAT_OPEN_INPUT 1
     8735_ACEOF
     8736
     8737fi
     8738done
     8739
     8740for ac_func in av_open_input_file
     8741do :
     8742  ac_fn_cxx_check_func "$LINENO" "av_open_input_file" "ac_cv_func_av_open_input_file"
     8743if test "x$ac_cv_func_av_open_input_file" = xyes; then :
     8744  cat >>confdefs.h <<_ACEOF
     8745#define HAVE_AV_OPEN_INPUT_FILE 1
     8746_ACEOF
     8747
     8748fi
     8749done
     8750
     8751for ac_func in av_guess_format
     8752do :
     8753  ac_fn_cxx_check_func "$LINENO" "av_guess_format" "ac_cv_func_av_guess_format"
     8754if test "x$ac_cv_func_av_guess_format" = xyes; then :
     8755  cat >>confdefs.h <<_ACEOF
     8756#define HAVE_AV_GUESS_FORMAT 1
     8757_ACEOF
     8758
     8759fi
     8760done
     8761
     8762for ac_func in guess_format
     8763do :
     8764  ac_fn_cxx_check_func "$LINENO" "guess_format" "ac_cv_func_guess_format"
     8765if test "x$ac_cv_func_guess_format" = xyes; then :
     8766  cat >>confdefs.h <<_ACEOF
     8767#define HAVE_GUESS_FORMAT 1
     8768_ACEOF
     8769
     8770fi
     8771done
     8772
     8773for ac_func in av_dump_format
     8774do :
     8775  ac_fn_cxx_check_func "$LINENO" "av_dump_format" "ac_cv_func_av_dump_format"
     8776if test "x$ac_cv_func_av_dump_format" = xyes; then :
     8777  cat >>confdefs.h <<_ACEOF
     8778#define HAVE_AV_DUMP_FORMAT 1
     8779_ACEOF
     8780
     8781fi
     8782done
     8783
     8784for ac_func in dump_format
     8785do :
     8786  ac_fn_cxx_check_func "$LINENO" "dump_format" "ac_cv_func_dump_format"
     8787if test "x$ac_cv_func_dump_format" = xyes; then :
     8788  cat >>confdefs.h <<_ACEOF
     8789#define HAVE_DUMP_FORMAT 1
     8790_ACEOF
     8791
     8792fi
     8793done
     8794
     8795for ac_func in avio_open
     8796do :
     8797  ac_fn_cxx_check_func "$LINENO" "avio_open" "ac_cv_func_avio_open"
     8798if test "x$ac_cv_func_avio_open" = xyes; then :
     8799  cat >>confdefs.h <<_ACEOF
     8800#define HAVE_AVIO_OPEN 1
     8801_ACEOF
     8802
     8803fi
     8804done
     8805
     8806for ac_func in url_fopen
     8807do :
     8808  ac_fn_cxx_check_func "$LINENO" "url_fopen" "ac_cv_func_url_fopen"
     8809if test "x$ac_cv_func_url_fopen" = xyes; then :
     8810  cat >>confdefs.h <<_ACEOF
     8811#define HAVE_URL_FOPEN 1
     8812_ACEOF
     8813
     8814fi
     8815done
     8816
     8817for ac_func in avio_close
     8818do :
     8819  ac_fn_cxx_check_func "$LINENO" "avio_close" "ac_cv_func_avio_close"
     8820if test "x$ac_cv_func_avio_close" = xyes; then :
     8821  cat >>confdefs.h <<_ACEOF
     8822#define HAVE_AVIO_CLOSE 1
     8823_ACEOF
     8824
     8825fi
     8826done
     8827
     8828for ac_func in url_fclose
     8829do :
     8830  ac_fn_cxx_check_func "$LINENO" "url_fclose" "ac_cv_func_url_fclose"
     8831if test "x$ac_cv_func_url_fclose" = xyes; then :
     8832  cat >>confdefs.h <<_ACEOF
     8833#define HAVE_URL_FCLOSE 1
     8834_ACEOF
     8835
     8836fi
     8837done
     8838
     8839for ac_func in avformat_alloc_context
     8840do :
     8841  ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
     8842if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
     8843  cat >>confdefs.h <<_ACEOF
     8844#define HAVE_AVFORMAT_ALLOC_CONTEXT 1
     8845_ACEOF
     8846
     8847fi
     8848done
     8849
     8850for ac_func in av_alloc_format_context
     8851do :
     8852  ac_fn_cxx_check_func "$LINENO" "av_alloc_format_context" "ac_cv_func_av_alloc_format_context"
     8853if test "x$ac_cv_func_av_alloc_format_context" = xyes; then :
     8854  cat >>confdefs.h <<_ACEOF
     8855#define HAVE_AV_ALLOC_FORMAT_CONTEXT 1
     8856_ACEOF
     8857
     8858fi
     8859done
     8860
     8861for ac_func in av_set_parameters
     8862do :
     8863  ac_fn_cxx_check_func "$LINENO" "av_set_parameters" "ac_cv_func_av_set_parameters"
     8864if test "x$ac_cv_func_av_set_parameters" = xyes; then :
     8865  cat >>confdefs.h <<_ACEOF
     8866#define HAVE_AV_SET_PARAMETERS 1
     8867_ACEOF
     8868
     8869fi
     8870done
     8871
     8872for ac_func in avformat_write_header
     8873do :
     8874  ac_fn_cxx_check_func "$LINENO" "avformat_write_header" "ac_cv_func_avformat_write_header"
     8875if test "x$ac_cv_func_avformat_write_header" = xyes; then :
     8876  cat >>confdefs.h <<_ACEOF
     8877#define HAVE_AVFORMAT_WRITE_HEADER 1
     8878_ACEOF
     8879
     8880fi
     8881done
     8882
     8883for ac_func in av_write_header
     8884do :
     8885  ac_fn_cxx_check_func "$LINENO" "av_write_header" "ac_cv_func_av_write_header"
     8886if test "x$ac_cv_func_av_write_header" = xyes; then :
     8887  cat >>confdefs.h <<_ACEOF
     8888#define HAVE_AV_WRITE_HEADER 1
     8889_ACEOF
     8890
     8891fi
     8892done
     8893
     8894ac_fn_cxx_check_func "$LINENO" "av_write_trailer" "ac_cv_func_av_write_trailer"
     8895if test "x$ac_cv_func_av_write_trailer" = xyes; then :
     8896
     8897else
     8898  as_fn_error $? "oops! no av_write_trailer?!?" "$LINENO" 5
     8899fi
     8900
     8901ac_fn_cxx_check_func "$LINENO" "av_freep" "ac_cv_func_av_freep"
     8902if test "x$ac_cv_func_av_freep" = xyes; then :
     8903
     8904else
     8905  as_fn_error $? "oops! no av_freep ?!?" "$LINENO" 5
     8906fi
     8907
     8908ac_fn_cxx_check_func "$LINENO" "av_free" "ac_cv_func_av_free"
     8909if test "x$ac_cv_func_av_free" = xyes; then :
     8910
     8911else
     8912  as_fn_error $? "oops! no av_free ?!?" "$LINENO" 5
     8913fi
     8914
     8915ac_fn_cxx_check_func "$LINENO" "av_new_stream" "ac_cv_func_av_new_stream"
     8916if test "x$ac_cv_func_av_new_stream" = xyes; then :
     8917
     8918else
     8919  as_fn_error $? "oops! av_new_stream ?!?" "$LINENO" 5
     8920fi
     8921
     8922ac_fn_cxx_check_func "$LINENO" "av_malloc" "ac_cv_func_av_malloc"
     8923if test "x$ac_cv_func_av_malloc" = xyes; then :
     8924
     8925else
     8926  as_fn_error $? "oops! no av_malloc ?!?" "$LINENO" 5
     8927fi
     8928
     8929ac_fn_cxx_check_func "$LINENO" "av_init_packet" "ac_cv_func_av_init_packet"
     8930if test "x$ac_cv_func_av_init_packet" = xyes; then :
     8931
     8932else
     8933  as_fn_error $? "oops! no av_init_packet ?!?" "$LINENO" 5
     8934fi
     8935
     8936ac_fn_cxx_check_func "$LINENO" "av_rescale_q" "ac_cv_func_av_rescale_q"
     8937if test "x$ac_cv_func_av_rescale_q" = xyes; then :
     8938
     8939else
     8940  as_fn_error $? "oops! no av_rescale_q ?!?" "$LINENO" 5
     8941fi
     8942
     8943ac_fn_cxx_check_func "$LINENO" "av_write_frame" "ac_cv_func_av_write_frame"
     8944if test "x$ac_cv_func_av_write_frame" = xyes; then :
     8945
     8946else
     8947  as_fn_error $? "oops! av_write_frame ?!?" "$LINENO" 5
     8948fi
     8949
     8950ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
     8951if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
     8952
     8953else
     8954  as_fn_error $? "oops! avformat_alloc_context ?!?" "$LINENO" 5
     8955fi
     8956
     8957for ac_func in img_convert
     8958do :
     8959  ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"
     8960if test "x$ac_cv_func_img_convert" = xyes; then :
     8961  cat >>confdefs.h <<_ACEOF
     8962#define HAVE_IMG_CONVERT 1
     8963_ACEOF
     8964
     8965fi
     8966done
     8967
     8968for ac_func in sws_scale
     8969do :
     8970  ac_fn_cxx_check_func "$LINENO" "sws_scale" "ac_cv_func_sws_scale"
     8971if test "x$ac_cv_func_sws_scale" = xyes; then :
     8972  cat >>confdefs.h <<_ACEOF
     8973#define HAVE_SWS_SCALE 1
     8974_ACEOF
     8975
     8976fi
     8977done
     8978
     8979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8980/* end confdefs.h.  */
     8981
     8982#define __STDC_CONSTANT_MACROS 1
     8983#include <stdlib.h>
     8984#ifdef HAVE_FFMPEG_AVCODEC_H
     8985# include <ffmpeg/avcodec.h>
     8986#endif
     8987#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     8988# include <libavcodec/avcodec.h>
     8989#endif
     8990int x = AVMEDIA_TYPE_VIDEO;
     8991
     8992int
     8993main ()
     8994{
     8995
     8996  ;
     8997  return 0;
     8998}
     8999_ACEOF
     9000if ac_fn_cxx_try_compile "$LINENO"; then :
     9001  ac_avmedia_type_video="yes"
     9002else
     9003  ac_avmedia_type_video="no"
     9004fi
     9005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     9006if test "$ac_avmedia_type_video" == "yes" ; then
     9007
     9008$as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h
     9009
     9010fi
    85519011
    85529012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_alloc_frame in -lavcodec" >&5
     
    86899149
    86909150fi
    8691 
    8692 for ac_func in avformat_alloc_context
    8693 do :
    8694   ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
    8695 if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :
    8696   cat >>confdefs.h <<_ACEOF
    8697 #define HAVE_AVFORMAT_ALLOC_CONTEXT 1
    8698 _ACEOF
    8699 
    8700 fi
    8701 done
    8702 
    8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_free in -lavutil" >&5
    8704 $as_echo_n "checking for av_free in -lavutil... " >&6; }
    8705 if ${ac_cv_lib_avutil_av_free+:} false; then :
    8706   $as_echo_n "(cached) " >&6
    8707 else
    8708   ac_check_lib_save_LIBS=$LIBS
    8709 LIBS="-lavutil  $LIBS"
    8710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    8711 /* end confdefs.h.  */
    8712 
    8713 /* Override any GCC internal prototype to avoid an error.
    8714    Use char because int might match the return type of a GCC
    8715    builtin and then its argument prototype would still apply.  */
    8716 #ifdef __cplusplus
    8717 extern "C"
    8718 #endif
    8719 char av_free ();
    8720 int
    8721 main ()
    8722 {
    8723 return av_free ();
    8724   ;
    8725   return 0;
    8726 }
    8727 _ACEOF
    8728 if ac_fn_cxx_try_link "$LINENO"; then :
    8729   ac_cv_lib_avutil_av_free=yes
    8730 else
    8731   ac_cv_lib_avutil_av_free=no
    8732 fi
    8733 rm -f core conftest.err conftest.$ac_objext \
    8734     conftest$ac_exeext conftest.$ac_ext
    8735 LIBS=$ac_check_lib_save_LIBS
    8736 fi
    8737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_av_free" >&5
    8738 $as_echo "$ac_cv_lib_avutil_av_free" >&6; }
    8739 if test "x$ac_cv_lib_avutil_av_free" = xyes; then :
    8740   cat >>confdefs.h <<_ACEOF
    8741 #define HAVE_LIBAVUTIL 1
    8742 _ACEOF
    8743 
    8744   LIBS="-lavutil $LIBS"
    8745 
    8746 fi
    8747 
    8748 for ac_func in img_convert
    8749 do :
    8750   ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"
    8751 if test "x$ac_cv_func_img_convert" = xyes; then :
    8752   cat >>confdefs.h <<_ACEOF
    8753 #define HAVE_IMG_CONVERT 1
    8754 _ACEOF
    8755 
    8756 fi
    8757 done
    87589151
    87599152
  • branches/blt4/packages/vizservers/configure.in

    r2674 r2742  
    275275
    276276AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[
    277 #define SIZEOF_LONG ${ac_cv_sizeof_long}
    278 #if SIZEOF_LONG == 8
    279 #  define INT64_C(c)  c ## L
    280 #  define UINT64_C(c) c ## UL
    281 #else
    282 #  define INT64_C(c)  c ## LL
    283 #  define UINT64_C(c) c ## ULL
    284 #endif
     277#define __STDC_CONSTANT_MACROS 1
    285278])
    286279CPPFLAGS=$save_CPPFLAGS
     280
     281AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(requires libavcodec))
     282AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(requires libavutil))
     283AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(requires libavformat))
     284AC_CHECK_LIB(swscale, main)
     285AC_CHECK_FUNCS(avcodec_decode_video2)
     286AC_CHECK_FUNCS(avcodec_decode_video)
     287AC_CHECK_FUNCS(avformat_open_input)
     288AC_CHECK_FUNCS(av_open_input_file)
     289AC_CHECK_FUNCS(av_guess_format)
     290AC_CHECK_FUNCS(guess_format)
     291AC_CHECK_FUNCS(av_dump_format)
     292AC_CHECK_FUNCS(dump_format)
     293AC_CHECK_FUNCS(avio_open)
     294AC_CHECK_FUNCS(url_fopen)
     295AC_CHECK_FUNCS(avio_close)
     296AC_CHECK_FUNCS(url_fclose)
     297AC_CHECK_FUNCS(avformat_alloc_context)
     298AC_CHECK_FUNCS(av_alloc_format_context)
     299AC_CHECK_FUNCS(av_set_parameters)
     300AC_CHECK_FUNCS(avformat_write_header)
     301AC_CHECK_FUNCS(av_write_header)
     302AC_CHECK_FUNC(av_write_trailer,,
     303  AC_MSG_ERROR(oops! no av_write_trailer?!?))
     304AC_CHECK_FUNC(av_freep,, AC_MSG_ERROR(oops! no av_freep ?!?))
     305AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_free ?!?))
     306AC_CHECK_FUNC(av_new_stream,,AC_MSG_ERROR(oops! av_new_stream ?!?))
     307AC_CHECK_FUNC(av_malloc,, AC_MSG_ERROR(oops! no av_malloc ?!?))
     308AC_CHECK_FUNC(av_init_packet,,AC_MSG_ERROR(oops! no av_init_packet ?!?))
     309AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?))
     310AC_CHECK_FUNC(av_write_frame,,AC_MSG_ERROR(oops! av_write_frame ?!?))
     311AC_CHECK_FUNC(avformat_alloc_context,,
     312  AC_MSG_ERROR(oops! avformat_alloc_context ?!?))
     313AC_CHECK_FUNCS(img_convert)
     314AC_CHECK_FUNCS(sws_scale)
     315AC_TRY_COMPILE([
     316#define __STDC_CONSTANT_MACROS 1
     317#include <stdlib.h>
     318#ifdef HAVE_FFMPEG_AVCODEC_H
     319# include <ffmpeg/avcodec.h>
     320#endif
     321#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     322# include <libavcodec/avcodec.h>
     323#endif
     324int x = AVMEDIA_TYPE_VIDEO;
     325],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no")
     326if test "$ac_avmedia_type_video" == "yes" ; then
     327  AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ])
     328fi
    287329
    288330AC_CHECK_LIB([avcodec], [avcodec_alloc_frame])
     
    291333    AC_CHECK_LIB([avformat], [av_alloc_format_context], [],
    292334        [AC_MSG_WARN([libavformat not usable])]))
    293 AC_CHECK_FUNCS([avformat_alloc_context])
    294 AC_CHECK_LIB([avutil], [av_free])
    295 AC_CHECK_FUNCS([img_convert])
    296335
    297336
  • branches/blt4/packages/vizservers/nanovis/Command.cpp

    r2681 r2742  
    12151215#endif  /*__TEST_CODE__*/
    12161216    } else {
     1217        if ((nBytes > 5) && (strncmp(bytes, "<ODX>", 5) == 0)) {
     1218            bytes += 5;
     1219            nBytes -= 5;
     1220        }
    12171221        TRACE("DX loading...\n");
    12181222        std::stringstream fdata;
  • branches/blt4/packages/vizservers/nanovis/RpAVTranslate.cpp

    r2409 r2742  
    3434
    3535#include "RpAVTranslate.h"
     36
     37#ifndef HAVE_AVMEDIA_TYPE_VIDEO
     38#define AVMEDIA_TYPE_VIDEO      CODEC_TYPE_VIDEO
     39#endif  /* HAVE_AVMEDIA_TYPE_VIDEO */
     40
     41#ifndef AV_PKT_FLAG_KEY
     42#define AV_PKT_FLAG_KEY         PKT_FLAG_KEY           
     43#endif
     44
     45#ifndef HAVE_AV_GUESS_FORMAT
     46#define av_guess_format         guess_format
     47#endif  /*HAVE_AV_GUESS_FORMAT*/
     48
     49#ifndef HAVE_AV_DUMP_FORMAT
     50#define av_dump_format          dump_format
     51#endif  /*HAVE_AV_DUMP_FORMAT*/
     52
     53#ifndef HAVE_AVIO_OPEN
     54#define avio_open               url_fopen       
     55#endif  /*HAVE_AVIO_OPEN*/
     56
     57#ifndef HAVE_AVIO_CLOSE
     58#define avio_close              url_fclose     
     59#endif  /*HAVE_AVIO_CLOSE*/
    3660
    3761#ifndef M_PI
     
    101125
    102126    /* Auto detect the output format from the name. default is mpeg. */
    103     _fmtPtr = guess_format(NULL, filename, NULL);
     127    _fmtPtr = av_guess_format(NULL, filename, NULL);
    104128    if (_fmtPtr == NULL) {
    105129        /*
     
    107131                 "file extension: using MPEG.\n");
    108132        */
    109         _fmtPtr = guess_format("mpeg", NULL, NULL);
     133        _fmtPtr = av_guess_format("mpeg", NULL, NULL);
    110134    }
    111135    if (_fmtPtr == NULL) {
     
    136160    }
    137161
     162#if defined(HAVE_AV_SET_PARAMETERS) && !defined(HAVE_AVFORMAT_WRITE_HEADER)
    138163    /* Set the output parameters (must be done even if no parameters). */
    139164    if (av_set_parameters(_ocPtr, NULL) < 0) {
     
    141166        return false;
    142167    }
    143 
    144     dump_format(_ocPtr, 0, filename, 1);
     168#endif
     169    av_dump_format(_ocPtr, 0, filename, 1);
    145170
    146171    /* Now that all the parameters are set, we can open the video codec and
     
    154179    /* Open the output file, if needed. */
    155180    if (!(_fmtPtr->flags & AVFMT_NOFILE)) {
    156         if (url_fopen(&_ocPtr->pb, filename, URL_WRONLY) < 0) {
     181        if (avio_open(&_ocPtr->pb, filename, URL_WRONLY) < 0) {
    157182            status.addError("Could not open '%s'", filename);
    158183            return false;
     
    161186
    162187    /* write the stream header, if any */
     188#ifdef HAVE_AVFORMAT_WRITE_HEADER
     189    avformat_write_header(_ocPtr, NULL);
     190#else
    163191    av_write_header(_ocPtr);
     192#endif
    164193    return true;
    165194}
     
    226255    if (!(_fmtPtr->flags & AVFMT_NOFILE)) {
    227256        /* close the output file */
    228         url_fclose(_ocPtr->pb);
     257        avio_close(_ocPtr->pb);
    229258    }
    230259
     
    257286    codecPtr = streamPtr->codec;
    258287    codecPtr->codec_id = codec_id;
    259     codecPtr->codec_type = CODEC_TYPE_VIDEO;
     288    codecPtr->codec_type = AVMEDIA_TYPE_VIDEO;
    260289
    261290    /* Put sample parameters */
     
    393422                           _avStreamPtr->time_base);
    394423    if (codecPtr->coded_frame->key_frame) {
    395         pkt.flags |= PKT_FLAG_KEY;
     424        pkt.flags |= AV_PKT_FLAG_KEY;
    396425    }
    397426    pkt.stream_index = _avStreamPtr->index;
  • branches/blt4/packages/vizservers/nanovis/config.h

    r1431 r2742  
    4545 * runtime if mesh decimation is required]
    4646 */
    47 #define ISO_TEST                1
     47#define ISO_TEST                0
    4848
    4949/*
  • branches/blt4/packages/vizservers/nanovis/nanovis.cpp

    r2409 r2742  
    754754
    755755    if(lastError) {
    756         const char *listing = cgGetLastListing(g_context);
    757756        TRACE("\n---------------------------------------------------\n");
    758757        TRACE("%s\n\n", cgGetErrorString(lastError));
    759         TRACE("%s\n", listing);
     758        TRACE("%s\n", cgGetLastListing(g_context));
    760759        TRACE("-----------------------------------------------------\n");
    761760        TRACE("Cg error, exiting...\n");
     
    22492248    char *newPath;
    22502249    struct timeval tv;
    2251         int n, i;
    22522250    newPath = NULL;
    22532251    path = NULL;
  • branches/blt4/packages/vizservers/nanovis/nvconf.h.in

    r2681 r2742  
    1010#undef HAVE_ARPA_INET_H
    1111
     12/* Define to 1 if you have the `avcodec_decode_video' function. */
     13#undef HAVE_AVCODEC_DECODE_VIDEO
     14
     15/* Define to 1 if you have the `avcodec_decode_video2' function. */
     16#undef HAVE_AVCODEC_DECODE_VIDEO2
     17
    1218/* Define to 1 if you have the `avformat_alloc_context' function. */
    1319#undef HAVE_AVFORMAT_ALLOC_CONTEXT
    1420
     21/* Define to 1 if you have the `avformat_open_input' function. */
     22#undef HAVE_AVFORMAT_OPEN_INPUT
     23
     24/* Define to 1 if you have the `avformat_write_header' function. */
     25#undef HAVE_AVFORMAT_WRITE_HEADER
     26
     27/* Define to 1 if you have the `avio_close' function. */
     28#undef HAVE_AVIO_CLOSE
     29
     30/* Define to 1 if you have the `avio_open' function. */
     31#undef HAVE_AVIO_OPEN
     32
     33/* Define if AVMEDIA_TYPE_VIDEO enum exists. */
     34#undef HAVE_AVMEDIA_TYPE_VIDEO
     35
     36/* Define to 1 if you have the `av_alloc_format_context' function. */
     37#undef HAVE_AV_ALLOC_FORMAT_CONTEXT
     38
     39/* Define to 1 if you have the `av_dump_format' function. */
     40#undef HAVE_AV_DUMP_FORMAT
     41
     42/* Define to 1 if you have the `av_guess_format' function. */
     43#undef HAVE_AV_GUESS_FORMAT
     44
     45/* Define to 1 if you have the `av_open_input_file' function. */
     46#undef HAVE_AV_OPEN_INPUT_FILE
     47
     48/* Define to 1 if you have the `av_set_parameters' function. */
     49#undef HAVE_AV_SET_PARAMETERS
     50
     51/* Define to 1 if you have the `av_write_header' function. */
     52#undef HAVE_AV_WRITE_HEADER
     53
    1554/* Define to 1 if you have the <Cg/cgGL.h> header file. */
    1655#undef HAVE_CG_CGGL_H
    1756
     57/* Define to 1 if you have the `dump_format' function. */
     58#undef HAVE_DUMP_FORMAT
     59
    1860/* Define to 1 if you have the <dx/dx.h> header file. */
    1961#undef HAVE_DX_DX_H
     
    2870#undef HAVE_FFMPEG_AVUTIL_H
    2971
     72/* Define to 1 if you have the `guess_format' function. */
     73#undef HAVE_GUESS_FORMAT
     74
    3075/* Define to 1 if you have the `img_convert' function. */
    3176#undef HAVE_IMG_CONVERT
     
    55100#undef HAVE_LIBHIGHGUI
    56101
     102/* Define to 1 if you have the `swscale' library (-lswscale). */
     103#undef HAVE_LIBSWSCALE
     104
    57105/* Define to 1 if you have the <memory.h> header file. */
    58106#undef HAVE_MEMORY_H
     
    88136#undef HAVE_STRING_H
    89137
     138/* Define to 1 if you have the `sws_scale' function. */
     139#undef HAVE_SWS_SCALE
     140
    90141/* Define to 1 if you have the <sys/socket.h> header file. */
    91142#undef HAVE_SYS_SOCKET_H
     
    102153/* Define to 1 if you have the <unistd.h> header file. */
    103154#undef HAVE_UNISTD_H
     155
     156/* Define to 1 if you have the `url_fclose' function. */
     157#undef HAVE_URL_FCLOSE
     158
     159/* Define to 1 if you have the `url_fopen' function. */
     160#undef HAVE_URL_FOPEN
    104161
    105162/* Define to 1 if you have the <vtkSmartPointer.h> header file. */
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.cpp

    r2681 r2742  
    11001100                              double range[2],
    11011101                              int width, int height,
     1102                              bool opaque,
    11021103                              int numLabels,
    11031104                              vtkUnsignedCharArray *imgData)
     
    11101111                                  NULL,
    11111112                                  DataSet::POINT_DATA,
    1112                                   title, range, width, height, numLabels, imgData);
     1113                                  title, range, width, height, opaque, numLabels, imgData);
    11131114        } else {
    11141115            dataSet = _dataSets.begin()->second;
     
    11261127                              dataSet->getActiveScalarsName(),
    11271128                              dataSet->getActiveScalarsType(),
    1128                               title, range, width, height, numLabels, imgData);
     1129                              title, range, width, height, opaque, numLabels, imgData);
    11291130    } else {
    11301131        return renderColorMap(id, dataSetID, legendType,
    11311132                              dataSet->getActiveVectorsName(),
    11321133                              dataSet->getActiveVectorsType(),
    1133                               title, range, width, height, numLabels, imgData);
     1134                              title, range, width, height, opaque, numLabels, imgData);
    11341135    }
    11351136}
     
    11661167                              double range[2],
    11671168                              int width, int height,
     1169                              bool opaque,
    11681170                              int numLabels,
    11691171                              vtkUnsignedCharArray *imgData)
     
    11761178                                  NULL,
    11771179                                  DataSet::POINT_DATA,
    1178                                   title, range, width, height, numLabels, imgData);
     1180                                  title, range, width, height, opaque, numLabels, imgData);
    11791181        } else {
    11801182            dataSet = _dataSets.begin()->second;
     
    11961198                          fieldName,
    11971199                          attrType,
    1198                           title, range, width, height, numLabels, imgData);
     1200                          title, range, width, height, opaque, numLabels, imgData);
    11991201}
    12001202
     
    12291231                              double range[2],
    12301232                              int width, int height,
     1233                              bool opaque,
    12311234                              int numLabels,
    12321235                              vtkUnsignedCharArray *imgData)
     
    12591262    if (_scalarBarActor == NULL) {
    12601263        _scalarBarActor = vtkSmartPointer<vtkScalarBarActor>::New();
     1264        _legendRenderer->AddViewProp(_scalarBarActor);
     1265    }
     1266
     1267    if (opaque) {
     1268        _scalarBarActor->UseOpacityOff();
     1269    } else {
    12611270        _scalarBarActor->UseOpacityOn();
    1262         _legendRenderer->AddViewProp(_scalarBarActor);
    12631271    }
    12641272
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.h

    r2681 r2742  
    269269                        double range[2],
    270270                        int width, int height,
     271                        bool opaque,
    271272                        int numLabels,
    272273                        vtkUnsignedCharArray *imgData);
     
    279280                        double range[2],
    280281                        int width, int height,
     282                        bool opaque,
    281283                        int numLabels,
    282284                        vtkUnsignedCharArray *imgData);
     
    288290                        double range[2],
    289291                        int width, int height,
     292                        bool opaque,
    290293                        int numLabels,
    291294                        vtkUnsignedCharArray *imgData);
  • branches/blt4/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp

    r2681 r2742  
    30753075        const char *dataSetName = Tcl_GetString(objv[8]);
    30763076        if (!g_renderer->renderColorMap(colorMapName, dataSetName, legendType, fieldName, title,
    3077                                         range, width, height, numLabels, imgData)) {
     3077                                        range, width, height, true, numLabels, imgData)) {
    30783078            Tcl_AppendResult(interp, "Color map \"",
    30793079                             colorMapName, "\" or dataset \"",
     
    30833083    } else {
    30843084        if (!g_renderer->renderColorMap(colorMapName, "all", legendType, fieldName, title,
    3085                                         range, width, height, numLabels, imgData)) {
     3085                                        range, width, height, true, numLabels, imgData)) {
    30863086            Tcl_AppendResult(interp, "Color map \"",
    30873087                             colorMapName, "\" was not found", (char*)NULL);
  • branches/blt4/src/core/config.h.in

    r2705 r2742  
    1313#undef HAVE_ASSERT_H
    1414
     15/* Define to 1 if you have the `avcodec_decode_video' function. */
     16#undef HAVE_AVCODEC_DECODE_VIDEO
     17
     18/* Define to 1 if you have the `avcodec_decode_video2' function. */
     19#undef HAVE_AVCODEC_DECODE_VIDEO2
     20
     21/* Define to 1 if you have the `avformat_open_input' function. */
     22#undef HAVE_AVFORMAT_OPEN_INPUT
     23
     24/* Define to 1 if you have the `avio_close' function. */
     25#undef HAVE_AVIO_CLOSE
     26
     27/* Define if AVMEDIA_TYPE_VIDEO enum exists. */
     28#undef HAVE_AVMEDIA_TYPE_VIDEO
     29
     30/* Define to 1 if you have the `av_open_input_file' function. */
     31#undef HAVE_AV_OPEN_INPUT_FILE
     32
    1533/* Define to 1 if you have the <cctype> header file. */
    1634#undef HAVE_CCTYPE
     
    4664#undef HAVE_FFMPEG_AVUTIL_H
    4765
    48 /* Define to 1 if you have the <ffmpeg/swscale.h> header file. */
    49 #undef HAVE_FFMPEG_SWSCALE_H
    50 
    5166/* Define to 1 if you have the <float.h> header file. */
    5267#undef HAVE_FLOAT_H
     
    6782#undef HAVE_ITERATOR
    6883
     84/* Define to 1 if you have the `avcodec' library (-lavcodec). */
     85#undef HAVE_LIBAVCODEC
     86
    6987/* Define to 1 if you have the <libavcodec/avcodec.h> header file. */
    7088#undef HAVE_LIBAVCODEC_AVCODEC_H
    7189
     90/* Define to 1 if you have the `avformat' library (-lavformat). */
     91#undef HAVE_LIBAVFORMAT
     92
    7293/* Define to 1 if you have the <libavformat/avformat.h> header file. */
    7394#undef HAVE_LIBAVFORMAT_AVFORMAT_H
    7495
     96/* Define to 1 if you have the `avutil' library (-lavutil). */
     97#undef HAVE_LIBAVUTIL
     98
    7599/* Define to 1 if you have the <libavutil/avutil.h> header file. */
    76100#undef HAVE_LIBAVUTIL_AVUTIL_H
     
    85109#undef HAVE_LIBSTDC__
    86110
    87 /* Define to 1 if you have the <libswscale/swscale.h> header file. */
    88 #undef HAVE_LIBSWSCALE_SWSCALE_H
     111/* Define to 1 if you have the `swscale' library (-lswscale). */
     112#undef HAVE_LIBSWSCALE
    89113
    90114/* Define to 1 if you have the <limits.h> header file. */
     
    133157#undef HAVE_STRING_H
    134158
     159/* Define to 1 if you have the `sws_getCachedContext' function. */
     160#undef HAVE_SWS_GETCACHEDCONTEXT
     161
    135162/* Define to 1 if you have the `sws_scale' function. */
    136163#undef HAVE_SWS_SCALE
     
    150177/* Define to 1 if you have the <unistd.h> header file. */
    151178#undef HAVE_UNISTD_H
     179
     180/* Define to 1 if you have the `url_close' function. */
     181#undef HAVE_URL_CLOSE
    152182
    153183/* Define to 1 if you have the <vector> header file. */
  • branches/blt4/src/objects/RpVideo.c

    r2713 r2742  
    5555#include "RpVideo.h"
    5656
    57 #if LIBAVUTIL_VERSION_MAJOR < 51
     57#ifndef HAVE_AVMEDIA_TYPE_VIDEO
    5858#define AVMEDIA_TYPE_VIDEO      CODEC_TYPE_VIDEO
     59#endif  /* HAVE_AVMEDIA_TYPE_VIDEO */
     60
     61#ifndef AV_PKT_FLAG_KEY
    5962#define AV_PKT_FLAG_KEY         PKT_FLAG_KEY           
    60 #endif  /* LIBAVUTIL_VERSION_MAJOR */
    61 
     63#endif
     64
     65#ifndef HAVE_AVIO_CLOSE
     66#define avio_close              url_fclose
     67#endif
    6268
    6369/*
     
    341347     * Open the video stream from that file.
    342348     */
     349#ifdef HAVE_AVFORMAT_OPEN_INPUT
     350    if (avformat_open_input(&vidPtr->pFormatCtx, vidPtr->fileName, NULL,
     351        NULL) != 0) {
     352        return -3;
     353    }
     354#else
    343355    if (av_open_input_file(&vidPtr->pFormatCtx, vidPtr->fileName,
    344356            NULL, 0, NULL) != 0) {
    345         // Tcl_AppendResult(interp, "couldn't open file \"",
    346         //     fileName, "\"", (char*)NULL);
    347         // return TCL_ERROR;
    348 
    349         // couldn't open file
    350357        return -3;
    351358    }
     359#endif
    352360    if (av_find_stream_info(vidPtr->pFormatCtx) < 0) {
    353361        // Tcl_AppendResult(interp, "couldn't find streams in file \"",
     
    711719                    global_video_pkt_pts = packet.pts;
    712720
    713 #ifdef FFMPEG_AVCODEC_H
     721#ifdef HAVE_AVCODEC_DECODE_VIDEO2
     722                    // new avcodec decode video function
     723                    avcodec_decode_video2(vcodecCtx, vidPtr->pFrameYUV,
     724                        &frameFinished, &packet);
     725#else
    714726                    // old avcodec decode video function
    715727                    avcodec_decode_video(vcodecCtx, vidPtr->pFrameYUV,
    716728                        &frameFinished, packet.data, packet.size);
    717 #else
    718                     // new avcodec decode video function
    719                     avcodec_decode_video2(vcodecCtx, vidPtr->pFrameYUV,
    720                         &frameFinished, &packet);
    721729#endif
    722 
    723730                    if (packet.dts == AV_NOPTS_VALUE
    724731                          && vidPtr->pFrameYUV->opaque
     
    16681675
    16691676        if (vidPtr->outFormatCtx->pb) {
    1670             url_fclose(vidPtr->outFormatCtx->pb);
     1677            avio_close(vidPtr->outFormatCtx->pb);
    16711678        }
    16721679
Note: See TracChangeset for help on using the changeset viewer.