Newer
Older
Philippe Brochard
committed
CONFIGURE_VERSION=0.2
Philippe Brochard
committed
PREFIX="/usr/local"
lisp=clisp
lisp_opt=''
Philippe Brochard
committed
lisp_bin=''
Philippe Brochard
committed
dump_path="\$XDG_CACHE_HOME/clfswm/"
clfswm_asd_path="$PREFIX/lib/clfswm"
asdf_path="$PREFIX/lib/clfswm/contrib"
Philippe Brochard
committed
echo "'configure' configures clfswm to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
-V, --version display version information and exit
Philippe Brochard
committed
--prefix PREFIX install architecture-independent files in PREFIX [/usr/local]
Philippe Brochard
committed
-l, --with-lisp use <lisp> as the common lisp implementation type [$lisp]
-b, --lisp-bin use <bin> as the common lisp program [$lisp_bin] (default: same as with-lisp type)
Philippe Brochard
committed
-o, --lisp-opt use <opt> as lisp option [$lisp_opt]
-d, --dump-path path to the dump directory [$dump_path]
--with-clfswm path to clfswm.asd file [$clfswm_asd_path]
--with-asdf path to the asdf.lisp file [$asdf_path]
By default, 'make install' will install all the files in
'/usr/local/bin', '/usr/local/lib' etc. You can specify
an installation prefix other than '/usr/local' using '--prefix',
Philippe Brochard
committed
for instance '--prefix \$HOME/clfswm'."
exit 0
}
version () {
echo "Configure version: $CONFIGURE_VERSION"
exit 0
}
Philippe Brochard
committed
reset_clfswm_asd_path=true
reset_asdf_path=true
Philippe Brochard
committed
while test $# != 0
do
Philippe Brochard
committed
--prefix)
shift
PREFIX="$1" ;;
-d|--dump-path)
shift
dump_path="$1" ;;
--with-clfswm)
shift
clfswm_asd_path="$1"
reset_clfswm_asd_path=false ;;
--with-asdf)
shift
asdf_path="$1"
reset_asdf_path=false ;;
-l|--with-lisp)
shift
case "$1" in
'')
usage;;
clisp|sbcl|cmucl|ccl|ecl)
lisp="$1" ;;
esac
;;
Philippe Brochard
committed
-b|--lisp-bin)
shift
lisp_bin="$1" ;;
Philippe Brochard
committed
-o|--lisp-opt)
shift
lisp_opt="$1" ;;
--)
shift
break ;;
*)
usage ;;
Philippe Brochard
committed
shift
Philippe Brochard
committed
Philippe Brochard
committed
if [ "$reset_clfswm_asd_path" = "true" ]; then
clfswm_asd_path="$PREFIX/lib/clfswm"
fi
Philippe Brochard
committed
if [ "$reset_asdf_path" = "true" ]; then
asdf_path="$PREFIX/lib/clfswm/contrib"
Philippe Brochard
committed
echo " prefix=$PREFIX
with-lisp=$lisp
Philippe Brochard
committed
lisp-bin=$lisp_bin
Philippe Brochard
committed
lisp-opt=$lisp_opt
dump-path=$dump_path
with-clfswm=$clfswm_asd_path
with-asdf=$asdf_path"
sed -e "s?^lisp=.*# +config+?lisp=\"$lisp\" # +config+?g" \
Philippe Brochard
committed
-e "s?^lisp_bin=.*# +config+?lisp_bin=\"$lisp_bin\" # +config+?g" \
Philippe Brochard
committed
-e "s?^lisp_opt=.*# +config+?lisp_opt=\"$lisp_opt\" # +config+?g" \
-e "s?^dump_path=.*# +config+?dump_path=\"$dump_path\" # +config+?g" \
-e "s?^clfswm_asd_path=.*# +config+?clfswm_asd_path=\"$clfswm_asd_path\" # +config+?g" \
-e "s?^asdf_path=.*# +config+?asdf_path=\"$asdf_path\" # +config+?g" \
$(pwd)/contrib/clfswm > $(pwd)/clfswm
sed -e "s#+DESTDIR+#$DESTDIR#g" \
-e "s#+BUILD_PATH+#$(pwd)/#g" \
Makefile.template > Makefile
Philippe Brochard
committed
Philippe Brochard
committed
echo "Type 'make' to build clfswm"