diff options
author | dos-reis <gdr@axiomatics.org> | 2008-04-01 10:18:03 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-04-01 10:18:03 +0000 |
commit | d3cb427d5ebff6f33a31692d24360a9a3f6caef5 (patch) | |
tree | 20cfb0f675788c617023aab46b6a66a1f1eb7e06 | |
parent | 792e7b4e6ec894f93a8fbe51ccf6c155997c69ec (diff) | |
download | open-axiom-d3cb427d5ebff6f33a31692d24360a9a3f6caef5.tar.gz |
* configure.ac.pamphlet: Automatically detect SBCL or Clisp.
check for BFD only if we're building custom GCL.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | configure | 66 | ||||
-rw-r--r-- | configure.ac | 40 | ||||
-rw-r--r-- | configure.ac.pamphlet | 49 |
4 files changed, 92 insertions, 68 deletions
@@ -1,3 +1,8 @@ +2008-04-01 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * configure.ac.pamphlet: Automatically detect SBCL or Clisp. + check for BFD only if we're building custom GCL. + 2008-03-26 Gabriel Dos Reis <gdr@cs.tamu.edu> * configure.ac.pamphlet (shrext_cmds): Autconf-substitute. @@ -20890,26 +20890,26 @@ fi ## We need to build our own GCL if none is avalaible, or the existing ## one is too old. if test -z $axiom_lisp; then - # Extract the first word of "gcl", so it can be a program name with args. -set dummy gcl; ac_word=$2 + for ac_prog in gcl sbcl clisp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_AXIOM_LISP+set}" = set; then +if test "${ac_cv_prog_AXIOM_LISP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $AXIOM_LISP in - [\\/]* | ?:[\\/]*) - ac_cv_path_AXIOM_LISP="$AXIOM_LISP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$AXIOM_LISP"; then + ac_cv_prog_AXIOM_LISP="$AXIOM_LISP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_AXIOM_LISP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_AXIOM_LISP="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -20917,10 +20917,9 @@ done done IFS=$as_save_IFS - ;; -esac fi -AXIOM_LISP=$ac_cv_path_AXIOM_LISP +fi +AXIOM_LISP=$ac_cv_prog_AXIOM_LISP if test -n "$AXIOM_LISP"; then { echo "$as_me:$LINENO: result: $AXIOM_LISP" >&5 echo "${ECHO_T}$AXIOM_LISP" >&6; } @@ -20930,10 +20929,13 @@ echo "${ECHO_T}no" >&6; } fi + test -n "$AXIOM_LISP" && break +done + ## A lisp may not be available AND the GCL source may also ## be missing. Instruct user to either build one or get ## the dependencies from our website. - if test -n "$AXIOM_LISP"; then + if test x$AXIOM_LISP = xgcl; then { echo "$as_me:$LINENO: checking $AXIOM_LISP version" >&5 echo $ECHO_N "checking $AXIOM_LISP version... $ECHO_C" >&6; } v=`$AXIOM_LISP -batch -eval "(format t \"~S\" (lisp-implementation-version))"` @@ -20949,11 +20951,10 @@ echo "$as_me: WARNING: $v is not supported by this version of OpenAxiom. $AXIOM esac fi if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then - { { echo "$as_me:$LINENO: error: OpenAxiom requires GCL-2.6.7 or GCL-2.6.8. Either separately build one, or get the dependency tarball from OpenAxiom download website." >&5 -echo "$as_me: error: OpenAxiom requires GCL-2.6.7 or GCL-2.6.8. Either separately build one, or get the dependency tarball from OpenAxiom download website." >&2;} + { { echo "$as_me:$LINENO: error: OpenAxiom requires a Lisp system. Either separately build one (GCL-2.6.7, GCL-2.6.8, SBCL, CLisp), or get the dependency tarball from OpenAxiom download website." >&5 +echo "$as_me: error: OpenAxiom requires a Lisp system. Either separately build one (GCL-2.6.7, GCL-2.6.8, SBCL, CLisp), or get the dependency tarball from OpenAxiom download website." >&2;} { (exit 1); exit 1; }; } fi - axiom_lisp=$AXIOM_LISP else ## Honor use of Lisp image specified on command line @@ -20993,7 +20994,7 @@ echo "$as_me: error: --with-lisp=$axiom_lisp conflicts with --enable-gcl" >&2;} { (exit 1); exit 1; }; } ;; *) - ## As of this writting, the Lisp systems ECL, GCL, and SBCL all + ## As of this writting, the Lisp systems ECL, GCL, SBCL, and CLisp all ## understands the command line option --help, though they do ## behave very differently. Some of them just print out the ## help information and exits. Others, such as GCL, think they @@ -21026,7 +21027,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -## The following is a horrible to arrange for GCL to successfully +## The following is a horrible hack to arrange for GCL to successfully ## rebuild symbol tables with "rsym" on Windows platform. It should ## go away as soon as GCL upstream is fixed. case $axiom_lisp_flavor,$target in @@ -21034,6 +21035,7 @@ case $axiom_lisp_flavor,$target in axiom_gcl_rsym_hack='d=`echo "(format nil \"~a\" si::*system-directory*)" | $(AXIOM_LISP) | grep "/gcl.*/" | sed -e "s,\",,g"`; cp $$d/rsym$(EXEEXT) .' ;; *) + ## Breath. axiom_gcl_rsym_hack=':' ;; esac @@ -25003,7 +25005,10 @@ fi fi axiom_host_has_libbfd= -if test "${ac_cv_header_bfd_h+set}" = set; then +## Check for these only if we are going to build GCL from source. +case $axiom_all_prerequisites in + *all-gcl*) + if test "${ac_cv_header_bfd_h+set}" = set; then { echo "$as_me:$LINENO: checking for bfd.h" >&5 echo $ECHO_N "checking for bfd.h... $ECHO_C" >&6; } if test "${ac_cv_header_bfd_h+set}" = set; then @@ -25159,7 +25164,7 @@ echo "${ECHO_T}$ac_cv_header_bfd_h" >&6; } fi -{ echo "$as_me:$LINENO: checking for main in -lbfd" >&5 + { echo "$as_me:$LINENO: checking for main in -lbfd" >&5 echo $ECHO_N "checking for main in -lbfd... $ECHO_C" >&6; } if test "${ac_cv_lib_bfd_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25236,13 +25241,18 @@ fi ac_cv_lib_bfd=ac_cv_lib_bfd_main -axiom_gcl_bfd_option= -if test x"$ac_cv_header_bfd_h" = xyes \ - && test x"$axiom_host_has_libbfd" = xyes; then - axiom_gcl_bfd_option="--disable-dynsysbfd" -else - axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" -fi + axiom_gcl_bfd_option= + if test x"$ac_cv_header_bfd_h" = xyes \ + && test x"$axiom_host_has_libbfd" = xyes; then + axiom_gcl_bfd_option="--disable-dynsysbfd" + else + axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" + fi + ;; + *) + # Nothing to worry about + ;; +esac # axiom_gcl_mm_option="--enable-maxpage=256*1024" axiom_gcl_x_option="--disable-tkconfig --disable-x --disable-xgcl" axiom_gcl_emacs="--enable-emacs=correct" diff --git a/configure.ac b/configure.ac index 88f7ba68..81b6afe6 100644 --- a/configure.ac +++ b/configure.ac @@ -170,11 +170,11 @@ fi ## We need to build our own GCL if none is avalaible, or the existing ## one is too old. if test -z $axiom_lisp; then - AC_PATH_PROG([AXIOM_LISP], [gcl]) + AC_CHECK_PROGS([AXIOM_LISP], [gcl sbcl clisp]) ## A lisp may not be available AND the GCL source may also ## be missing. Instruct user to either build one or get ## the dependencies from our website. - if test -n "$AXIOM_LISP"; then + if test x$AXIOM_LISP = xgcl; then AC_MSG_CHECKING([$AXIOM_LISP version]) v=`$AXIOM_LISP -batch -eval "(format t \"~S\" (lisp-implementation-version))"` AC_MSG_RESULT([$v]) @@ -187,9 +187,8 @@ if test -z $axiom_lisp; then esac fi if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then - AC_MSG_ERROR([OpenAxiom requires GCL-2.6.7 or GCL-2.6.8. Either separately build one, or get the dependency tarball from OpenAxiom download website.]) + AC_MSG_ERROR([OpenAxiom requires a Lisp system. Either separately build one (GCL-2.6.7, GCL-2.6.8, SBCL, CLisp), or get the dependency tarball from OpenAxiom download website.]) fi - axiom_lisp=$AXIOM_LISP else ## Honor use of Lisp image specified on command line @@ -223,7 +222,7 @@ case $axiom_include_gcl,$axiom_lisp in AC_MSG_ERROR([--with-lisp=$axiom_lisp conflicts with --enable-gcl]) ;; *) - ## As of this writting, the Lisp systems ECL, GCL, and SBCL all + ## As of this writting, the Lisp systems ECL, GCL, SBCL, and CLisp all ## understands the command line option --help, though they do ## behave very differently. Some of them just print out the ## help information and exits. Others, such as GCL, think they @@ -252,7 +251,7 @@ AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], [openaxiom_${axiom_lisp_flavor}_runtime], [The kind of base runtime system for this build.]) -## The following is a horrible to arrange for GCL to successfully +## The following is a horrible hack to arrange for GCL to successfully ## rebuild symbol tables with "rsym" on Windows platform. It should ## go away as soon as GCL upstream is fixed. case $axiom_lisp_flavor,$target in @@ -260,6 +259,7 @@ case $axiom_lisp_flavor,$target in axiom_gcl_rsym_hack='d=`echo "(format nil \"~a\" si::*system-directory*)" | $(AXIOM_LISP) | grep "/gcl.*/" | sed -e "s,\",,g"`; cp $$d/rsym$(EXEEXT) .' ;; *) + ## Breath. axiom_gcl_rsym_hack=':' ;; esac @@ -472,16 +472,24 @@ else fi axiom_host_has_libbfd= -AC_CHECK_HEADER([bfd.h]) -AC_HAVE_LIBRARY([bfd], [axiom_host_has_libbfd=yes]) - -axiom_gcl_bfd_option= -if test x"$ac_cv_header_bfd_h" = xyes \ - && test x"$axiom_host_has_libbfd" = xyes; then - axiom_gcl_bfd_option="--disable-dynsysbfd" -else - axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" -fi +## Check for these only if we are going to build GCL from source. +case $axiom_all_prerequisites in + *all-gcl*) + AC_CHECK_HEADER([bfd.h]) + AC_HAVE_LIBRARY([bfd], [axiom_host_has_libbfd=yes]) + + axiom_gcl_bfd_option= + if test x"$ac_cv_header_bfd_h" = xyes \ + && test x"$axiom_host_has_libbfd" = xyes; then + axiom_gcl_bfd_option="--disable-dynsysbfd" + else + axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" + fi + ;; + *) + # Nothing to worry about + ;; +esac # axiom_gcl_mm_option="--enable-maxpage=256*1024" axiom_gcl_x_option="--disable-tkconfig --disable-x --disable-xgcl" axiom_gcl_emacs="--enable-emacs=correct" diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 58b0adfb..e809472f 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -470,16 +470,24 @@ use its own copy of \Tool{BFD} accordingly. FIXME: This must be taken care of by \Tool{GCL} itself. <<gcl options>>= axiom_host_has_libbfd= -AC_CHECK_HEADER([bfd.h]) -AC_HAVE_LIBRARY([bfd], [axiom_host_has_libbfd=yes]) - -axiom_gcl_bfd_option= -if test x"$ac_cv_header_bfd_h" = xyes \ - && test x"$axiom_host_has_libbfd" = xyes; then - axiom_gcl_bfd_option="--disable-dynsysbfd" -else - axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" -fi +## Check for these only if we are going to build GCL from source. +case $axiom_all_prerequisites in + *all-gcl*) + AC_CHECK_HEADER([bfd.h]) + AC_HAVE_LIBRARY([bfd], [axiom_host_has_libbfd=yes]) + + axiom_gcl_bfd_option= + if test x"$ac_cv_header_bfd_h" = xyes \ + && test x"$axiom_host_has_libbfd" = xyes; then + axiom_gcl_bfd_option="--disable-dynsysbfd" + else + axiom_gcl_bfd_option="--disable-statsysbfd --enable-locbfd" + fi + ;; + *) + # Nothing to worry about + ;; +esac @ \Tool{GCL} has an elaborate memory management system and @@ -788,7 +796,7 @@ fi Do we need to build our own version of \Tool{GCL}? The answer is yes, if \begin{itemize} \item the option \verb!--with-lisp! is not specified, and - no \Tool{GCL} image is available in the build environment; or + no Lisp image is available in the build environment; or \item we found a \Tool{GCL} image, but it is too old for OpenAxiom. \end{itemize} Consequently, we need to check for \Tool{GCL} and its version: @@ -796,11 +804,11 @@ Consequently, we need to check for \Tool{GCL} and its version: ## We need to build our own GCL if none is avalaible, or the existing ## one is too old. if test -z $axiom_lisp; then - AC_PATH_PROG([AXIOM_LISP], [gcl]) + AC_CHECK_PROGS([AXIOM_LISP], [gcl sbcl clisp]) ## A lisp may not be available AND the GCL source may also ## be missing. Instruct user to either build one or get ## the dependencies from our website. - if test -n "$AXIOM_LISP"; then + if test x$AXIOM_LISP = xgcl; then AC_MSG_CHECKING([$AXIOM_LISP version]) v=`$AXIOM_LISP -batch -eval "(format t \"~S\" (lisp-implementation-version))"` AC_MSG_RESULT([$v]) @@ -813,9 +821,8 @@ if test -z $axiom_lisp; then esac fi if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then - AC_MSG_ERROR([OpenAxiom requires GCL-2.6.7 or GCL-2.6.8. Either separately build one, or get the dependency tarball from OpenAxiom download website.]) + AC_MSG_ERROR([OpenAxiom requires a Lisp system. Either separately build one (GCL-2.6.7, GCL-2.6.8, SBCL, CLisp), or get the dependency tarball from OpenAxiom download website.]) fi - axiom_lisp=$AXIOM_LISP else ## Honor use of Lisp image specified on command line @@ -857,7 +864,7 @@ case $axiom_include_gcl,$axiom_lisp in AC_MSG_ERROR([--with-lisp=$axiom_lisp conflicts with --enable-gcl]) ;; *) - ## As of this writting, the Lisp systems ECL, GCL, and SBCL all + ## As of this writting, the Lisp systems ECL, GCL, SBCL, and CLisp all ## understands the command line option --help, though they do ## behave very differently. Some of them just print out the ## help information and exits. Others, such as GCL, think they @@ -886,7 +893,7 @@ AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], [openaxiom_${axiom_lisp_flavor}_runtime], [The kind of base runtime system for this build.]) -## The following is a horrible to arrange for GCL to successfully +## The following is a horrible hack to arrange for GCL to successfully ## rebuild symbol tables with "rsym" on Windows platform. It should ## go away as soon as GCL upstream is fixed. case $axiom_lisp_flavor,$target in @@ -894,6 +901,7 @@ case $axiom_lisp_flavor,$target in axiom_gcl_rsym_hack='d=`echo "(format nil \"~a\" si::*system-directory*)" | $(AXIOM_LISP) | grep "/gcl.*/" | sed -e "s,\",,g"`; cp $$d/rsym$(EXEEXT) .' ;; *) + ## Breath. axiom_gcl_rsym_hack=':' ;; esac @@ -1134,13 +1142,6 @@ AC_CONFIG_SRCDIR(src/Makefile.pamphlet) @ -\subsubsection{The [[AXIOM]] variable} - -The OpenAxiom source files (especially the source files for the -interpreter) use the environment variable [[AXIOM]] in a very -pervasive way. That variable needs to be set before the -build start --- or else, it will fail. - \subsubsection{Instantiating configuration files} <<instantiate config files>>= |