Re: [Maxima-commits] CVS: maxima configure.in,1.35,1.36



Raymond Toy <toy@rtp.ericsson.se> writes:

> >>>>> "James" == James Amundson <amundson@users.sourceforge.net> writes:
> 
>     James>  	[CMUCL_NAME=${cmucl_default_name}])
>     James> +AC_ARG_WITH(cmucl-runtime,
>     James> +	[  --with-cmucl-runtime=<path>	Use cmucl runtime <path> (default
>     James> +	   *cmucl-lib*/../bin/lisp)],
>     James> +	[cmucl=true
>     James> +	CMUCL_RUNTIME_PATH="$withval"
>     James> +	CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`],
>     James> +	[CMUCL_RUNTIME_PATH=`${CMUCL_NAME} -quiet -batch -eval '(format t "~a/../bin/lisp~%" common-lisp::*cmucl-lib*)(quit)'`
> 
> You might want to add -noinit and -nositeinit.  Not sure.

And also -norc for CLISP since otherwise it sends messages like `;;
Loading file /home/wolfgang/.clisprc ...' to stdout before returning
the desired path, which makes configure hang.

Further, we need a working cmucl to determine the default
CMUCL_RUNTIME_PATH if it was not supplied by the user via the
corresponding configure option.  Similarly for CLISP.

The following patch seems to do this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: configure.in
===================================================================
RCS file: /cvsroot/maxima/maxima/configure.in,v
retrieving revision 1.37
diff -u -r1.37 configure.in
--- configure.in	24 Nov 2003 13:02:12 -0000	1.37
+++ configure.in	25 Nov 2003 04:27:14 -0000
@@ -52,12 +52,13 @@
 	[clisp=true
 	CLISP_RUNTIME_PATH="$withval"
 	CLISP_RUNTIME=`basename ${CLISP_RUNTIME_PATH}`],
-	[if test x"${win32}" = xtrue ; then 
-	    CLISP_RUNTIME_PATH=`${CLISP_NAME} -q -x "(format nil \"~a\\\\\\\\${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
-	 else
-	    CLISP_RUNTIME_PATH=`${CLISP_NAME} -q -x "(format nil \"~abase/${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
-	 fi
-])
+	[if test x"${clisp}" = xtrue; then
+		if test x"${win32}" = xtrue ; then
+			CLISP_RUNTIME_PATH=`${CLISP_NAME} -q -norc -x "(format nil \"~a\\\\\\\\${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
+		else
+			CLISP_RUNTIME_PATH=`${CLISP_NAME} -q -norc -x "(format nil \"~abase/${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
+		fi
+	fi])
 if test x"${clisp}" = xtrue ; then
 	if test `echo "$CLISP_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
 		if test -x "$CLISP_NAME" ; then
@@ -106,8 +107,10 @@
 	[cmucl=true
 	CMUCL_RUNTIME_PATH="$withval"
 	CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`],
-	[CMUCL_RUNTIME_PATH=`${CMUCL_NAME} -quiet -batch -eval '(format t "~a/../bin/lisp~%" common-lisp::*cmucl-lib*)(quit)'`
-	CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`])
+	[if test x"${cmucl}" = xtrue; then
+		CMUCL_RUNTIME_PATH=`${CMUCL_NAME} -quiet -batch -eval '(format t "~a/../bin/lisp~%" common-lisp::*cmucl-lib*)(quit)'`
+		CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`
+	fi])
 if test x"${cmucl}" = xtrue ; then
 	if test `echo "$CMUCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
 		if test -x "$CMUCL_NAME" ; then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wolfgang