Mercurial > octave
changeset 26072:8b6f1731474b
maint: merge stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 14 Nov 2018 10:57:46 -0800 |
parents | 01da3729016a (current diff) 658153e1976d (diff) |
children | 1ee1ddeee5ac |
files | configure.ac libinterp/dldfcn/__init_gnuplot__.cc m4/acinclude.m4 |
diffstat | 4 files changed, 19 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Wed Nov 14 08:04:40 2018 -0800 +++ b/configure.ac Wed Nov 14 10:57:46 2018 -0800 @@ -3066,7 +3066,7 @@ Z libraries: $Z_LIBS Default pager: $DEFAULT_PAGER - gnuplot: $GNUPLOT + gnuplot: $GNUPLOT_BINARY Build Octave Qt GUI: $BUILD_QT_SUMMARY_MSG JIT compiler for loops: $ENABLE_JIT
--- a/libinterp/dldfcn/__init_gnuplot__.cc Wed Nov 14 08:04:40 2018 -0800 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Wed Nov 14 10:57:46 2018 -0800 @@ -184,7 +184,7 @@ octave_value_list tmp = octave::feval ("gnuplot_binary", octave_value_list ()); - if (tmp(0).is_string ()) + if (tmp(0).is_string () && ! tmp(0).isempty ()) { std::string gnuplot_binary = tmp(0).string_value ();
--- a/m4/acinclude.m4 Wed Nov 14 08:04:40 2018 -0800 +++ b/m4/acinclude.m4 Wed Nov 14 10:57:46 2018 -0800 @@ -3235,11 +3235,14 @@ ac_octave_gp_default="gnuplot" if test "$cross_compiling" = yes; then GNUPLOT="$ac_octave_gp_default" + GNUPLOT_BINARY=$GNUPLOT AC_MSG_RESULT([assuming $GNUPLOT exists on $canonical_host_type host]) else AC_CHECK_PROGS(GNUPLOT, [$ac_octave_gp_names]) + GNUPLOT_BINARY=$GNUPLOT if test -z "$GNUPLOT"; then - GNUPLOT="$gp_default" + GNUPLOT="$ac_octave_gp_default" + GNUPLOT_BINARY="" warn_gnuplot=" gnuplot not found. It isn't necessary to have gnuplot installed, but
--- a/scripts/plot/util/gnuplot_binary.in.m Wed Nov 14 08:04:40 2018 -0800 +++ b/scripts/plot/util/gnuplot_binary.in.m Wed Nov 14 10:57:46 2018 -0800 @@ -61,12 +61,16 @@ %!test -%! [orig_val, orig_args] = gnuplot_binary (); -%! [old_val, old_args] = gnuplot_binary ("__foobar__", "-opt1"); -%! assert (orig_val, old_val); -%! assert (orig_args, old_args); -%! assert (gnuplot_binary (), "__foobar__"); -%! [~, new_args] = gnuplot_binary (); -%! assert (new_args, {"-opt1"}); -%! gnuplot_binary (orig_val, orig_args{:}); -%! assert (gnuplot_binary (), orig_val); +%! try +%! [orig_val, orig_args] = gnuplot_binary (); +%! [old_val, old_args] = gnuplot_binary ("__foobar__", "-opt1"); +%! assert (orig_val, old_val); +%! assert (orig_args, old_args); +%! assert (gnuplot_binary (), "__foobar__"); +%! [~, new_args] = gnuplot_binary (); +%! assert (new_args, {"-opt1"}); +%! gnuplot_binary (orig_val, orig_args{:}); +%! assert (gnuplot_binary (), orig_val); +%! catch +%! gnuplot_binary (orig_val, orig_args{:}); +%! end_try_catch