#!/bin/sh # # The real work is done in the `src' directory. This is just here to # allow for the standard ./configure && make && make install sequence # from the topdirectory # # If you want more than just te naked Prolog compiler (most likely), we # advice using build.templ. See the file INSTALL for details. TARGET=lite configoptions="" kerneloptions="" usage() { cat << _EOM_ Usage: configure option ... Options: --with-world Build all (default packages) --without- Exclude package. Notably --without-jpl excludes often troublesome building of the JPL interface. --link Install using symbolic links to the development tree. This option is intended for developers. This toplevel configure and Makefile ony deal with very standard installations. More complicated cases should check INSTALL.notes and use the configure and makefiles in the src and package directories. _EOM_ } while [ "$1" != "" ]; do case "$1" in --with-world) TARGET=world shift ;; --without-*) pkg=`echo $1 | sed 's/--without-//'` DISABLE_PKGS="$DISABLE_PKGS $pkg" export DISABLE_PKGS shift ;; --link) TARGET="ln-$TARGET" shift ;; --help) usage exit 0 ;; --*-libdirversion*|--*-useprofile*) kerneloptions="$kerneloptions $1" shift ;; *) configoptions="$configoptions $1" shift ;; esac done if [ -z "$BUILDARCH" ]; then BUILDARCH=src; fi if [ ! -d "$BUILDARCH" ]; then mkdir "$BUILDARCH"; fi sed -e "s/@BUILDARCH@/$BUILDARCH/" \ -e "s/@TARGET@/$TARGET/" \ -e "s%@CONFIG_OPTIONS@%$configoptions%" \ Makefile.in > Makefile if [ -d .git ]; then if ! ./prepare; then exit 1 fi fi config_kernel() { if [ ! -r config.h -o config.h -ot ../src/configure ]; then ../src/configure $kerneloptions $configoptions return $? fi } if ! (cd $BUILDARCH && config_kernel); then exit 1 fi