aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/driver/utils.c29
-rw-r--r--src/driver/utils.h33
5 files changed, 51 insertions, 37 deletions
diff --git a/configure b/configure
index 9e90ac05..67577c7d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-11-16.
+# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-11-19.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.4.0-2010-11-16'
-PACKAGE_STRING='OpenAxiom 1.4.0-2010-11-16'
+PACKAGE_VERSION='1.4.0-2010-11-19'
+PACKAGE_STRING='OpenAxiom 1.4.0-2010-11-19'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
PACKAGE_URL=''
@@ -1456,7 +1456,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.4.0-2010-11-16 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.4.0-2010-11-19 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1526,7 +1526,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-11-16:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-11-19:";;
esac
cat <<\_ACEOF
@@ -1635,7 +1635,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.4.0-2010-11-16
+OpenAxiom configure 1.4.0-2010-11-19
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2527,7 +2527,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.4.0-2010-11-16, which was
+It was created by OpenAxiom $as_me 1.4.0-2010-11-19, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -18075,7 +18075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.4.0-2010-11-16, which was
+This file was extended by OpenAxiom $as_me 1.4.0-2010-11-19, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18141,7 +18141,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenAxiom config.status 1.4.0-2010-11-16
+OpenAxiom config.status 1.4.0-2010-11-19
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 391bf91f..0bcfbd26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ dnl Most of the macros used in this configure.ac are defined in files
dnl located in the subdirectory config/
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.4.0-2010-11-16],
+AC_INIT([OpenAxiom], [1.4.0-2010-11-19],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/src/ChangeLog b/src/ChangeLog
index c0d548c0..52df643c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * driver/utils.c (openaxiom_allocate_argv): New.
+ (openaxiom_build_rts_options): Use it. Tidy. Handle Clozure CL
+ and CLISP.
+
2010-11-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/g-opt.boot ($VMsideEffectFreeOperators): Include %s2c
diff --git a/src/driver/utils.c b/src/driver/utils.c
index ed85339d..6914c5ac 100644
--- a/src/driver/utils.c
+++ b/src/driver/utils.c
@@ -113,6 +113,15 @@ openaxiom_make_path_for(const char* prefix, openaxiom_driver driver)
return execpath;
}
+/* Allocate a nul-terminated vector for holding pointers to arguments
+ for the base Lisp runtime. */
+static void
+openaxiom_allocate_argv(openaxiom_command* command, int n) {
+ command->rt_argc = n;
+ command->rt_argv = (char**) malloc((n + 1) * sizeof(char*));
+ command->rt_argv[n] = 0;
+}
+
/* Build arguments, if any, to be supplied to the runtime system
of `driver'. */
void
@@ -133,9 +142,7 @@ openaxiom_build_rts_options(openaxiom_command* command,
case openaxiom_script_driver:
switch (OPENAXIOM_BASE_RTS) {
case openaxiom_gcl_runtime:
- command->rt_argc = 3;
- command->rt_argv = (char **)
- malloc(command->rt_argc * sizeof (char*));
+ openaxiom_allocate_argv(command, 3);
command->rt_argv[0] = (char*) "-batch";
command->rt_argv[1] = (char*) "-eval";
command->rt_argv[2] =
@@ -143,14 +150,24 @@ openaxiom_build_rts_options(openaxiom_command* command,
break;
case openaxiom_sbcl_runtime:
- command->rt_argc = 4;
- command->rt_argv = (char **)
- malloc(command->rt_argc * sizeof (char*));
+ openaxiom_allocate_argv(command, 4);
command->rt_argv[0] = (char*) "--noinform";
command->rt_argv[1] = (char*) "--end-runtime-options";
command->rt_argv[2] = (char*) "--noprint";
command->rt_argv[3] = (char*) "--end-toplevel-options";
break;
+
+ case openaxiom_clozure_runtime:
+ openaxiom_allocate_argv(command, 2);
+ command->rt_argv[0] = (char*) "--quiet";
+ command->rt_argv[1] = (char*) "--batch";
+ break;
+
+ case openaxiom_clisp_runtime:
+ openaxiom_allocate_argv(command, 2);
+ command->rt_argv[0] = (char*) "--quiet";
+ command->rt_argv[1] = (char*) "-norc";
+ break;
default:
abort();
diff --git a/src/driver/utils.h b/src/driver/utils.h
index b47970da..8f56ba45 100644
--- a/src/driver/utils.h
+++ b/src/driver/utils.h
@@ -42,12 +42,8 @@
# include <windows.h>
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* A list of drivers for OpenAxiom. */
-typedef enum openaxiom_driver {
+enum openaxiom_driver {
openaxiom_unknown_driver, /* unknown driver */
openaxiom_null_driver, /* do nothing */
openaxiom_config_driver, /* print out configuration information */
@@ -56,26 +52,26 @@ typedef enum openaxiom_driver {
openaxiom_script_driver, /* start the core system in script mode. */
openaxiom_compiler_driver, /* start the core system in compiler mode. */
openaxiom_execute_driver /* Execute a command. */
-} openaxiom_driver;
+};
/* A list of runtime support systems for OpenAxiom. */
-typedef enum openaxiom_runtime {
+enum openaxiom_runtime {
openaxiom_unknown_runtime,
- openaxiom_gcl_runtime,
- openaxiom_sbcl_runtime,
- openaxiom_clisp_runtime,
- openaxiom_ecl_runtime,
- openaxiom_clozure_runtime,
- openaxiom_bemol_runtime
-} openaxiom_runtime;
+ openaxiom_gcl_runtime, /* GCL-based runtime */
+ openaxiom_sbcl_runtime, /* SBCL-based runtime */
+ openaxiom_clisp_runtime, /* CLISP-based runtime */
+ openaxiom_ecl_runtime, /* ECL-based runtime */
+ openaxiom_clozure_runtime, /* Clozure CL-based runtime */
+ openaxiom_bemol_runtime /* Bemol-based runtime */
+};
/* A description of external command to be executed. */
-typedef struct openaxiom_command {
+struct openaxiom_command {
openaxiom_process core; /* arguments for actual executable. */
char** rt_argv; /* arguments to the base RT, if any. */
int rt_argc; /* number of such arguments. */
const char* root_dir; /* path to the OpenAxiom system. */
-} openaxiom_command;
+};
const char* openaxiom_get_systemdir(int argc, char*[]);
const char* openaxiom_make_path_for(const char*, openaxiom_driver);
@@ -87,9 +83,4 @@ openaxiom_driver
openaxiom_preprocess_arguments(openaxiom_command*, int, char**);
-
-#ifdef __cplusplus
-}
-#endif
-
#endif /* OPENAXIOM_UTILS_INCLUDED */