diff options
author | dos-reis <gdr@axiomatics.org> | 2010-08-16 05:08:46 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-08-16 05:08:46 +0000 |
commit | 5689ef935c09edbedb6d8466aaf9742c472a00c9 (patch) | |
tree | 2fe140e86001581a3d971a0da4c4127a5e1a73a3 | |
parent | b21370eba464c123420f9951554710c568be36b1 (diff) | |
download | open-axiom-5689ef935c09edbedb6d8466aaf9742c472a00c9.tar.gz |
More configure work
-rw-r--r-- | config/open-axiom.m4 | 62 | ||||
-rwxr-xr-x | configure | 213 | ||||
-rw-r--r-- | configure.ac | 61 | ||||
-rw-r--r-- | configure.ac.pamphlet | 87 | ||||
-rw-r--r-- | src/lisp/Makefile.in | 4 | ||||
-rw-r--r-- | src/lisp/core.lisp.in | 4 | ||||
-rwxr-xr-x | src/scripts/document.in | 2 |
7 files changed, 154 insertions, 279 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index a87f18f6..b98b5da2 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -559,3 +559,65 @@ if test -z "$PDFLATEX"; then fi AC_CHECK_PROGS([MAKEINDEX], [makeindex]) ]) + + +dnl ----------------------------- +dnl -- OPENAXIOM_BUILD_OPTIONS -- +dnl ----------------------------- +dnl Process build options specified on the command line. +AC_DEFUN([OPENAXIOM_BUILD_OPTIONS],[ +## Does it make sense to pretend that we support multithreading? +oa_enable_threads=no +AC_ARG_ENABLE([threads], [ --enable-threads turn on threads support], + [case $enableval in + yes|no) oa_enable_threads=$enableval ;; + *) AC_MSG_ERROR([erroneous value for --enable-threads]) ;; + esac]) +# GNU compilers want hints about multithreading. +case $GCC,$oa_enable_threads in + yes,yes) + axiom_cflags="$axiom_cflags -pthread" +esac +AC_SUBST(oa_enable_threads) + +## Occaionally, we may want to keep intermediary files. +oa_keep_files= +AC_ARG_ENABLE([int-file-retention], + [ --enable-int-file-retention keep intermediary files], + [case $enableval in + yes|no) oa_keep_files=$enableval ;; + *) AC_MSG_ERROR([erroneous value for --enable-int-file-retention]) ;; + esac]) +AC_SUBST(oa_keep_files) + +## Parse args for profiling-enabled build. +oa_enable_profiling=no +AC_ARG_ENABLE([profiling], [ --enable-profiling turn profiling on], + [case $enableval in + yes|no) oa_enable_profiling=$enableval ;; + *) AC_MSG_ERROR([erroneous value for --enable-profiling]) ;; + esac]) +AC_SUBST(oa_enable_profiling) + +## Lisp optimization settings +oa_optimize_options=speed +## Shall we proclaim safety? +oa_enable_checking=no # don't turn on checking by default. +AC_ARG_ENABLE([checking], [ --enable-checking turn runtime checking on], + [case $enableval in + yes|no) oa_enable_checking=$enableval ;; + *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;; + esac]) +if test x"$oa_enable_checking" = xyes; then + case $axiom_lisp_flavor in + gcl) # GCL-2.6.x does not understand debug. + oa_optimize_options="$oa_optimize_options safety" + ;; + *) oa_optimize_options="$oa_optimize_options safety debug" + ;; + esac + AC_MSG_NOTICE([runtime checking may increase compilation time]) +fi +AC_SUBST(oa_enable_checking) +AC_SUBST(oa_optimize_options) +]) @@ -809,17 +809,17 @@ X_CFLAGS XMKMF axiom_c_runtime_extra axiom_c_runtime -oa_enable_profiling -axiom_optimize_options -axiom_enable_checking -oa_enable_threads -oa_keep_files axiom_src_subdirs MAKEINDEX LATEX PDFLATEX HOST_AWK oa_editor +oa_optimize_options +oa_enable_checking +oa_enable_profiling +oa_keep_files +oa_enable_threads axiom_fasl_type oa_use_dynamic_lib axiom_eval_flags @@ -941,10 +941,10 @@ enable_static enable_fast_install with_gnu_ld enable_libtool_lock -enable_int_file_retention enable_threads -enable_checking +enable_int_file_retention enable_profiling +enable_checking with_x ' ac_precious_vars='build_alias @@ -1597,10 +1597,10 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-int-file-retention keep intermediary files --enable-threads turn on threads support - --enable-checking turn runtime checking on + --enable-int-file-retention keep intermediary files --enable-profiling turn profiling on + --enable-checking turn runtime checking on Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -17519,6 +17519,82 @@ _ACEOF +## Does it make sense to pretend that we support multithreading? +oa_enable_threads=no +# Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then + enableval=$enable_threads; case $enableval in + yes|no) oa_enable_threads=$enableval ;; + *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-threads" >&5 +$as_echo "$as_me: error: erroneous value for --enable-threads" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + +# GNU compilers want hints about multithreading. +case $GCC,$oa_enable_threads in + yes,yes) + axiom_cflags="$axiom_cflags -pthread" +esac + + +## Occaionally, we may want to keep intermediary files. +oa_keep_files= +# Check whether --enable-int-file-retention was given. +if test "${enable_int_file_retention+set}" = set; then + enableval=$enable_int_file_retention; case $enableval in + yes|no) oa_keep_files=$enableval ;; + *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-int-file-retention" >&5 +$as_echo "$as_me: error: erroneous value for --enable-int-file-retention" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + + + +## Parse args for profiling-enabled build. +oa_enable_profiling=no +# Check whether --enable-profiling was given. +if test "${enable_profiling+set}" = set; then + enableval=$enable_profiling; case $enableval in + yes|no) oa_enable_profiling=$enableval ;; + *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-profiling" >&5 +$as_echo "$as_me: error: erroneous value for --enable-profiling" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + + + +## Lisp optimization settings +oa_optimize_options=speed +## Shall we proclaim safety? +oa_enable_checking=no # don't turn on checking by default. +# Check whether --enable-checking was given. +if test "${enable_checking+set}" = set; then + enableval=$enable_checking; case $enableval in + yes|no) oa_enable_checking=$enableval ;; + *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-checking" >&5 +$as_echo "$as_me: error: erroneous value for --enable-checking" >&2;} + { (exit 1); exit 1; }; } ;; + esac +fi + +if test x"$oa_enable_checking" = xyes; then + case $axiom_lisp_flavor in + gcl) # GCL-2.6.x does not understand debug. + oa_optimize_options="$oa_optimize_options safety" + ;; + *) oa_optimize_options="$oa_optimize_options safety debug" + ;; + esac + { $as_echo "$as_me:$LINENO: runtime checking may increase compilation time" >&5 +$as_echo "$as_me: runtime checking may increase compilation time" >&6;} +fi + + + + ## On Windows system, we prefer the default installation @@ -17802,125 +17878,6 @@ axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="{ { $as_echo "$as_me:$LINENO: error: program 'ar' is missing" >&5 -$as_echo "$as_me: error: program 'ar' is missing" >&2;} - { (exit 1); exit 1; }; }" -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -## Occaionally, we may want to keep intermediary files. -oa_keep_files= -# Check whether --enable-int-file-retention was given. -if test "${enable_int_file_retention+set}" = set; then - enableval=$enable_int_file_retention; case $enableval in - yes|no) oa_keep_files=$enableval ;; - *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-int-file-retention" >&5 -$as_echo "$as_me: error: erroneous value for --enable-int-file-retention" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - - - -## Does it make sense to pretend that we support multithreading? -oa_enable_threads=no -# Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then - enableval=$enable_threads; case $enableval in - yes|no) oa_enable_threads=$enableval ;; - *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-threads" >&5 -$as_echo "$as_me: error: erroneous value for --enable-threads" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - - -# GNU compiler wants to have a hint about multithreading. -case $GCC,$oa_enable_threads in - yes,yes) - axiom_cflags="$axiom_cflags -pthread" -esac - - - -axiom_optimize_options=speed -## Shall we proclaim safety? -axiom_enable_checking=no # don't turn on checking by default. -# Check whether --enable-checking was given. -if test "${enable_checking+set}" = set; then - enableval=$enable_checking; case $enableval in - yes|no) axiom_enable_checking=$enableval ;; - *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-checking" >&5 -$as_echo "$as_me: error: erroneous value for --enable-checking" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - -if test x"$axiom_enable_checking" = xyes; then - case $axiom_lisp_flavor in - gcl) # GCL-2.6.x does not understand debug. - axiom_optimize_options="$axiom_optimize_options safety" - ;; - *) axiom_optimize_options="$axiom_optimize_options safety debug" - ;; - esac - { $as_echo "$as_me:$LINENO: runtime checking may increase compilation time" >&5 -$as_echo "$as_me: runtime checking may increase compilation time" >&6;} -fi - - - - -## Parse args for profiling-enabled build. -oa_enable_profiling=no -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval=$enable_profiling; case $enableval in - yes|no) oa_enable_profiling=$enableval ;; - *) { { $as_echo "$as_me:$LINENO: error: erroneous value for --enable-profiling" >&5 -$as_echo "$as_me: error: erroneous value for --enable-profiling" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi - - - # FIXME: Move this out of here. axiom_c_runtime= diff --git a/configure.ac b/configure.ac index 0162b588..08d53b64 100644 --- a/configure.ac +++ b/configure.ac @@ -36,72 +36,13 @@ OPENAXIOM_BUILD_TOOLS OPENAXIOM_LISP_FLAGS OPENAXIOM_FILE_EXTENSIONS +OPENAXIOM_BUILD_OPTIONS OPENAXIOM_HOST_PROGS axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" AC_SUBST(axiom_src_subdirs) -AC_CHECK_PROG([AR], [ar], [ar], [AC_MSG_ERROR([program 'ar' is missing])]) - - -## Occaionally, we may want to keep intermediary files. -oa_keep_files= -AC_ARG_ENABLE([int-file-retention], - [ --enable-int-file-retention keep intermediary files], - [case $enableval in - yes|no) oa_keep_files=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-int-file-retention]) ;; - esac]) -AC_SUBST(oa_keep_files) - -## Does it make sense to pretend that we support multithreading? -oa_enable_threads=no -AC_ARG_ENABLE([threads], [ --enable-threads turn on threads support], - [case $enableval in - yes|no) oa_enable_threads=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-threads]) ;; - esac]) - -# GNU compiler wants to have a hint about multithreading. -case $GCC,$oa_enable_threads in - yes,yes) - axiom_cflags="$axiom_cflags -pthread" -esac - -AC_SUBST(oa_enable_threads) - -axiom_optimize_options=speed -## Shall we proclaim safety? -axiom_enable_checking=no # don't turn on checking by default. -AC_ARG_ENABLE([checking], [ --enable-checking turn runtime checking on], - [case $enableval in - yes|no) axiom_enable_checking=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;; - esac]) -if test x"$axiom_enable_checking" = xyes; then - case $axiom_lisp_flavor in - gcl) # GCL-2.6.x does not understand debug. - axiom_optimize_options="$axiom_optimize_options safety" - ;; - *) axiom_optimize_options="$axiom_optimize_options safety debug" - ;; - esac - AC_MSG_NOTICE([runtime checking may increase compilation time]) -fi - -AC_SUBST(axiom_enable_checking) -AC_SUBST(axiom_optimize_options) - -## Parse args for profiling-enabled build. -oa_enable_profiling=no -AC_ARG_ENABLE([profiling], [ --enable-profiling turn profiling on], - [case $enableval in - yes|no) oa_enable_profiling=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-profiling]) ;; - esac]) - -AC_SUBST(oa_enable_profiling) # FIXME: Move this out of here. axiom_c_runtime= diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 6cf91fdc..2f6933d9 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -482,37 +482,6 @@ runtime checks. This may be useful when chasing Heinsenbugs. It probably should be the default mode on development or experimental branches. <<runtime checking>>= -axiom_optimize_options=speed -## Shall we proclaim safety? -axiom_enable_checking=no # don't turn on checking by default. -AC_ARG_ENABLE([checking], [ --enable-checking turn runtime checking on], - [case $enableval in - yes|no) axiom_enable_checking=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;; - esac]) -if test x"$axiom_enable_checking" = xyes; then - case $axiom_lisp_flavor in - gcl) # GCL-2.6.x does not understand debug. - axiom_optimize_options="$axiom_optimize_options safety" - ;; - *) axiom_optimize_options="$axiom_optimize_options safety debug" - ;; - esac - AC_MSG_NOTICE([runtime checking may increase compilation time]) -fi - -AC_SUBST(axiom_enable_checking) -AC_SUBST(axiom_optimize_options) - -## Parse args for profiling-enabled build. -oa_enable_profiling=no -AC_ARG_ENABLE([profiling], [ --enable-profiling turn profiling on], - [case $enableval in - yes|no) oa_enable_profiling=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-profiling]) ;; - esac]) - -AC_SUBST(oa_enable_profiling) @ @@ -618,60 +587,6 @@ properly documented as its needs are, and a narrowed, specific configure test should be added. -\section{The build platform} - -\subsection{Build utilities} -Most of the tools we're testing for are with respect to the build -environment. However, notice that since we only support \emph{native} -build at the moment, the tests are also for the host and target -platforms. -<<build utils>>= - -<<binary utils>> - - -## Occaionally, we may want to keep intermediary files. -oa_keep_files= -AC_ARG_ENABLE([int-file-retention], - [ --enable-int-file-retention keep intermediary files], - [case $enableval in - yes|no) oa_keep_files=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-int-file-retention]) ;; - esac]) -AC_SUBST(oa_keep_files) - -## Does it make sense to pretend that we support multithreading? -oa_enable_threads=no -AC_ARG_ENABLE([threads], [ --enable-threads turn on threads support], - [case $enableval in - yes|no) oa_enable_threads=$enableval ;; - *) AC_MSG_ERROR([erroneous value for --enable-threads]) ;; - esac]) - -# GNU compiler wants to have a hint about multithreading. -case $GCC,$oa_enable_threads in - yes,yes) - axiom_cflags="$axiom_cflags -pthread" -esac - -AC_SUBST(oa_enable_threads) - -@ - -The next paragraphs detail each of the cluster of build utilities -[[configure]] looks for. - -\paragraph{File utils} -Then, check for a usable [[install]] program. Also, find out -way to hard- or soft-link files. - -\paragraph{Binary utils.} - -We need to know how to put object files into archives. -<<binary utils>>= -AC_CHECK_PROG([AR], [ar], [ar], [AC_MSG_ERROR([program 'ar' is missing])]) -@ - \section{Configuration options} \label{sec:config-options} @@ -868,12 +783,12 @@ OPENAXIOM_BUILD_TOOLS OPENAXIOM_LISP_FLAGS OPENAXIOM_FILE_EXTENSIONS +OPENAXIOM_BUILD_OPTIONS OPENAXIOM_HOST_PROGS axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" AC_SUBST(axiom_src_subdirs) -<<build utils>> <<runtime checking>> # FIXME: Move this out of here. diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in index c1685b47..e4336f42 100644 --- a/src/lisp/Makefile.in +++ b/src/lisp/Makefile.in @@ -126,7 +126,7 @@ $(oa_target_lispdir)/linkset: $(oa_target_lispdir)/core.$(LNKEXT) rm -f $@ echo '$(base_lisp_objects)' > $@ -axiom_optimize_options = @axiom_optimize_options@ +oa_optimize_options = @oa_optimize_options@ oa_editor = @oa_editor@ @@ -143,7 +143,7 @@ oa_keep_files = $(patsubst %,|%|,$(subst $(oa_comma), ,@oa_keep_files@)) edit = sed \ -e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \ - -e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \ + -e 's|@oa_optimize_options[@]|$(oa_optimize_options)|g' \ -e 's|@oa_editor[@]|$(oa_editor)|g' \ -e 's/@oa_keep_files[@]/$(oa_keep_files)/g' \ -e 's|@host[@]|$(host)|g' \ diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 94e8823c..08d1ecba 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -143,9 +143,9 @@ ;; Lisp compiler optimization settings. (defconstant |$LispOptimizeOptions| - '(@axiom_optimize_options@)) + '(@oa_optimize_options@)) -(proclaim '(optimize @axiom_optimize_options@)) +(proclaim '(optimize @oa_optimize_options@)) ;; Enablig profiling of generated Lisp codes. (defconstant |$EnableLispProfiling| @oa_enable_profiling@) diff --git a/src/scripts/document.in b/src/scripts/document.in index bafdd1e2..14173484 100755 --- a/src/scripts/document.in +++ b/src/scripts/document.in @@ -57,7 +57,7 @@ eval_flags="@axiom_eval_flags@" lisp_flavor=@axiom_lisp_flavor@ # safety option -- used only when saving image. -enable_checking=@axiom_enable_checking@ +enable_checking=@oa_enable_checking@ # Issue a diagnostic message and exit with non-zero status. error() { |