Mercurial > hg > octave-lyh
changeset 7111:9c73ef1819c7
[project @ 2007-11-06 22:47:35 by jwe]
author | jwe |
---|---|
date | Tue, 06 Nov 2007 22:47:35 +0000 |
parents | 0e63f1126f01 |
children | f90a8188c9c2 |
files | scripts/ChangeLog scripts/pkg/pkg.m |
diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,4 +1,7 @@ -2007-11-06 John W. Eaton <jwe@octave.org> +2007-11-06 Thomas Treichl <Thomas.Treichl@gmx.net> + + * pkg/pkg.m.m: Check for environment variables CC, CXX, AR, RANLIB + when calling ./configure and add quotes to preserve spaces. 2007-11-06 Kai Habel <kai.habel@gmx.de>
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -1019,12 +1019,21 @@ src = fullfile (packdir, "src"); ## configure if (exist (fullfile (src, "configure"), "file")) + flags = ""; + if (isempty (getenv ("CC"))) + flags = strcat (flags, " CC=\"", octave_config_info ("CC"), "\""); + endif + if (isempty (getenv ("CXX"))) + flags = strcat (flags, " CXX=\"", octave_config_info ("CXX"), "\""); + endif + if (isempty (getenv ("AR"))) + flags = strcat (flags, " AR=\"", octave_config_info ("AR"), "\""); + endif + if (isempty (getenv ("RANLIB"))) + flags = strcat (flags, " RANLIB=\"", octave_config_info ("RANLIB"), "\""); + endif [status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"", - desc.dir, "\"", - " CC=", octave_config_info ("CC"), - " CXX=", octave_config_info ("CXX"), - " AR=", octave_config_info ("AR"), - " RANLIB=", octave_config_info ("RANLIB"))); + desc.dir, "\"", flags)); if (status != 0) rm_rf (desc.dir); error ("the configure script returned the following error: %s", output);