octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OCTAVE_HOME support in octave_config_info


From: John W. Eaton
Subject: OCTAVE_HOME support in octave_config_info
Date: Wed, 6 Dec 2006 21:42:03 -0500

On 22-Nov-2006, address@hidden wrote:

| This patch adds support for OCTAVE_HOME substitution in octave_config_info.
| 
| Michael.
| 
| Index: src/defaults.cc
| ===================================================================
| RCS file: /cvs/octave/src/defaults.cc,v
| retrieving revision 1.62
| diff -c -p -r1.62 defaults.cc
| *** src/defaults.cc     27 Oct 2006 14:02:16 -0000      1.62
| --- src/defaults.cc     22 Nov 2006 11:34:25 -0000
| *************** std::string Vsite_defaults_file;
| *** 99,105 ****
|   // Name of the FFTW wisdom program.
|   std::string Vfftw_wisdom_program;
|   
| ! static std::string
|   subst_octave_home (const std::string& s)
|   {
|     std::string retval;
| --- 99,105 ----
|   // Name of the FFTW wisdom program.
|   std::string Vfftw_wisdom_program;
|   
| ! std::string
|   subst_octave_home (const std::string& s)
|   {
|     std::string retval;
| Index: src/defaults.h.in
| ===================================================================
| RCS file: /cvs/octave/src/defaults.h.in,v
| retrieving revision 1.40
| diff -c -p -r1.40 defaults.h.in
| *** src/defaults.h.in   27 Jul 2006 19:35:22 -0000      1.40
| --- src/defaults.h.in   22 Nov 2006 11:34:25 -0000
| *************** extern std::string Vsite_defaults_file;
| *** 197,202 ****
| --- 197,204 ----
|   // Name of the FFTW wisdom program.
|   extern std::string Vfftw_wisdom_program;
|   
| + extern std::string subst_octave_home (const std::string& s);
| + 
|   extern void install_defaults (void);
|   
|   extern void set_exec_path (const std::string& path = std::string ());
| Index: src/toplev.cc
| ===================================================================
| RCS file: /cvs/octave/src/toplev.cc,v
| retrieving revision 1.190
| diff -c -p -r1.190 toplev.cc
| *** src/toplev.cc       28 Oct 2006 16:30:52 -0000      1.190
| --- src/toplev.cc       22 Nov 2006 11:34:25 -0000
| *************** specified option.\\n\\
| *** 841,847 ****
|           const char *key = conf_info[i++];
|   
|           if (key)
| !           m.assign (key, octave_value (conf_info[i++]));
|           else
|             break;
|         }
| --- 841,847 ----
|           const char *key = conf_info[i++];
|   
|           if (key)
| !           m.assign (key, octave_value (subst_octave_home (conf_info[i++])));
|           else
|             break;
|         }

I don't think we should do this to every value in the struct.  For
example, what happens if --prefix=/usr and there are things like

  FLIBS=-L/usr/lib/...

?

Also, the more I think about it, we may be expecting too much from
octave_config_info.  One purpose is to have a record of configuration
parameters.  For that, it might be best to have the information
recorded exactly as it was specified at configure time.  But we have
also been using it for getting information about how Octave is
installed.  So maybe we need two sets of information instead of just
one?  Or at least another way to ask for the things that can change if
an Octave installation is moved.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]