src/clfswm-configuration.lisp (query-conf-value): Add the ability to leave the field...
[clfswm.git] / configure
blobefd100fa52511a225f0322ff98d6634a67b58838
1 #! /bin/sh
3 CONFIGURE_VERSION=0.2
5 PREFIX="/usr/local"
6 lisp=clisp
7 lisp_opt=''
8 dump_path="\$XDG_CACHE_HOME/clfswm/"
9 clfswm_asd_path="$PREFIX/lib/clfswm"
10 asdf_path="$PREFIX/lib/clfswm/contrib"
12 usage () {
13 echo "'configure' configures clfswm to adapt to many kinds of systems.
15 Usage: ./configure [OPTION]... [VAR=VALUE]...
17 Defaults for the options are specified in brackets.
19 Configuration:
20 -h, --help display this help and exit
21 -V, --version display version information and exit
22 --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
23 -l, --with-lisp use <lisp> as the common lisp implementation [$lisp]
24 -o, --lisp-opt use <opt> as lisp option [$lisp_opt]
25 -d, --dump-path path to the dump directory [$dump_path]
26 --with-clfswm path to clfswm.asd file [$clfswm_asd_path]
27 --with-asdf path to the asdf.lisp file [$asdf_path]
29 By default, 'make install' will install all the files in
30 '/usr/local/bin', '/usr/local/lib' etc. You can specify
31 an installation prefix other than '/usr/local' using '--prefix',
32 for instance '--prefix=\$HOME/clfswm'."
33 exit 0
37 version () {
38 echo "Configure version: $CONFIGURE_VERSION"
39 exit 0
42 reset_clfswm_asd_path=true
43 reset_asdf_path=true
45 while test $# != 0
47 case "$1" in
48 --prefix)
49 shift
50 PREFIX="$1" ;;
51 -d|--dump-path)
52 shift
53 dump_path="$1" ;;
54 --with-clfswm)
55 shift
56 clfswm_asd_path="$1"
57 reset_clfswm_asd_path=false ;;
58 --with-asdf)
59 shift
60 asdf_path="$1"
61 reset_asdf_path=false ;;
62 -l|--with-lisp)
63 shift
64 case "$1" in
65 '')
66 usage;;
67 clisp|sbcl|cmucl|ccl|ecl)
68 lisp="$1" ;;
69 esac
71 -o|--lisp-opt)
72 shift
73 lisp_opt="$1" ;;
74 --)
75 shift
76 break ;;
78 usage ;;
79 esac
80 shift
81 done
84 DESTDIR=$PREFIX
86 if [ "$reset_clfswm_asd_path" = "true" ]; then
87 clfswm_asd_path="$PREFIX/lib/clfswm"
90 if [ "$reset_asdf_path" = "true" ]; then
91 asdf_path="$PREFIX/lib/clfswm/contrib"
95 echo " prefix=$PREFIX
96 with-lisp=$lisp
97 lisp-opt=$lisp_opt
98 dump-path=$dump_path
99 with-clfswm=$clfswm_asd_path
100 with-asdf=$asdf_path"
104 sed -e "s?^lisp=.*# +config+?lisp=\"$lisp\" # +config+?g" \
105 -e "s?^lisp_opt=.*# +config+?lisp_opt=\"$lisp_opt\" # +config+?g" \
106 -e "s?^dump_path=.*# +config+?dump_path=\"$dump_path\" # +config+?g" \
107 -e "s?^clfswm_asd_path=.*# +config+?clfswm_asd_path=\"$clfswm_asd_path\" # +config+?g" \
108 -e "s?^asdf_path=.*# +config+?asdf_path=\"$asdf_path\" # +config+?g" \
109 $(pwd)/contrib/clfswm > $(pwd)/clfswm
111 sed -e "s#+DESTDIR+#$DESTDIR#g" \
112 -e "s#+BUILD_PATH+#$(pwd)/#g" \
113 Makefile.template > Makefile
116 echo ""
117 echo "Type 'make' to build clfswm"
118 echo ""