Added query-mode-complete-suggest and helpers.
[clfswm.git] / configure
blobf366b8723f0b884c59f9ac95f3b1fb6d5af29c5a
1 #! /bin/sh
3 CONFIGURE_VERSION=0.2
5 PREFIX="/usr/local"
6 lisp=clisp
7 lisp_opt=''
8 lisp_bin=''
9 dump_path="\$XDG_CACHE_HOME/clfswm/"
10 clfswm_asd_path="$PREFIX/lib/clfswm"
11 asdf_path="$PREFIX/lib/clfswm/contrib"
13 usage () {
14 echo "'configure' configures clfswm to adapt to many kinds of systems.
16 Usage: ./configure [OPTION]... [VAR=VALUE]...
18 Defaults for the options are specified in brackets.
20 Configuration:
21 -h, --help display this help and exit
22 -V, --version display version information and exit
23 --prefix PREFIX install architecture-independent files in PREFIX [/usr/local]
24 -l, --with-lisp use <lisp> as the common lisp implementation type [$lisp]
25 -b, --lisp-bin use <bin> as the common lisp program [$lisp_bin] (default: same as with-lisp type)
26 -o, --lisp-opt use <opt> as lisp option [$lisp_opt]
27 -d, --dump-path path to the dump directory [$dump_path]
28 --with-clfswm path to clfswm.asd file [$clfswm_asd_path]
29 --with-asdf path to the asdf.lisp file [$asdf_path]
31 By default, 'make install' will install all the files in
32 '/usr/local/bin', '/usr/local/lib' etc. You can specify
33 an installation prefix other than '/usr/local' using '--prefix',
34 for instance '--prefix \$HOME/clfswm'."
35 exit 0
39 version () {
40 echo "Configure version: $CONFIGURE_VERSION"
41 exit 0
44 reset_clfswm_asd_path=true
45 reset_asdf_path=true
47 while test $# != 0
49 case "$1" in
50 --prefix)
51 shift
52 PREFIX="$1" ;;
53 -d|--dump-path)
54 shift
55 dump_path="$1" ;;
56 --with-clfswm)
57 shift
58 clfswm_asd_path="$1"
59 reset_clfswm_asd_path=false ;;
60 --with-asdf)
61 shift
62 asdf_path="$1"
63 reset_asdf_path=false ;;
64 -l|--with-lisp)
65 shift
66 case "$1" in
67 '')
68 usage;;
69 clisp|sbcl|cmucl|ccl|ecl)
70 lisp="$1" ;;
71 esac
73 -b|--lisp-bin)
74 shift
75 lisp_bin="$1" ;;
76 -o|--lisp-opt)
77 shift
78 lisp_opt="$1" ;;
79 --)
80 shift
81 break ;;
83 usage ;;
84 esac
85 shift
86 done
89 DESTDIR=$PREFIX
91 if [ "$reset_clfswm_asd_path" = "true" ]; then
92 clfswm_asd_path="$PREFIX/lib/clfswm"
95 if [ "$reset_asdf_path" = "true" ]; then
96 asdf_path="$PREFIX/lib/clfswm/contrib"
100 echo " prefix=$PREFIX
101 with-lisp=$lisp
102 lisp-bin=$lisp_bin
103 lisp-opt=$lisp_opt
104 dump-path=$dump_path
105 with-clfswm=$clfswm_asd_path
106 with-asdf=$asdf_path"
110 sed -e "s?^lisp=.*# +config+?lisp=\"$lisp\" # +config+?g" \
111 -e "s?^lisp_bin=.*# +config+?lisp_bin=\"$lisp_bin\" # +config+?g" \
112 -e "s?^lisp_opt=.*# +config+?lisp_opt=\"$lisp_opt\" # +config+?g" \
113 -e "s?^dump_path=.*# +config+?dump_path=\"$dump_path\" # +config+?g" \
114 -e "s?^clfswm_asd_path=.*# +config+?clfswm_asd_path=\"$clfswm_asd_path\" # +config+?g" \
115 -e "s?^asdf_path=.*# +config+?asdf_path=\"$asdf_path\" # +config+?g" \
116 $(pwd)/contrib/clfswm > $(pwd)/clfswm
118 sed -e "s#+DESTDIR+#$DESTDIR#g" \
119 -e "s#+BUILD_PATH+#$(pwd)/#g" \
120 Makefile.template > Makefile
123 echo ""
124 echo "Type 'make' to build clfswm"
125 echo ""