Mercurial > hg > octave-nkf
changeset 18418:26eac61ebab2 gui-release
maint: Periodic merge of stable to gui-release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Jan 2014 16:15:46 -0500 |
parents | 07f1934dc498 (current diff) 50505bf88b82 (diff) |
children | cd897532aaec b5a83c383008 |
files | configure.ac src/mkoctfile.in.sh src/octave-config.in.sh |
diffstat | 10 files changed, 169 insertions(+), 863 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -1643,7 +1643,6 @@ OCTGRAPHICS_DLL_DEFS= library_path_var=LD_LIBRARY_PATH ldpreloadsep=" " -BUILD_COMPILED_AUX_PROGRAMS=no case $canonical_host_type in *-*-386bsd* | *-*-netbsd*) SH_LD=ld @@ -1696,7 +1695,6 @@ ldpreloadsep=":" ;; *-*-mingw*) - BUILD_COMPILED_AUX_PROGRAMS=yes if test $have_msvc = yes; then DL_LDFLAGS="-shared" CPICFLAG= @@ -1737,7 +1735,6 @@ ;; *-*-msdosmsvc) - BUILD_COMPILED_AUX_PROGRAMS=yes DL_LDFLAGS="-shared" CPICFLAG= CXXPICFLAG= @@ -1834,9 +1831,6 @@ ;; esac -AM_CONDITIONAL([AMCOND_BUILD_COMPILED_AUX_PROGRAMS], - [test $BUILD_COMPILED_AUX_PROGRAMS = yes]) - AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG]) AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG]) AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG])
--- a/scripts/plot/draw/errorbar.m +++ b/scripts/plot/draw/errorbar.m @@ -17,47 +17,79 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} errorbar (@var{args}) +## @deftypefn {Function File} {} errorbar (@var{y}, @var{ey}) +## @deftypefnx {Function File} {} errorbar (@var{y}, @dots{}, @var{fmt}) +## @deftypefnx {Function File} {} errorbar (@var{x}, @var{y}, @var{ey}) +## @deftypefnx {Function File} {} errorbar (@var{x}, @var{y}, @var{err}, @var{fmt}) +## @deftypefnx {Function File} {} errorbar (@var{x}, @var{y}, @var{lerr}, @var{uerr}, @var{fmt}) +## @deftypefnx {Function File} {} errorbar (@var{x}, @var{y}, @var{ex}, @var{ey}, @var{fmt}) +## @deftypefnx {Function File} {} errorbar (@var{x}, @var{y}, @var{lx}, @var{ux}, @var{ly}, @var{uy}, @var{fmt}) +## @deftypefnx {Function File} {} errorbar (@var{x1}, @var{y1}, @dots{}, @var{fmt}, @var{xn}, @var{yn}, @dots{}) ## @deftypefnx {Function File} {} errorbar (@var{hax}, @dots{}) ## @deftypefnx {Function File} {@var{h} =} errorbar (@dots{}) -## Create a 2-D with errorbars. +## Create a 2-D plot with errorbars. ## -## Many different combinations of arguments are possible. The simplest -## form is +## Many different combinations of arguments are possible. The simplest form is ## ## @example ## errorbar (@var{y}, @var{ey}) ## @end example ## ## @noindent -## where the first argument is taken as the set of @var{y} coordinates -## and the second argument @var{ey} is taken as the errors of the -## @var{y} values. @var{x} coordinates are taken to be the indices -## of the elements, starting with 1. +## where the first argument is taken as the set of @var{y} coordinates, the +## second argument @var{ey} are the errors around the @var{y} values, and the +## @var{x} coordinates are taken to be the indices of the elements +## (@code{1:numel (@var{y})}). ## -## If more than two arguments are given, they are interpreted as +## The general form of the function is ## ## @example -## errorbar (@var{x}, @var{y}, @dots{}, @var{fmt}, @dots{}) +## errorbar (@var{x}, @var{y}, @var{err1}, @dots{}, @var{fmt}, @dots{}) ## @end example ## ## @noindent -## where after @var{x} and @var{y} there can be up to four error -## parameters such as @var{ey}, @var{ex}, @var{ly}, @var{uy}, etc., -## depending on the plot type. Any number of argument sets may appear, -## as long as they are separated with a format string @var{fmt}. +## After the @var{x} and @var{y} arguments there can be 1, 2, or 4 +## parameters specifying the error values depending on the nature of the error +## values and the plot format @var{fmt}. +## +## @table @asis +## @item @var{err} (scalar) +## When the error is a scalar all points share the same error value. +## The errorbars are symmetric and are drawn from @var{data}-@var{err} to +## @var{data}+@var{err}. +## The @var{fmt} argument determines whether @var{err} is in the x-direction, +## y-direction (default), or both. +## +## @item @var{err} (vector or matrix) +## Each data point has a particular error value. +## The errorbars are symmetric and are drawn from @var{data}(n)-@var{err}(n) to +## @var{data}(n)+@var{err}(n). ## -## If @var{y} is a matrix, @var{x} and error parameters must also be matrices -## having same dimensions. The columns of @var{y} are plotted versus the -## corresponding columns of @var{x} and errorbars are drawn from -## the corresponding columns of error parameters. +## @item @var{lerr}, @var{uerr} (scalar) +## The errors have a single low-side value and a single upper-side value. +## The errorbars are not symmetric and are drawn from @var{data}-@var{lerr} to +## @var{data}+@var{uerr}. +## +## @item @var{lerr}, @var{uerr} (vector or matrix) +## Each data point has a low-side error and an upper-side error. +## The errorbars are not symmetric and are drawn from +## @var{data}(n)-@var{lerr}(n) to @var{data}(n)+@var{uerr}(n). +## @end table ## -## If @var{fmt} is missing, yerrorbars ("~") plot style is assumed. +## Any number of data sets (@var{x1},@var{y1}, @var{x2},@var{y2}, @dots{}) may +## appear as long as they are separated by a format string @var{fmt}. ## -## If the @var{fmt} argument is supplied, it is interpreted as in -## normal plots. In addition, @var{fmt} may include an errorbar style -## which must precede the line and marker format. The following plot -## styles are supported by errorbar: +## If @var{y} is a matrix, @var{x} and the error parameters must also be +## matrices having the same dimensions. The columns of @var{y} are plotted +## versus the corresponding columns of @var{x} and errorbars are taken from +## the corresponding columns of the error parameters. +## +## If @var{fmt} is missing, the yerrorbars ("~") plot style is assumed. +## +## If the @var{fmt} argument is supplied then it is interpreted, as in normal +## plots, to specify the line style, marker, and color. In addition, +## @var{fmt} may include an errorbar style which @strong{must precede} the +## ordinary format codes. The following errorbar styles are supported: ## ## @table @samp ## @item ~ @@ -69,14 +101,14 @@ ## @item ~> ## Set xyerrorbars plot style. ## -## @item # -## Set boxes plot style. +## @item #~ +## Set yboxes plot style. ## -## @item #~ -## Set boxerrorbars plot style. +## @item # +## Set xboxes plot style. ## ## @item #~> -## Set boxxyerrorbars plot style. +## Set xyboxes plot style. ## @end table ## ## If the first argument @var{hax} is an axes handle, then plot into this axis, @@ -85,15 +117,24 @@ ## The optional return value @var{h} is a handle to the hggroup object ## representing the data plot and errorbars. ## +## Note: For compatibility with @sc{matlab} a line is drawn through all data +## points. However, most scientific errorbar plots are a scatter plot of +## points with errorbars. To accomplish this, add a marker style to the +## @var{fmt} argument such as @qcode{"."}. Alternatively, remove the line +## by modifying the returned graphic handle with +## @code{set (h, "linestyle", "none")}. +## ## Examples: ## ## @example -## errorbar (@var{x}, @var{y}, @var{ex}, ">") +## errorbar (@var{x}, @var{y}, @var{ex}, ">.r") ## @end example ## ## @noindent ## produces an xerrorbar plot of @var{y} versus @var{x} with @var{x} -## errorbars drawn from @var{x}-@var{ex} to @var{x}+@var{ex}. +## errorbars drawn from @var{x}-@var{ex} to @var{x}+@var{ex}. The marker +## @qcode{"."} is used so no connecting line is drawn and the errorbars +## appear in red. ## ## @example ## @group
--- a/scripts/plot/draw/loglogerr.m +++ b/scripts/plot/draw/loglogerr.m @@ -17,7 +17,14 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} loglogerr (@var{args}) +## @deftypefn {Function File} {} loglogerr (@var{y}, @var{ey}) +## @deftypefnx {Function File} {} loglogerr (@var{y}, @dots{}, @var{fmt}) +## @deftypefnx {Function File} {} loglogerr (@var{x}, @var{y}, @var{ey}) +## @deftypefnx {Function File} {} loglogerr (@var{x}, @var{y}, @var{err}, @var{fmt}) +## @deftypefnx {Function File} {} loglogerr (@var{x}, @var{y}, @var{lerr}, @var{uerr}, @var{fmt}) +## @deftypefnx {Function File} {} loglogerr (@var{x}, @var{y}, @var{ex}, @var{ey}, @var{fmt}) +## @deftypefnx {Function File} {} loglogerr (@var{x}, @var{y}, @var{lx}, @var{ux}, @var{ly}, @var{uy}, @var{fmt}) +## @deftypefnx {Function File} {} loglogerr (@var{x1}, @var{y1}, @dots{}, @var{fmt}, @var{xn}, @var{yn}, @dots{}) ## @deftypefnx {Function File} {} loglogerr (@var{hax}, @dots{}) ## @deftypefnx {Function File} {@var{h} =} loglogerr (@dots{}) ## Produce 2-D plots on a double logarithm axis with errorbars.
--- a/scripts/plot/draw/semilogxerr.m +++ b/scripts/plot/draw/semilogxerr.m @@ -17,9 +17,16 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} semilogxerr (@var{args}) -## @deftypefnx {Function File} {} semilogxerr (@var{hax}, @var{args}) -## @deftypefnx {Function File} {@var{h} =} semilogxerr (@var{args}) +## @deftypefn {Function File} {} semilogxerr (@var{y}, @var{ey}) +## @deftypefnx {Function File} {} semilogxerr (@var{y}, @dots{}, @var{fmt}) +## @deftypefnx {Function File} {} semilogxerr (@var{x}, @var{y}, @var{ey}) +## @deftypefnx {Function File} {} semilogxerr (@var{x}, @var{y}, @var{err}, @var{fmt}) +## @deftypefnx {Function File} {} semilogxerr (@var{x}, @var{y}, @var{lerr}, @var{uerr}, @var{fmt}) +## @deftypefnx {Function File} {} semilogxerr (@var{x}, @var{y}, @var{ex}, @var{ey}, @var{fmt}) +## @deftypefnx {Function File} {} semilogxerr (@var{x}, @var{y}, @var{lx}, @var{ux}, @var{ly}, @var{uy}, @var{fmt}) +## @deftypefnx {Function File} {} semilogxerr (@var{x1}, @var{y1}, @dots{}, @var{fmt}, @var{xn}, @var{yn}, @dots{}) +## @deftypefnx {Function File} {} semilogxerr (@var{hax}, @dots{}) +## @deftypefnx {Function File} {@var{h} =} semilogxerr (@dots{}) ## Produce 2-D plots using a logarithmic scale for the x-axis and ## errorbars at each data point. ##
--- a/scripts/plot/draw/semilogyerr.m +++ b/scripts/plot/draw/semilogyerr.m @@ -17,9 +17,16 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} semilogyerr (@var{args}) -## @deftypefnx {Function File} {} semilogyerr (@var{hax}, @var{args}) -## @deftypefnx {Function File} {@var{h} =} semilogyerr (@var{args}) +## @deftypefn {Function File} {} semilogyerr (@var{y}, @var{ey}) +## @deftypefnx {Function File} {} semilogyerr (@var{y}, @dots{}, @var{fmt}) +## @deftypefnx {Function File} {} semilogyerr (@var{x}, @var{y}, @var{ey}) +## @deftypefnx {Function File} {} semilogyerr (@var{x}, @var{y}, @var{err}, @var{fmt}) +## @deftypefnx {Function File} {} semilogyerr (@var{x}, @var{y}, @var{lerr}, @var{uerr}, @var{fmt}) +## @deftypefnx {Function File} {} semilogyerr (@var{x}, @var{y}, @var{ex}, @var{ey}, @var{fmt}) +## @deftypefnx {Function File} {} semilogyerr (@var{x}, @var{y}, @var{lx}, @var{ux}, @var{ly}, @var{uy}, @var{fmt}) +## @deftypefnx {Function File} {} semilogyerr (@var{x1}, @var{y1}, @dots{}, @var{fmt}, @var{xn}, @var{yn}, @dots{}) +## @deftypefnx {Function File} {} semilogyerr (@var{hax}, @dots{}) +## @deftypefnx {Function File} {@var{h} =} semilogyerr (@dots{}) ## Produce 2-D plots using a logarithmic scale for the y-axis and ## errorbars at each data point. ##
--- a/src/Makefile.am +++ b/src/Makefile.am @@ -38,16 +38,18 @@ EXTRA_DIST = \ main.in.cc \ mkoctfile.in.cc \ - mkoctfile.in.sh \ - octave-config.in.cc \ - octave-config.in.sh + octave-config.in.cc DISTCLEANFILES = \ - main.cc + main.cc \ + mkoctfile.cc \ + octave-config.cc -OCTAVE_BINARIES = \ +bin_PROGRAMS = \ + mkoctfile \ octave \ - octave-cli + octave-cli \ + octave-config OCTAVE_VERSION_LINKS = octave-cli-$(version)$(EXEEXT) @@ -111,12 +113,6 @@ $(NO_UNDEFINED_LDFLAG) \ $(OCTAVE_GUI_LINK_OPTS) -if AMCOND_BUILD_COMPILED_AUX_PROGRAMS -bin_PROGRAMS = \ - $(OCTAVE_BINARIES) \ - mkoctfile \ - octave-config - mkoctfile_SOURCES = nodist_mkoctfile_SOURCES = mkoctfile.cc mkoctfile_LDADD = $(top_builddir)/libgnu/libgnu.la $(LIBS) @@ -128,36 +124,14 @@ $(top_builddir)/libgnu/libgnu.la \ $(LIBS) -DISTCLEANFILES += mkoctfile.cc octave-config.cc - -else -bin_PROGRAMS = \ - $(OCTAVE_BINARIES) - -bin_SCRIPTS = \ - mkoctfile \ - octave-config -endif - all-local: $(OCTAVE_VERSION_LINKS) -if AMCOND_BUILD_COMPILED_AUX_PROGRAMS octave-config.cc: octave-config.in.cc Makefile @$(do_subst_default_vals) mkoctfile.cc: mkoctfile.in.cc Makefile @$(do_subst_config_vals) -else -octave-config: octave-config.in.sh Makefile - @$(do_subst_default_vals) - chmod a+rx $@ - -mkoctfile: mkoctfile.in.sh Makefile - @$(do_subst_config_vals) - chmod a+rx $@ -endif - ## main.cc must depend on Makefile. Calling configure may change ## default/config values. However, calling configure will also ## regenerate the Makefiles from Makefile.am and trigger the rules below. @@ -174,23 +148,11 @@ mv $$f$(EXEEXT) $$f-$(version)$(EXEEXT) && \ $(LN_S) $$f-$(version)$(EXEEXT) $$f$(EXEEXT); \ done -if ! AMCOND_BUILD_COMPILED_AUX_PROGRAMS - cd $(DESTDIR)$(bindir) && \ - for f in $(basename $(bin_SCRIPTS)); do \ - mv $$f $$f-$(version) && \ - $(LN_S) $$f-$(version) $$f; \ - done -endif remove-version-links: for f in $(basename $(bin_PROGRAMS)); do \ rm -f $(DESTDIR)$(bindir)/$$f-$(version)$(EXEEXT); \ done -if ! AMCOND_BUILD_COMPILED_AUX_PROGRAMS - for f in $(basename $(bin_SCRIPTS)); do \ - rm -f $(DESTDIR)$(bindir)/$$f-$(version); \ - done -endif .PHONY: make-version-links remove-version-links @@ -206,5 +168,4 @@ $(LN_S) $< $@ CLEANFILES = \ - $(bin_SCRIPTS) \ $(OCTAVE_VERSION_LINKS)
--- a/src/mkoctfile.in.cc +++ b/src/mkoctfile.in.cc @@ -34,6 +34,8 @@ #include <vector> #include <cstdlib> +#include <unistd.h> + #if defined (__WIN32__) && ! defined (_POSIX_VERSION) #include <windows.h> #ifdef _MSC_VER @@ -242,11 +244,14 @@ vars["FFTW3F_LIBS"] = get_variable ("FFTW3F_LIBS", %OCTAVE_CONF_FFTW3F_LIBS%); vars["LIBS"] = get_variable ("LIBS", %OCTAVE_CONF_LIBS%); vars["FLIBS"] = get_variable ("FLIBS", %OCTAVE_CONF_FLIBS%); - vars["OCTAVE_LINK_DEPS"] = get_variable ("FLIBS", + vars["OCTAVE_LINK_DEPS"] = get_variable ("OCTAVE_LINK_DEPS", %OCTAVE_CONF_OCTAVE_LINK_DEPS%); - vars["OCT_LINK_DEPS"] = get_variable ("FLIBS", %OCTAVE_CONF_OCT_LINK_DEPS%); - vars["FLIBS"] = get_variable ("FLIBS", %OCTAVE_CONF_FLIBS%); - + vars["OCTAVE_LINK_OPTS"] = get_variable ("OCTAVE_LINK_OPTS", + %OCTAVE_CONF_OCTAVE_LINK_OPTS%); + vars["OCT_LINK_DEPS"] = get_variable ("OCT_LINK_DEPS", + %OCTAVE_CONF_OCT_LINK_DEPS%); + vars["OCT_LINK_OPTS"] = get_variable ("OCT_LINK_OPTS", + %OCTAVE_CONF_OCT_LINK_OPTS%); vars["LD_CXX"] = get_variable ("LD_CXX", %OCTAVE_CONF_MKOCTFILE_LD_CXX%); vars["LDFLAGS"] = get_variable ("LDFLAGS", %OCTAVE_CONF_LDFLAGS%); vars["LD_STATIC_FLAG"] = get_variable ("LD_STATIC_FLAG", @@ -294,6 +299,10 @@ "\n" " -M, --depend Generate dependency files (.d) for C and C++\n" " source files.\n" +#if ! defined (__WIN32__) || defined (_POSIX_VERSION) +"\n" +" -pthread Add -pthread to link command.\n" +#endif "\n" " -RDIR Add -RDIR to link command.\n" "\n" @@ -312,29 +321,33 @@ " -p VAR, --print VAR Print configuration variable VAR. Recognized\n" " variables are:\n" "\n" -" ALL_CFLAGS FFTW3F_LDFLAGS\n" -" ALL_CXXFLAGS FFTW3F_LIBS\n" -" ALL_FFLAGS FLIBS\n" -" ALL_LDFLAGS FPICFLAG\n" -" AR INCFLAGS\n" -" BLAS_LIBS LAPACK_LIBS\n" -" CC LDFLAGS\n" -" CFLAGS LD_CXX\n" -" CPICFLAG LD_STATIC_FLAG\n" -" CPPFLAGS LFLAGS\n" -" CXX LIBOCTAVE\n" -" CXXFLAGS LIBOCTINTERP\n" -" CXXPICFLAG LIBS\n" -" DEPEND_EXTRA_SED_PATTERN OCTAVE_LIBS\n" -" DEPEND_FLAGS OCTAVE_LINK_DEPS\n" -" DL_LD OCT_LINK_DEPS\n" -" DL_LDFLAGS RANLIB\n" -" EXEEXT RDYNAMIC_FLAG\n" -" F77 READLINE_LIBS\n" -" F77_INTEGER_8_FLAG SED\n" -" FFLAGS XTRA_CFLAGS\n" -" FFTW3_LDFLAGS XTRA_CXXFLAGS\n" -" FFTW3_LIBS\n" +" ALL_CFLAGS INCFLAGS\n" +" ALL_CXXFLAGS INCLUDEDIR\n" +" ALL_FFLAGS LAPACK_LIBS\n" +" ALL_LDFLAGS LD_CXX\n" +" AR LDFLAGS\n" +" BLAS_LIBS LD_STATIC_FLAG\n" +" CC LFLAGS\n" +" CFLAGS LIBDIR\n" +" CPICFLAG LIBOCTAVE\n" +" CPPFLAGS LIBOCTINTERP\n" +" CXX LIBS\n" +" CXXFLAGS OCTAVE_HOME\n" +" CXXPICFLAG OCTAVE_LIBS\n" +" DEPEND_EXTRA_SED_PATTERN OCTAVE_LINK_DEPS\n" +" DEPEND_FLAGS OCTAVE_LINK_OPTS\n" +" DL_LD OCTAVE_PREFIX\n" +" DL_LDFLAGS OCTINCLUDEDIR\n" +" F77 OCTLIBDIR\n" +" F77_INTEGER8_FLAG OCT_LINK_DEPS\n" +" FFLAGS OCT_LINK_OPTS\n" +" FFTW3F_LDFLAGS RANLIB\n" +" FFTW3F_LIBS RDYNAMIC_FLAG\n" +" FFTW3_LDFLAGS READLINE_LIBS\n" +" FFTW3_LIBS SED\n" +" FFTW_LIBS SPECIAL_MATH_LIB\n" +" FLIBS XTRA_CFLAGS\n" +" FPICFLAG XTRA_CXXFLAGS\n" "\n" " --link-stand-alone Link a stand-alone executable file.\n" "\n" @@ -523,6 +536,12 @@ { ldflags += (" " + arg); } +#if ! defined (__WIN32__) || defined (_POSIX_VERSION) + else if (arg == "-pthread") + { + ldflags += (" " + arg); + } +#endif else if (arg == "-M" || arg == "-depend" || arg == "--depend") { depend = true; @@ -779,7 +798,7 @@ + objfiles + " " + libfiles + " " + ldflags + " " + vars["LFLAGS"] + " -loctinterp -loctave " - + " " + vars["OCT_LINK_OPTS"] + + " " + vars["OCTAVE_LINK_OPTS"] + " " + vars["OCTAVE_LINK_DEPS"]; result = run_command (cmd); }
deleted file mode 100644 --- a/src/mkoctfile.in.sh +++ /dev/null @@ -1,561 +0,0 @@ -#! /bin/sh -## -## mkoctfile -- create a .oct file suitable for dynamic linking by -## Octave. -## -## Copyright (C) 1996-2013 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -# Exit immediately on any error. - -set -e - -: ${SED=%OCTAVE_CONF_SED%} - -OCTAVE_VERSION=%OCTAVE_CONF_VERSION% -OCTAVE_PREFIX=%OCTAVE_CONF_PREFIX% - -DEFAULT_BINDIR=%OCTAVE_BINDIR% -DEFAULT_INCLUDEDIR=%OCTAVE_CONF_INCLUDEDIR% -DEFAULT_LIBDIR=%OCTAVE_CONF_LIBDIR% -DEFAULT_OCTINCLUDEDIR=%OCTAVE_CONF_OCTINCLUDEDIR% -DEFAULT_OCTLIBDIR=%OCTAVE_CONF_OCTLIBDIR% - -if [ -n "$OCTAVE_HOME" ]; then - DEFAULT_BINDIR="`echo $DEFAULT_BINDIR | $SED "s,^$OCTAVE_PREFIX,$OCTAVE_HOME,"`" - DEFAULT_INCLUDEDIR="`echo $DEFAULT_INCLUDEDIR | $SED "s,^$OCTAVE_PREFIX,$OCTAVE_HOME,"`" - DEFAULT_LIBDIR="`echo $DEFAULT_LIBDIR | $SED "s,^$OCTAVE_PREFIX,$OCTAVE_HOME,"`" - DEFAULT_OCTINCLUDEDIR="`echo $DEFAULT_OCTINCLUDEDIR | $SED "s,^$OCTAVE_PREFIX,$OCTAVE_HOME,"`" - DEFAULT_OCTLIBDIR="`echo $DEFAULT_OCTLIBDIR | $SED "s,^$OCTAVE_PREFIX,$OCTAVE_HOME,"`" -fi - -: ${BINDIR=$DEFAULT_BINDIR} -: ${INCLUDEDIR=$DEFAULT_INCLUDEDIR} -: ${LIBDIR=$DEFAULT_LIBDIR} -: ${OCTINCLUDEDIR=$DEFAULT_OCTINCLUDEDIR} -: ${OCTLIBDIR=$DEFAULT_OCTLIBDIR} - -DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR/.. -I$OCTINCLUDEDIR" -if [ "$INCLUDEDIR" != /usr/include ]; then - DEFAULT_INCFLAGS="$DEFAULT_INCFLAGS -I$INCLUDEDIR" -fi - -DEFAULT_LFLAGS="-L$OCTLIBDIR" -if [ "$LIBDIR" != /usr/lib ]; then - DEFAULT_LFLAGS="$DEFAULT_LFLAGS -L$LIBDIR" -fi - -# Default values for these variables are filled in when Octave is -# compiled. - -: ${EXEEXT=%OCTAVE_CONF_EXEEXT%} - -: ${CPPFLAGS=%OCTAVE_CONF_CPPFLAGS%} -: ${INCFLAGS=$DEFAULT_INCFLAGS} -: ${F77=%OCTAVE_CONF_MKOCTFILE_F77%} -: ${FFLAGS=%OCTAVE_CONF_FFLAGS%} -: ${FPICFLAG=%OCTAVE_CONF_FPICFLAG%} -: ${CC=%OCTAVE_CONF_MKOCTFILE_CC%} -: ${CFLAGS=%OCTAVE_CONF_CFLAGS%} -: ${CPICFLAG=%OCTAVE_CONF_CPICFLAG%} -: ${CXX=%OCTAVE_CONF_MKOCTFILE_CXX%} -: ${CXXFLAGS=%OCTAVE_CONF_CXXFLAGS%} -: ${CXXPICFLAG=%OCTAVE_CONF_CXXPICFLAG%} -: ${XTRA_CFLAGS=%OCTAVE_CONF_XTRA_CFLAGS%} -: ${XTRA_CXXFLAGS=%OCTAVE_CONF_XTRA_CXXFLAGS%} - -: ${AR=%OCTAVE_CONF_MKOCTFILE_AR%} -: ${RANLIB=%OCTAVE_CONF_MKOCTFILE_RANLIB%} - -: ${DEPEND_FLAGS=%OCTAVE_CONF_DEPEND_FLAGS%} -: ${DEPEND_EXTRA_SED_PATTERN=%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%} - -: ${DL_LD=%OCTAVE_CONF_MKOCTFILE_DL_LD%} -: ${DL_LDFLAGS=%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%} - -: ${RDYNAMIC_FLAG=%OCTAVE_CONF_RDYNAMIC_FLAG%} -: ${LIBOCTAVE=-loctave} -: ${LIBOCTINTERP=-loctinterp} -: ${READLINE_LIBS=-lreadline} -: ${LAPACK_LIBS=%OCTAVE_CONF_LAPACK_LIBS%} -: ${BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%} -: ${FFTW3_LDFLAGS=%OCTAVE_CONF_FFTW3_LDFLAGS%} -: ${FFTW3_LIBS=%OCTAVE_CONF_FFTW3_LIBS%} -: ${FFTW3F_LDFLAGS=%OCTAVE_CONF_FFTW3F_LDFLAGS%} -: ${FFTW3F_LIBS=%OCTAVE_CONF_FFTW3F_LIBS%} -: ${LIBS=%OCTAVE_CONF_LIBS%} -: ${FLIBS=%OCTAVE_CONF_FLIBS%} -: ${OCTAVE_LINK_DEPS=%OCTAVE_CONF_OCTAVE_LINK_DEPS%} -: ${OCTAVE_LINK_OPTS=%OCTAVE_CONF_OCTAVE_LINK_OPTS%} -: ${OCT_LINK_DEPS=%OCTAVE_CONF_OCT_LINK_DEPS%} -: ${OCT_LINK_OPTS=%OCTAVE_CONF_OCT_LINK_OPTS%} -: ${LD_CXX=%OCTAVE_CONF_MKOCTFILE_LD_CXX%} -: ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} -: ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} -: ${LFLAGS=$DEFAULT_LFLAGS} -: ${F77_INTEGER_8_FLAG=%OCTAVE_CONF_F77_INTEGER_8_FLAG%} - -: ${ALL_FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"} - -: ${ALL_CFLAGS="$INCFLAGS $XTRA_CFLAGS $CFLAGS"} - -: ${ALL_CXXFLAGS="$INCFLAGS $XTRA_CXXFLAGS $CXXFLAGS"} - -: ${ALL_LDFLAGS="$LD_STATIC_FLAG $CPICFLAG $LDFLAGS"} - -: ${OCTAVE_LIBS="$LIBOCTINTERP $LIBOCTAVE $SPECIAL_MATH_LIB"} - -# Local variables. - -FFTW_LIBS="$FFTW3_LDFLAGS $FFTW3_LIBS $FFTW3F_LDFLAGS $FFTW3F_LIBS" - -usage_msg="usage: mkoctfile [options] file ..." - -version_msg="mkoctfile, version $OCTAVE_VERSION" - -cfiles= -ccfiles= -f77files= -objfiles= -libfiles= -octfiles= -octfile= -outputfile= -incflags= -defs= -ldflags= -dbg=: -pass_on_options= -strip=false -no_oct_file_strip_on_this_platform=%NO_OCT_FILE_STRIP% -link=true -link_stand_alone=false -output_ext=".oct" -depend=false -compile=true - -if [ $# -eq 0 ]; then - echo $usage_msg 1>&2 - exit 1 -fi - -if [ $# -eq 1 ]; then - case "$1" in - -v | -version | --version) - echo $version_msg 1>&2 - exit 0 - ;; - esac -fi - -while [ $# -gt 0 ]; do - file= - case "$1" in - *.c) - file=$1 - cfiles="$cfiles $file" - ;; - *.cc | *.C | *.cpp) - file=$1 - ccfiles="$ccfiles $file" - ;; - *.f | *.F | *.f90 | *.F90) - file=$1 - f77files="$f77files $file" - ;; - *.o) - file=$1 - objfiles="$objfiles $file" - ;; - *.a) - file=$1 - libfiles="$libfiles $file" - ;; - -d | -debug | --debug | -v | -verbose | --verbose) - dbg=echo - ;; - -h | -\? | -help | --help) - echo $usage_msg 1>&2 - cat << EOF - -Options: - - -h, -?, --help Print this message. - - -IDIR Add -IDIR to compile commands. - - -idirafter DIR Add -idirafter DIR to compile commands. - - -DDEF Add -DDEF to compile commands. - - -lLIB Add -lLIB to link command. - - -LDIR Add -LDIR to link command. - - -RDIR Add -RDIR to link command. - - -g Enable debugging option for all compilers. - - -pthread Add -pthread to link command. - - -W... Pass flags to the compiler such as -Wa,OPTION. - - -Wl,... Pass flags to the linker such as -Wl,-rpath=... - - -M, --depend Generate dependency files (.d) for C and C++ - source files. - - -c, --compile Compile, but do not link. - - --link-stand-alone Link a stand-alone executable file. - - -s, --strip Strip output file. - - --mex Create a MEX file. - Set the default output extension to ".mex". - - -o FILE, --output FILE Output file name. Default extension is .oct - (or .mex if --mex is specified) unless linking - a stand-alone executable. - - -p VAR, --print VAR Print configuration variable VAR. Recognized - variables are: - - ALL_CFLAGS FFTW3F_LDFLAGS - ALL_CXXFLAGS FFTW3F_LIBS - ALL_FFLAGS FLIBS - ALL_LDFLAGS FPICFLAG - AR INCFLAGS - BLAS_LIBS LAPACK_LIBS - CC LDFLAGS - CFLAGS LD_CXX - CPICFLAG LD_STATIC_FLAG - CPPFLAGS LFLAGS - CXX LIBOCTAVE - CXXFLAGS LIBOCTINTERP - CXXPICFLAG LIBS - DEPEND_EXTRA_SED_PATTERN OCTAVE_LIBS - DEPEND_FLAGS OCTAVE_LINK_DEPS - DL_LD OCT_LINK_DEPS - DL_LDFLAGS RANLIB - EXEEXT RDYNAMIC_FLAG - F77 READLINE_LIBS - F77_INTEGER_8_FLAG SED - FFLAGS XTRA_CFLAGS - FFTW3_LDFLAGS XTRA_CXXFLAGS - FFTW3_LIBS - - - -v, --verbose Echo commands as they are executed. - - FILE Compile or link FILE. Recognized file types are: - - .c C source - .cc C++ source - .C C++ source - .cpp C++ source - .f Fortran source (fixed form) - .F Fortran source (fixed form) - .f90 Fortran source (free form) - .F90 Fortran source (free form) - .o object file - .a library file - -EOF - exit 0 - ;; - -I*) - incflags="$incflags $1" - ;; - -idirafter) - shift - if [ $# -gt 0 ]; then - incflags="$incflags -idirafter $1" - else - echo "mkoctfile: include directory name missing" 1>&2 - fi - ;; - -D*) - defs="$defs $1" - ;; - -[lLR]* | -Wl,*) - ldflags="$ldflags $1" - ;; - -pthread) - ldflags="$ldflags $1" - ;; - -M | -depend | --depend) - depend=true - compile=false - ;; - -o | -ouput | --output) - shift - if [ $# -gt 0 ]; then - outputfile="$1" - else - echo "mkoctfile: output file name missing" 1>&2 - fi - ;; - -p | -print | --print) - shift - if [ $# -gt 0 ]; then - eval echo \${$1} - exit 0 - else - echo "mkoctfile: --print requires argument" 1>&2 - exit 1 - fi - ;; - -s | -strip | --strip) - if $no_oct_file_strip_on_this_platform; then - echo "mkoctfile: stripping disabled on this platform" 1>&2 - else - strip=true - fi - ;; - -c | -compile | --compile) - link=false - ;; - -g) - ALL_CFLAGS="$ALL_CFLAGS -g" - ALL_CXXFLAGS="$ALL_CXXFLAGS -g" - ALL_FFLAGS="$ALL_FFLAGS -g" - ;; - -link-stand-alone | --link-stand-alone) - link_stand_alone=true - ;; - -mex | --mex) - incflags="$incflags -I." - output_ext=".mex" - ;; - -W*) - pass_on_options="$pass_on_options $1" - ;; - *) - echo "mkoctfile: unrecognized argument $1" 1>&2 - exit 1 - ;; - esac - if [ -n "$file" ]; then - if [ -z "$octfile" ]; then - octfile="$file" - fi - fi - shift -done - -if $link_stand_alone; then - if [ -n "$outputfile" ]; then - output_option="-o $outputfile" - fi -else - if [ -n "$outputfile" ]; then - octfile="$outputfile" - case "$octfile" in - *$output_ext) - ;; - *) - octfile="$octfile$output_ext" - ;; - esac - else - octfile=`basename $octfile` - octfile=`echo $octfile | $SED 's,\.[^.]*$,,'`$output_ext - fi -fi - -# Generate dependency files for C and C++ files. - -if $depend; then - if [ -n "$cfiles" ]; then - for f in $cfiles; do - b=`echo $f | $SED 's,\.c$,,'` - d=$b.d - cmd="rm -f $d" - $dbg $cmd - eval $cmd - cmd="$CC $DEPEND_FLAGS $CPPFLAGS $ALL_CFLAGS $incflags $def $f | $SED $DEPEND_EXTRA_SED_PATTERN -e 's,^[^:]*/\(.*\.o\):,\1:,' -e 's,$b\.o,pic/& & $d,g' > $d-t && mv $d-t $d" - $dbg $cmd - eval $cmd - done - fi - - if [ -n "$ccfiles" ]; then - for f in $ccfiles; do - case $f in - *.cc) - b=`echo $f | $SED 's,\.cc$,,'` - ;; - *.C) - b=`echo $f | $SED 's,\.C$,,'` - ;; - *.cpp) - b=`echo $f | $SED 's,\.cpp$,,'` - ;; - esac - d=$b.d - cmd="rm -f $d" - $dbg $cmd - eval $cmd - cmd="$CXX $DEPEND_FLAGS $CPPFLAGS $ALL_CXXFLAGS $incflags $defs $f | $SED $DEPEND_EXTRA_SED_PATTERN -e 's,^[^:]*/\(.*\.o\):,\1:,' -e 's,$b\.o,pic/& & $d,g' > $d-t && mv $d-t $d" - $dbg $cmd - eval $cmd - done - fi - # If generating dependencies, that's all we do. - exit 0 -fi - -# Compile Fortran, C, and C++ files. Add the name of each object file -# that is produced to the overall list of object files. - -if [ -n "$f77files" ]; then - for f in $f77files; do - case $f in - *.f) - b=`echo $f | $SED 's,.*/,,; s,\.f$,,'` - ;; - *.F) - b=`echo $f | $SED 's,.*/,,; s,\.F$,,'` - ;; - *.f90) - b=`echo $f | $SED 's,.*/,,; s,\.f90$,,'` - ;; - *.F90) - b=`echo $f | $SED 's,.*/,,; s,\.F90$,,'` - ;; - esac - if [ -n "$F77" ]; then - if [ -n "$outputfile" ]; then - if $link; then - o=$b.o - else - o=$outputfile - fi - else - o=$b.o - fi - objfiles="$objfiles $o" - cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $incflags $defs $pass_on_options $f -o $o" - $dbg $cmd - eval $cmd - else - echo "mkoctfile: no way to compile Fortran file $f" 1>&2 - fi - done -fi - -if [ -n "$cfiles" ]; then - for f in $cfiles; do - if [ -n "$CC" ]; then - b=`echo $f | $SED 's,.*/,,; s,\.c$,,'` - if [ -n "$outputfile" ]; then - if $link; then - o=$b.o - else - o=$outputfile - fi - else - o=$b.o - fi - objfiles="$objfiles $o" - cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $pass_on_options $incflags $defs $f -o $o" - $dbg $cmd - eval $cmd - else - echo "mkoctfile: no way to compile C++ file $f" 1>&2 - fi - done -fi - -if [ -n "$ccfiles" ]; then - for f in $ccfiles; do - if [ -n "$CXX" ]; then - case $f in - *.cc) - b=`echo $f | $SED 's,.*/,,; s,\.cc$,,'` - ;; - *.C) - b=`echo $f | $SED 's,.*/,,; s,\.C$,,'` - ;; - *.cpp) - b=`echo $f | $SED 's,.*/,,; s,\.cpp$,,'` - ;; - esac - if [ -n "$outputfile" ]; then - if $link; then - o=$b.o - else - o=$outputfile - fi - else - o=$b.o - fi - objfiles="$objfiles $o" - cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $pass_on_options $incflags $defs $f -o $o" - $dbg $cmd - eval $cmd - else - echo "mkoctfile: no way to compile C++ file $f" 1>&2 - fi - done -fi - -## Uncomment the following group of lines if you get `Text file busy' -## errors from ld. This may happen if the .oct file is currently -## running while you are trying to recompile it. We try moving first, -## since on some systems (HP-UX, maybe others) it is possible to -## rename running programs but not remove them. - -## if [ -f "$octfile" ]; then -## cmd="mv $octfile $octfile.bak" -## $dbg $cmd -## eval $cmd -## cmd="rm -f $octfile.bak" -## $dbg $cmd -## eval $cmd -## fi - -# Link all the object files. - -if $link && [ -n "$objfiles" ]; then - if $link_stand_alone; then - if [ -n "$LD_CXX" ]; then - cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $libfiles $ldflags $LFLAGS -loctinterp -loctave $OCTAVE_LINK_OPTS $OCTAVE_LINK_DEPS" - $dbg $cmd - eval $cmd - else - echo "mkoctfile: no way to link stand-alone executable file" 1>&2 - exit 1 - fi - else - cmd="$DL_LD $DL_LDFLAGS $pass_on_options -o $octfile $objfiles $libfiles $ldflags $LFLAGS -loctinterp -loctave $OCT_LINK_OPTS $OCT_LINK_DEPS" - $dbg $cmd - eval $cmd - fi - -# Maybe strip it. - - if $strip; then - cmd="strip $octfile" - $dbg $cmd - eval $cmd - fi -fi - -exit 0
--- a/src/octave-config.in.cc +++ b/src/octave-config.in.cc @@ -53,23 +53,23 @@ " -p VAR, --print VAR Print the value of the given configuration\n" " variable VAR. Recognized variables are:\n" "\n" -" API_VERSION LOCALAPIARCHLIBDIR\n" -" CANONICAL_HOST_TYPE LOCALAPIFCNFILEDIR\n" -" DEFAULT_PAGER LOCALAPIOCTFILEDIR\n" +" API_VERSION LOCALAPIOCTFILEDIR\n" " ARCHLIBDIR LOCALARCHLIBDIR\n" " BINDIR LOCALFCNFILEDIR\n" -" DATADIR LOCALOCTFILEDIR\n" -" DATAROOTDIR LOCALSTARTUPFILEDIR\n" -" EXEC_PREFIX LOCALVERARCHLIBDIR\n" -" FCNFILEDIR LOCALVERFCNFILEDIR\n" -" LOCALVEROCTFILEDIR MAN1DIR\n" -" IMAGEDIR MANDIR\n" -" MAN1EXT OCTFILEDIR\n" -" INCLUDEDIR OCTINCLUDEDIR\n" -" INFODIR OCTLIBDIR\n" -" INFOFILE PREFIX\n" -" LIBDIR STARTUPFILEDIR\n" -" LIBEXECDIR VERSION\n" +" CANONICAL_HOST_TYPE LOCALOCTFILEDIR\n" +" DATADIR LOCALSTARTUPFILEDIR\n" +" DATAROOTDIR LOCALVERARCHLIBDIR\n" +" DEFAULT_PAGER LOCALVERFCNFILEDIR\n" +" EXEC_PREFIX LOCALVEROCTFILEDIR\n" +" FCNFILEDIR MAN1DIR\n" +" IMAGEDIR MAN1EXT\n" +" INCLUDEDIR MANDIR\n" +" INFODIR OCTFILEDIR\n" +" INFOFILE OCTINCLUDEDIR\n" +" LIBDIR OCTLIBDIR\n" +" LIBEXECDIR PREFIX\n" +" LOCALAPIARCHLIBDIR STARTUPFILEDIR\n" +" LOCALAPIFCNFILEDIR VERSION\n" "\n" " -v, --version Print the Octave version number.\n" "\n";
deleted file mode 100644 --- a/src/octave-config.in.sh +++ /dev/null @@ -1,169 +0,0 @@ -#! /bin/sh - -## -## octave-config - reports some configuration values for Octave -## -## Copyright (C) 2001-2013 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. -## -## Original version by Rafael Laboissiere <rafael@laboissiere.net> -## distributed as free software in the public domain. - -API_VERSION=%OCTAVE_API_VERSION% -CANONICAL_HOST_TYPE=%OCTAVE_CANONICAL_HOST_TYPE% -DEFAULT_PAGER=%OCTAVE_DEFAULT_PAGER% -ARCHLIBDIR=%OCTAVE_ARCHLIBDIR% -BINDIR=%OCTAVE_BINDIR% -DATADIR=%OCTAVE_DATADIR% -DATAROOTDIR=%OCTAVE_DATAROOTDIR% -EXEC_PREFIX=%OCTAVE_EXEC_PREFIX% -FCNFILEDIR=%OCTAVE_FCNFILEDIR% -IMAGEDIR=%OCTAVE_IMAGEDIR% -INCLUDEDIR=%OCTAVE_INCLUDEDIR% -INFODIR=%OCTAVE_INFODIR% -INFOFILE=%OCTAVE_INFOFILE% -LIBDIR=%OCTAVE_LIBDIR% -LIBEXECDIR=%OCTAVE_LIBEXECDIR% -LOCALAPIARCHLIBDIR=%OCTAVE_LOCALAPIARCHLIBDIR% -LOCALAPIFCNFILEDIR=%OCTAVE_LOCALAPIFCNFILEDIR% -LOCALAPIOCTFILEDIR=%OCTAVE_LOCALAPIOCTFILEDIR% -LOCALARCHLIBDIR=%OCTAVE_LOCALARCHLIBDIR% -LOCALFCNFILEDIR=%OCTAVE_LOCALFCNFILEDIR% -LOCALOCTFILEDIR=%OCTAVE_LOCALOCTFILEDIR% -LOCALSTARTUPFILEDIR=%OCTAVE_LOCALSTARTUPFILEDIR% -LOCALVERARCHLIBDIR=%OCTAVE_LOCALVERARCHLIBDIR% -LOCALVERFCNFILEDIR=%OCTAVE_LOCALVERFCNFILEDIR% -LOCALVEROCTFILEDIR=%OCTAVE_LOCALVEROCTFILEDIR% -MAN1DIR=%OCTAVE_MAN1DIR% -MAN1EXT=%OCTAVE_MAN1EXT% -MANDIR=%OCTAVE_MANDIR% -OCTFILEDIR=%OCTAVE_OCTFILEDIR% -OCTINCLUDEDIR=%OCTAVE_OCTINCLUDEDIR% -OCTLIBDIR=%OCTAVE_OCTLIBDIR% -PREFIX=%OCTAVE_PREFIX% -STARTUPFILEDIR=%OCTAVE_STARTUPFILEDIR% -VERSION=%OCTAVE_VERSION% -SED=%SED% - -if [ -n "$OCTAVE_HOME" ]; then - ARCHLIBDIR="`echo $ARCHLIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - BINDIR="`echo $BINDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - DATADIR="`echo $DATADIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - DATAROOTDIR="`echo $DATAROOTDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - EXEC_PREFIX="`echo $EXEC_PREFIX | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - FCNFILEDIR="`echo $FCNFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - IMAGEDIR="`echo $IMAGEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - INCLUDEDIR="`echo $INCLUDEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - INFODIR="`echo $INFODIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - INFOFILE="`echo $INFOFILE | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LIBDIR="`echo $LIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LIBEXECDIR="`echo $LIBEXECDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALAPIARCHLIBDIR="`echo $LOCALAPIARCHLIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALAPIFCNFILEDIR="`echo $LOCALAPIFCNFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALAPIOCTFILEDIR="`echo $LOCALAPIOCTFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALARCHLIBDIR="`echo $LOCALARCHLIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALFCNFILEDIR="`echo $LOCALFCNFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALOCTFILEDIR="`echo $LOCALOCTFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALSTARTUPFILEDIR="`echo $LOCALSTARTUPFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALVERARCHLIBDIR="`echo $LOCALVERARCHLIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALVERFCNFILEDIR="`echo $LOCALVERFCNFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - LOCALVEROCTFILEDIR="`echo $LOCALVEROCTFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - MAN1DIR="`echo $MAN1DIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - MANDIR="`echo $MANDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - OCTFILEDIR="`echo $OCTFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - OCTINCLUDEDIR="`echo $OCTINCLUDEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - OCTLIBDIR="`echo $OCTLIBDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - STARTUPFILEDIR="`echo $STARTUPFILEDIR | $SED "s,^$PREFIX,$OCTAVE_HOME,"`" - - PREFIX="$OCTAVE_HOME" -fi - -usage_msg="usage: octave-config [options]" - -if [ $# -eq 0 ]; then - echo "$usage_msg" 1>&2 - exit 1 -fi - -while [ $# -gt 0 ] -do - case "$1" in - -h | -\? | --help) - echo "$usage_msg" - cat << EOF - -Options: - - -h, -?, --help Print this message. - - --m-site-dir Print the name of the directory where Octave - expects to find locally installed .m files. - - --oct-site-dir Print the name of the directory where Octave - expects to find locally installed .oct files. - - -p VAR, --print VAR Print the value of the given configuration - variable VAR. Recognized variables are: - - API_VERSION LOCALAPIOCTFILEDIR - ARCHLIBDIR LOCALARCHLIBDIR - BINDIR LOCALFCNFILEDIR - CANONICAL_HOST_TYPE LOCALOCTFILEDIR - DATADIR LOCALSTARTUPFILEDIR - DATAROOTDIR LOCALVERARCHLIBDIR - DEFAULT_PAGER LOCALVERFCNFILEDIR - EXEC_PREFIX LOCALVEROCTFILEDIR - FCNFILEDIR MAN1DIR - IMAGEDIR MAN1EXT - INCLUDEDIR MANDIR - INFODIR OCTFILEDIR - INFOFILE OCTINCLUDEDIR - LIBDIR OCTLIBDIR - LIBEXECDIR PREFIX - LOCALAPIARCHLIBDIR STARTUPFILEDIR - LOCALAPIFCNFILEDIR VERSION - - -v, --version Print the Octave version number. - -EOF - exit 0 - ;; - --m-site-dir) - echo $LOCALVERFCNFILEDIR - ;; - --oct-site-dir) - echo $LOCALVEROCTFILEDIR - ;; - -v | --version) - echo $VERSION - ;; - -p | --print) - opt="$1" - shift - if [ $# -eq 0 ]; then - echo "octave-config: $opt option requires argument" 1>&2 - exit 1 - fi - eval echo \${$1} - ;; - *) - echo "octave-config: unrecognized argument $1" 2>&1 - exit 1 - ;; - esac - shift -done