summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure124
1 files changed, 124 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000..798d9d2
--- /dev/null
+++ b/configure
@@ -0,0 +1,124 @@
+#!/bin/sh
+#
+# This file is a simple trampoline to the real configure script which
+# depends of the Scheme system used
+#
+# Known systems so far:
+# - Bigloo (use --with-bigloo)
+# - STklos (use --with-stklos)
+#
+# Author: Erick Gallesio [eg@essi.fr]
+# Creation date: 29-Jul-2003 13:59 (eg)
+# Last file update: 23-Sep-2004 17:14 (eg)
+
+
+use_bigloo=0
+use_stklos=0
+
+new_args=""
+export new_args
+prefix=/usr/local
+export prefix
+
+for i in "$@"; do
+ case $i in
+ --with-bigloo) scheme=bigloo; use_bigloo=1;;
+ --with-stklos) scheme=stklos; use_stklos=1;;
+ --prefix=*) prefix=`echo $i | sed 's/^[^=]*=//'`;
+ new_args="$new_args $i";;
+ *) new_args="$new_args \"$i\"";;
+ esac
+done
+
+#* for i in $* ;do */
+#* case $i in */
+#* --with-bigloo) scheme=bigloo; use_bigloo=1;; */
+#* --with-stklos) scheme=stklos; use_stklos=1;; */
+#* --prefix=*) prefix=`echo $i | sed 's/^[^=]*=//'`; */
+#* new_args="$new_args $i";; */
+#* *) new_args="$new_args $i";; */
+#* esac */
+#* done */
+
+
+case `expr $use_bigloo + $use_stklos` in
+ 0) echo "You must at least specify a Scheme system: ";
+ echo " --with-bigloo to use Bigloo"
+ echo " --with-stklos to use STklos"
+ exit 1;;
+ 1) ;;
+ *) echo "You must specify ONLY ONE Scheme system"; exit 1;;
+esac
+
+if test $use_bigloo = 1 ;then
+ scheme=bigloo
+fi
+
+if test $use_stklos = 1 ;then
+ scheme=stklos
+fi
+
+
+
+# Common configuration
+release="1.2d"
+skribeurl="http://www.inria.fr/mimosa/fp/Skribe"
+skribeextdir="$prefix/share/skribe/extensions"
+skribedocdir=$prefix/doc/skribe-$release
+skribeskrdir="'(\".\" \"$skribeextdir\" \"$prefix/share/skribe/$release/skr\" )"
+
+# etc/config
+rm -f etc/config 2> /dev/null
+echo "# Automatically generated file (don't edit)" > etc/config
+echo "release=$release" >> etc/config
+echo "skribeurl=$skribeurl" >> etc/config
+echo "prefix=$prefix" >> etc/config
+
+# etc/skribe-config
+cat etc/skribe-config.in \
+ | sed "s|@SKRIBE_RELEASE@|$release|" \
+ | sed "s|@PREFIX@|$prefix|" \
+ | sed "s|@SKRIBE_SKR_DIR@|$prefix/share/skribe/$release/skr|" \
+ | sed "s|@SKRIBE_EXT_DIR@|$skribeextdir|" \
+ | sed "s|@SKRIBE_DOC_DIR@|$skribedocdir|" \
+ | sed "s|@SYSTEM@|$scheme|" \
+ > etc/skribe-config
+chmod a+x etc/skribe-config
+
+# emacs/skribe.el
+cat emacs/skribe.el.in \
+ | sed "s|@SKRIBE_RELEASE@|$release|" \
+ | sed "s|@PREFIX@|$prefix|" \
+ | sed "s|@SKRIBE_EXT_DIR@|$skribeextdir|" \
+ | sed "s|@SYSTEM@|$scheme|" \
+ | sed "s|@SKRIBE_DOCDIR@|$skribedocdir|" \
+ > emacs/skribe.el
+
+# src/common/configure.scm
+rm -f src/common/configure.scm 2> /dev/null
+echo ";; Automatically generated file (don't edit)" > src/common/configure.scm
+cat src/common/configure.scm.in \
+ | sed "s|@SKRIBE_RELEASE@|$release|" \
+ | sed "s|@SKRIBE_URL@|$skribeurl|" \
+ | sed "s|@SKRIBE_DOC_DIR@|$skribedocdir|" \
+ | sed "s|@SKRIBE_EXT_DIR@|$skribeextdir|" \
+ | sed "s|@SKRIBE_SKR_PATH@|$skribeskrdir|" \
+ | sed "s|@SKRIBE_SCHEME@|$scheme|" \
+ >> src/common/configure.scm
+echo "" >> src/common/configure.scm
+
+if test $use_bigloo = 1 ;then
+ # pass all the arguments to the Bigloo autoconf without the --with-bigloo
+ echo "Using Bigloo system"
+ eval "cd etc/bigloo; SKRIBERELEASE=$release ./configure --docdir=$skribedocdir $new_args"
+ exit 0
+fi
+
+# If we are here, it means that we use the STklos system
+if test $use_stklos = 1 ;then
+ # pass all the arguments to the STklos autoconf without the --with-stklos
+ echo "Using STklos system"
+ eval "cd etc/stklos; ./configure $new_args"
+ exit 0
+fi
+