dnl Copyright (C) 2006-2010, Gabriel Dos Reis. dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions are dnl met: dnl dnl - Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl dnl - Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl dnl This configure template details the configuration process of setting up dnl OpenAxiom for build from source codes. The process scrutinizes the dnl build, host, and target environments, and finally instantiates dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and dnl auxiliary tools where appropriate. dnl 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-08-24], [open-axiom-bugs@lists.sf.net]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) dnl Put all configuration macros here AC_CONFIG_HEADERS([config/openaxiom-c-macros.h]) dnl We don't use Automake yet. # AM_INIT_AUTOMAKE([foreign]) AC_PREREQ([2.62]) dnl Simple sanity check. AC_CONFIG_SRCDIR(src/Makefile.pamphlet) AC_CANONICAL_SYSTEM open_axiom_installdir=$libdir/open-axiom/$target/$PACKAGE_VERSION AC_SUBST(open_axiom_installdir) dnl For the moment, the OpenAxiom base source code is written dnl in a way that does not support cross build. However, we do dnl want to make cross build possible; consequently we issue dnl a warning when we detect attempt at cross build. dnl Note that we do not stop the configuration process because we do seek dnl contributions for cross build support. if test $build != $target; then AC_MSG_WARN([Cross build is not supported.]) AC_MSG_WARN([Please notify open-axiom-devel@open-axiom.org if you succeed.]) fi ## Although OpenAxiom does not support cross build yet, let ## alone Canadian cross, we want to make sure that we do not write ## the build machinery in a way that actively unsupports ## cross build. Consequently, in the build tree, we sequester ## tools that we build and use on the build platform, ## in sub-directories different from others. axiom_build_sharedir=$axiom_builddir/share ## Accumulate list of utils needed for the build platform oa_all_prerequisites= AC_SUBST(oa_all_prerequisites) OPENAXIOM_HOST_COMPILERS OPENAXIOM_GCL_HACKS OPENAXIOM_HOST_DATA_PROPERTIES OPENAXIOM_DYNAMIC_MODULE_SUPPORT 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) OPENAXIOM_CHECK_CORE_SUPPORT OPENAXIOM_CHECK_IO OPENAXIOM_CHECK_GRAPHICS OPENAXIOM_FFI_TYPE_TABLE OPENAXIOM_GCL_BUILD_OPTIONS OPENAXIOM_CHECK_MM OPENAXIOM_CHECK_MISC ## We are ready to instantiate makefiles. OPENAXIOM_MAKEFILE([Makefile]) OPENAXIOM_MAKEFILE([src/Makefile]) OPENAXIOM_MAKEFILE([src/lib/Makefile]) OPENAXIOM_MAKEFILE([src/utils/Makefile]) OPENAXIOM_MAKEFILE([src/hyper/Makefile]) OPENAXIOM_MAKEFILE([src/driver/Makefile]) OPENAXIOM_MAKEFILE([src/lisp/Makefile]) OPENAXIOM_MAKEFILE([src/boot/Makefile]) OPENAXIOM_MAKEFILE([src/interp/Makefile]) OPENAXIOM_MAKEFILE([src/share/Makefile]) OPENAXIOM_MAKEFILE([src/algebra/Makefile]) OPENAXIOM_MAKEFILE([src/input/Makefile]) OPENAXIOM_MAKEFILE([src/etc/Makefile]) OPENAXIOM_MAKEFILE([src/doc/Makefile]) AC_OUTPUT ## Generate rules to extrad SPAD type definitions from pamphlets. echo -n "extracting list of SPAD type definitions..." egrep '<<(category|domain|package) .*>>=' \ $srcdir/src/algebra/*.spad.pamphlet \ | sort | uniq | \ while IFS=':' read spad_file chunk_desc; do chunk_desc=`echo $chunk_desc | sed -e 's,<<,,' -e 's,>>=,,'` set $chunk_desc; spad_abbrev=$2 cat >> src/algebra/tmp-extract-spad.mk <