# HG changeset patch # User jwe # Date 1194389255 0 # Node ID 9c73ef1819c7718b6d1cb45fd9e1ddfc0481ca23 # Parent 0e63f1126f01a0a1fa415a74e2d4c2501c68ef61 [project @ 2007-11-06 22:47:35 by jwe] diff -r 0e63f1126f01 -r 9c73ef1819c7 scripts/ChangeLog --- a/scripts/ChangeLog Tue Nov 06 22:36:22 2007 +0000 +++ b/scripts/ChangeLog Tue Nov 06 22:47:35 2007 +0000 @@ -1,4 +1,7 @@ -2007-11-06 John W. Eaton +2007-11-06 Thomas Treichl + + * 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 diff -r 0e63f1126f01 -r 9c73ef1819c7 scripts/pkg/pkg.m --- a/scripts/pkg/pkg.m Tue Nov 06 22:36:22 2007 +0000 +++ b/scripts/pkg/pkg.m Tue Nov 06 22:47:35 2007 +0000 @@ -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);