aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-16 06:50:49 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-16 06:50:49 +0000
commit2eb74847c641273b3e3479a32b9a75b5f070868c (patch)
tree0540ec50da3e5fc8079fe6c4ca015ba84b7e7d85
parentb9a1f605a97c2c50b3d08296409aeca4c74d11bc (diff)
downloadopen-axiom-2eb74847c641273b3e3479a32b9a75b5f070868c.tar.gz
More configure work
-rw-r--r--config/open-axiom.m474
-rwxr-xr-xconfigure188
-rw-r--r--configure.ac56
-rw-r--r--configure.ac.pamphlet113
4 files changed, 183 insertions, 248 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index d92d3334..d7f102f0 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -243,6 +243,52 @@ esac
AC_SUBST(axiom_cflags)
])
+dnl ---------------------------------
+dnl -- OPENAXIOM_GCL_BUILD_OPTIONS --
+dnl ---------------------------------
+dnl Determine options needed to build included GCL, if need be.
+AC_DEFUN([OPENAXIOM_GCL_BUILD_OPTIONS],[
+oa_host_has_libbfd=
+## Check for these only if we are going to build GCL from source.
+case $oa_all_prerequisites in
+ *all-gcl*)
+ AC_CHECK_HEADER([bfd.h])
+ AC_HAVE_LIBRARY([bfd], [oa_host_has_libbfd=yes])
+
+ oa_gcl_bfd_option=
+ if test x"$ac_cv_header_bfd_h" = xyes \
+ && test x"$oa_host_has_libbfd" = xyes; then
+ oa_gcl_bfd_option="--disable-dynsysbfd"
+ else
+ oa_gcl_bfd_option="--disable-statsysbfd --enable-locbfd"
+ fi
+ ;;
+ *)
+ # Nothing to worry about
+ ;;
+esac
+
+case $host in
+ powerpc*darwin*)
+ axiom_gcl_bfd_option="--disable-statsysbfd \
+ --enable-machine=powerpc-macosx"
+ axiom_gcl_mm_option="--enable-vssize=65536*2"
+ ;;
+esac
+
+## We don't need GCL to build support for X Window system or TCL/TK:
+oa_gcl_x_option="--disable-tkconfig --disable-x --disable-xgcl --disable-tcltk"
+
+## Under some unusual circumstances, GLC's configure will
+## fail to properly detect usable Emacs directories, and the
+## build will mysteriously fail later. We temporarily work
+## around that bug as follows:
+oa_gcl_emacs="--enable-emacs=correct"
+
+GCLOPTS="$oa_gcl_emacs $oa_gcl_bfd_option $oa_gcl_mm_option $oa_gcl_x_option"
+AC_SUBST(GCLOPTS)
+])
+
dnl --------------------------
dnl -- OPENAXIOM_LISP_FLAGS --
dnl --------------------------
@@ -918,3 +964,31 @@ OPENAXIOM_CHECK_X11
OPENAXIOM_CHECK_QT
OPENAXIOM_CHECK_BROWSER_SUPPORT
])
+
+
+dnl --------------------------
+dnl -- OPENAXIOM_CHECK_MISC --
+dnl --------------------------
+AC_DEFUN([OPENAXIOM_CHECK_MISC],[
+case $GCC in
+ yes)
+ CCF="-O2 -Wall -D_GNU_SOURCE"
+ ;;
+esac
+
+case $target in
+ *bsd*|*dragonfly*)
+ CCF="-O2 -Wall"
+ ;;
+ *solaris*)
+ ## This should be taken out.
+ AC_DEFINE([SUNplatform], [], [SunOS flavour])
+ ;;
+ powerpc*darwin*)
+ CCF="-O2 -Wall -D_GNU_SOURCE \
+ -I/usr/include -I/usr/include/sys"
+ ;;
+esac
+
+AC_SUBST(CCF)
+])
diff --git a/configure b/configure
index 3526ba02..a26ee9d1 100755
--- a/configure
+++ b/configure
@@ -788,14 +788,14 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
+CCF
+GCLOPTS
string_type
double_type
float_type
int_type
char_type
void_type
-GCLOPTS
-CCF
openaxiom_host_has_regex
OA_QT_QMAKE
OA_QT_MOC
@@ -21809,11 +21809,70 @@ fi
-axiom_host_has_libbfd=
+
+
+
+
+
+
+
+
+case $axiom_lisp_flavor in
+ gcl)
+ void_type='void'
+ char_type='char'
+ int_type='int'
+ float_type='float'
+ double_type='double'
+ string_type='string'
+ ;;
+ sbcl)
+ void_type='void'
+ char_type='char'
+ int_type='int'
+ float_type='float'
+ double_type='double'
+ string_type='c-string'
+ ;;
+ clisp)
+ void_type='nil'
+ char_type='character'
+ int_type='int'
+ float_type='single-float'
+ double_type='double-float'
+ string_type='c-string'
+ ;;
+ ecl)
+ void_type=':void'
+ char_type=':char'
+ int_type=':int'
+ float_type=':float'
+ double_type=':double'
+ string_type=':cstring'
+ ;;
+ clozure)
+ void_type=':void'
+ # FIXME: this is not really what we want, but good enough for now.
+ char_type=':unsigned-byte'
+ int_type=':signed-fullword'
+ float_type=':single-float'
+ double_type=':double-float'
+ # Clozure CL wants you to deal with your own mess
+ string_type=':address'
+ ;;
+ *)
+ { { $as_echo "$as_me:$LINENO: error: We do not know how to translate native types for this Lisp" >&5
+$as_echo "$as_me: error: We do not know how to translate native types for this Lisp" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+
+oa_host_has_libbfd=
## Check for these only if we are going to build GCL from source.
case $oa_all_prerequisites in
*all-gcl*)
- if test "${ac_cv_header_bfd_h+set}" = set; then
+ if test "${ac_cv_header_bfd_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for bfd.h" >&5
$as_echo_n "checking for bfd.h... " >&6; }
if test "${ac_cv_header_bfd_h+set}" = set; then
@@ -21947,7 +22006,7 @@ $as_echo "$ac_cv_header_bfd_h" >&6; }
fi
- { $as_echo "$as_me:$LINENO: checking for main in -lbfd" >&5
+ { $as_echo "$as_me:$LINENO: checking for main in -lbfd" >&5
$as_echo_n "checking for main in -lbfd... " >&6; }
if test "${ac_cv_lib_bfd_main+set}" = set; then
$as_echo_n "(cached) " >&6
@@ -22007,26 +22066,44 @@ fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_main" >&5
$as_echo "$ac_cv_lib_bfd_main" >&6; }
if test "x$ac_cv_lib_bfd_main" = x""yes; then
- axiom_host_has_libbfd=yes
+ oa_host_has_libbfd=yes
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
+ oa_gcl_bfd_option=
+ if test x"$ac_cv_header_bfd_h" = xyes \
+ && test x"$oa_host_has_libbfd" = xyes; then
+ oa_gcl_bfd_option="--disable-dynsysbfd"
+ else
+ oa_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"
+
+case $host in
+ powerpc*darwin*)
+ axiom_gcl_bfd_option="--disable-statsysbfd \
+ --enable-machine=powerpc-macosx"
+ axiom_gcl_mm_option="--enable-vssize=65536*2"
+ ;;
+esac
+
+## We don't need GCL to build support for X Window system or TCL/TK:
+oa_gcl_x_option="--disable-tkconfig --disable-x --disable-xgcl --disable-tcltk"
+
+## Under some unusual circumstances, GLC's configure will
+## fail to properly detect usable Emacs directories, and the
+## build will mysteriously fail later. We temporarily work
+## around that bug as follows:
+oa_gcl_emacs="--enable-emacs=correct"
+
+GCLOPTS="$oa_gcl_emacs $oa_gcl_bfd_option $oa_gcl_mm_option $oa_gcl_x_option"
+
+
case $GCC in
yes)
@@ -22036,89 +22113,25 @@ esac
case $target in
*bsd*|*dragonfly*)
- CCF="-O2 -Wall"
- ;;
- windows)
- SRCDIRS=bootdir interpdir sharedir algebradir etcdir docdir inputdir
- ;;
+ CCF="-O2 -Wall"
+ ;;
*solaris*)
+ ## This should be taken out.
cat >>confdefs.h <<\_ACEOF
#define SUNplatform /**/
_ACEOF
- ;;
+ ;;
powerpc*darwin*)
- CCF="-O2 -Wall -D_GNU_SOURCE \
- -I/usr/include -I/usr/include/sys"
- axiom_gcl_bfd_option="--disable-statsysbfd \
- --enable-machine=powerpc-macosx"
- axiom_gcl_mm_option="--enable-vssize=65536*2"
- ;;
+ CCF="-O2 -Wall -D_GNU_SOURCE \
+ -I/usr/include -I/usr/include/sys"
+ ;;
esac
-GCLOPTS="$axiom_gcl_emacs $axiom_gcl_bfd_option $axiom_gcl_mm_option $axiom_gcl_x_option"
-
-
-
-
-
-
-
-
-case $axiom_lisp_flavor in
- gcl)
- void_type='void'
- char_type='char'
- int_type='int'
- float_type='float'
- double_type='double'
- string_type='string'
- ;;
- sbcl)
- void_type='void'
- char_type='char'
- int_type='int'
- float_type='float'
- double_type='double'
- string_type='c-string'
- ;;
- clisp)
- void_type='nil'
- char_type='character'
- int_type='int'
- float_type='single-float'
- double_type='double-float'
- string_type='c-string'
- ;;
- ecl)
- void_type=':void'
- char_type=':char'
- int_type=':int'
- float_type=':float'
- double_type=':double'
- string_type=':cstring'
- ;;
- clozure)
- void_type=':void'
- # FIXME: this is not really what we want, but good enough for now.
- char_type=':unsigned-byte'
- int_type=':signed-fullword'
- float_type=':single-float'
- double_type=':double-float'
- # Clozure CL wants you to deal with your own mess
- string_type=':address'
- ;;
- *)
- { { $as_echo "$as_me:$LINENO: error: We do not know how to translate native types for this Lisp" >&5
-$as_echo "$as_me: error: We do not know how to translate native types for this Lisp" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
ac_config_files="$ac_config_files Makefile:config/var-def.mk:Makefile.in:config/setup-dep.mk"
ac_config_files="$ac_config_files src/Makefile:config/var-def.mk:src/Makefile.in:config/setup-dep.mk"
@@ -24622,4 +24635,5 @@ echo done
$srcdir/config/move-if-change \
src/algebra/tmp-extract-spad.mk src/algebra/extract-spad.mk
+
echo "Type '${MAKE}' (without quotes) to build OpenAxiom"
diff --git a/configure.ac b/configure.ac
index aeab63d1..15841021 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,59 +46,10 @@ OPENAXIOM_CHECK_CORE_SUPPORT
OPENAXIOM_CHECK_IO
OPENAXIOM_CHECK_GRAPHICS
-axiom_host_has_libbfd=
-## Check for these only if we are going to build GCL from source.
-case $oa_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"
-
-case $GCC in
- yes)
- CCF="-O2 -Wall -D_GNU_SOURCE"
- ;;
-esac
-
-case $target in
- *bsd*|*dragonfly*)
- CCF="-O2 -Wall"
- ;;
- windows)
- SRCDIRS=bootdir interpdir sharedir algebradir etcdir docdir inputdir
- ;;
- *solaris*)
- AC_DEFINE([SUNplatform], [], [SunOS flavour])
- ;;
- powerpc*darwin*)
- CCF="-O2 -Wall -D_GNU_SOURCE \
- -I/usr/include -I/usr/include/sys"
- axiom_gcl_bfd_option="--disable-statsysbfd \
- --enable-machine=powerpc-macosx"
- axiom_gcl_mm_option="--enable-vssize=65536*2"
- ;;
-esac
-
-GCLOPTS="$axiom_gcl_emacs $axiom_gcl_bfd_option $axiom_gcl_mm_option $axiom_gcl_x_option"
-
-AC_SUBST(CCF)
-AC_SUBST(GCLOPTS)
OPENAXIOM_FFI_TYPE_TABLE
+OPENAXIOM_GCL_BUILD_OPTIONS
+OPENAXIOM_CHECK_MISC
+
OPENAXIOM_MAKEFILE([Makefile])
OPENAXIOM_MAKEFILE([src/Makefile])
OPENAXIOM_MAKEFILE([src/lib/Makefile])
@@ -142,4 +93,5 @@ echo done
$srcdir/config/move-if-change \
src/algebra/tmp-extract-spad.mk src/algebra/extract-spad.mk
+
echo "Type '${MAKE}' (without quotes) to build OpenAxiom"
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 6fbbcaf8..6d332d58 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -187,114 +187,6 @@ axiom_build_sharedir=$axiom_builddir/share
@
-\section{Host characteristics}
-
-\subsection{Lisp runtime}
-
-\subsubsection{Runtime checking}
-
-\Tool{GCL} relies on the libirary \Tool{BFD}, the include
-headers of which may not exist (quite common). In order to avoid
-\Tool{GCL} build failure, we test for the existence of [[<bfd.h>]]
-and the corresponding library. We configure \Tool{GCL} to
-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=
-## Check for these only if we are going to build GCL from source.
-case $oa_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
-\Tool{OpenAxiom} seems to
-put ``unusual'' pressure on it. Here we specify some values that have
-been empirically known to work.
-<<gcl options>>=
-# axiom_gcl_mm_option="--enable-maxpage=256*1024"
-@
-
-Furthermore, we don't need (at the moment) \Tool{GCL} to build support for
-X Window system or TCL/TK:
-<<gcl options>>=
-axiom_gcl_x_option="--disable-tkconfig --disable-x --disable-xgcl"
-@
-
-Under some unusual circumstances, \Tool{GLC}'s \Tool{configure} will
-fail to properly detect usable \Tool{Emacs} directories, and the
-build will mysteriously fail later. We temporarily work
-around that bug as follows:
-<<gcl options>>=
-axiom_gcl_emacs="--enable-emacs=correct"
-@
-
-
-Other aspects depend on the platform being considered.
-
-
-\Tool{OpenAxiom} source code had developed the appalling and irritating habit
-of testing for
-platforms, when in fact it is interested in functionalities.
-The outcome is an ever-growing pile of increasing disgusting hacks.
-For example, most the XXXplatform below really have nothing to
-do with platforms.
-
-<<platform specific bits>>=
-<<gcl options>>
-
-case $GCC in
- yes)
- CCF="-O2 -Wall -D_GNU_SOURCE"
- ;;
-esac
-
-case $target in
- *bsd*|*dragonfly*)
- CCF="-O2 -Wall"
- ;;
- windows)
- SRCDIRS=bootdir interpdir sharedir algebradir etcdir docdir inputdir
- ;;
- *solaris*)
- AC_DEFINE([SUNplatform], [], [SunOS flavour])
- ;;
- powerpc*darwin*)
- CCF="-O2 -Wall -D_GNU_SOURCE \
- -I/usr/include -I/usr/include/sys"
- axiom_gcl_bfd_option="--disable-statsysbfd \
- --enable-machine=powerpc-macosx"
- axiom_gcl_mm_option="--enable-vssize=65536*2"
- ;;
-esac
-
-GCLOPTS="$axiom_gcl_emacs $axiom_gcl_bfd_option $axiom_gcl_mm_option $axiom_gcl_x_option"
-
-AC_SUBST(CCF)
-AC_SUBST(GCLOPTS)
-@
-
-The C preprocessor symbols [[BSDplatform]], [[LINUXplatform]], etc. are being
-used as ``catch all'' for unstructured codes. They should be
-removed from the source base. Any source file using those should be
-properly documented as its needs are, and a narrowed, specific configure
-test should be added.
-
-
\section{Configuration options}
\label{sec:config-options}
@@ -501,9 +393,12 @@ OPENAXIOM_CHECK_CORE_SUPPORT
OPENAXIOM_CHECK_IO
OPENAXIOM_CHECK_GRAPHICS
-<<platform specific bits>>
OPENAXIOM_FFI_TYPE_TABLE
+OPENAXIOM_GCL_BUILD_OPTIONS
+OPENAXIOM_CHECK_MISC
+
<<instantiate config files>>
+
echo "Type '${MAKE}' (without quotes) to build OpenAxiom"
@