diff scripts/pkg/private/configure_make.m @ 15944:4803b8c138e3

use mkoctfile, not octave_config_info to get default pkg compiler tools * common.mk (MKOCTFILE_AR, MKOCTFILE_RANLIB): New variables. (do_subst_config_vals): Include MKOCTFILE_AR and MKOCTFILE_RANLIB in the list of substitutions. * configure.ac (MKOCTFILE_AR, MKOCTFILE_RANLIB): Additional mkoctfile values that receive special treatment when cross compiling. * pkg/private/configure_make.m: Use mkoctfile, not octave_config_info to get values for CC, CXX, AR, and RANLIB. * mkoctfile.in.cc, mkoctfile.in.sh (AR, RANLIB): New variables. Update usage message.
author John W. Eaton <jwe@octave.org>
date Mon, 14 Jan 2013 14:59:01 -0500
parents 5d3a684236b0
children 1de4ec2a856d
line wrap: on
line diff
--- a/scripts/pkg/private/configure_make.m
+++ b/scripts/pkg/private/configure_make.m
@@ -28,11 +28,11 @@
     src = fullfile (packdir, "src");
     octave_bindir = octave_config_info ("bindir");
     ver = version ();
-    mkoctfile = fullfile (octave_bindir, sprintf ("mkoctfile-%s", ver));
-    octave_config = fullfile (octave_bindir, sprintf ("octave-config-%s", ver));
+    mkoctfile_program = fullfile (octave_bindir, sprintf ("mkoctfile-%s", ver));
+    octave_config_program = fullfile (octave_bindir, sprintf ("octave-config-%s", ver));
     octave_binary = fullfile (octave_bindir, sprintf ("octave-%s", ver));
-    cenv = {"MKOCTFILE"; mkoctfile;
-            "OCTAVE_CONFIG"; octave_config;
+    cenv = {"MKOCTFILE"; mkoctfile_program;
+            "OCTAVE_CONFIG"; octave_config_program;
             "OCTAVE"; octave_binary;
             "INSTALLDIR"; desc.dir};
     scenv = sprintf ("%s=\"%s\" ", cenv{:});
@@ -40,16 +40,16 @@
     if (exist (fullfile (src, "configure"), "file"))
       flags = "";
       if (isempty (getenv ("CC")))
-        flags = cstrcat (flags, " CC=\"", octave_config_info ("CC"), "\"");
+        flags = cstrcat (flags, " CC=\"", mkoctfile ("-p", "CC"), "\"");
       endif
       if (isempty (getenv ("CXX")))
-        flags = cstrcat (flags, " CXX=\"", octave_config_info ("CXX"), "\"");
+        flags = cstrcat (flags, " CXX=\"", mkoctfile ("-p", "CXX"), "\"");
       endif
       if (isempty (getenv ("AR")))
-        flags = cstrcat (flags, " AR=\"", octave_config_info ("AR"), "\"");
+        flags = cstrcat (flags, " AR=\"", mkoctfile ("-p", "AR"), "\"");
       endif
       if (isempty (getenv ("RANLIB")))
-        flags = cstrcat (flags, " RANLIB=\"", octave_config_info ("RANLIB"), "\"");
+        flags = cstrcat (flags, " RANLIB=\"", mkoctfile ("-p", "RANLIB"), "\"");
       endif
       [status, output] = shell (cstrcat ("cd '", src, "'; ", scenv,
                                          "./configure --prefix=\"",