src/clfswm-util.lisp (update-menus): Follow XDG specifications instead of the non...
[clfswm.git] / contrib / server / configure
blobf1fe773e48ee1b038d70e9a7494a4b45624f2721
1 #! /bin/sh
3 PROJECT_NAME=clfswm-client
4 CONFIGURE_VERSION=0.1
7 usage () {
8 echo "'configure' configures $PROJECT_NAME to adapt to many kinds of systems.
10 Usage: ./configure [OPTION]... [VAR=VALUE]...
12 Please, be sure to edit the file key.lisp to change the encryption key. And
13 protect this file from unwanted eyes.
15 Defaults for the options are specified in brackets.
17 Configuration:
18 -h, --help display this help and exit
19 -V, --version display version information and exit
20 --with-lisp=LISP use a particular Lisp implementation [ask]
21 --with-lisp-eval-opt=OPT use a particular Lisp eval command line option
22 --with-lisp-load-opt=OPT use a particular Lisp load command line option
23 --with-lisp-ext=OPT use a particular Lisp extension filename
24 --with-lisp-core=CORE use a particular Lisp core (initial memory image)
25 --prefix=PREFIX install architecture-independent files in PREFIX
26 [/usr/local]
28 By default, 'make install' will install all the files in
29 '/usr/local/bin', '/usr/local/lib' etc. You can specify
30 an installation prefix other than '/usr/local' using '--prefix',
31 for instance '--prefix=$HOME'."
32 exit 0
36 version () {
37 echo "Configure version: $CONFIGURE_VERSION"
38 exit 0
43 TEMP=`getopt -o hV: --long help,version,srcdir:,with-lisp:,with-lisp-eval-opt:,with-lisp-load-opt:,with-lisp-ext:,with-lisp-core:,prefix: -- "$@"`
44 PREFIX=/usr/local
46 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
48 eval set -- "$TEMP"
50 while true ; do
51 case "$1" in
52 -h|--help) usage ; shift ;;
53 -V|--version) version ; shift ;;
54 --srcdir) SRCDIR=$2 ; shift 2 ;;
55 --with-lisp) LISP=$2 ; shift 2 ;;
56 --with-lisp-eval-opt) EVAL_OPT=$2 ; shift 2 ;;
57 --with-lisp-load-opt) LOAD_OPT=$2 ; shift 2 ;;
58 --with-lisp-ext) EXT=$2 ; shift 2 ;;
59 --with-lisp-core) CORE=$2 ; shift 2 ;;
60 --prefix) PREFIX=$2 ; shift 2 ;;
61 --key-perms) KEY_PERMS=$2 ; shift 2 ;;
62 --) shift ; break ;;
63 *) echo "Internal error!" ; exit 1 ;;
64 esac
65 done
67 DESTDIR=$PREFIX
70 if [ "x$LISP" = "x" ]; then
71 echo "Please, choose a Lisp implementation in:
72 1) SBCL 2) CMUCL 3) CLISP 4) ECL 5) CCL 6) Other"
73 read REP_LISP
74 case $REP_LISP in
75 1) LISP=sbcl ;;
76 2) LISP=cmucl ;;
77 3) LISP=clisp ;;
78 4) LISP=ecl ;;
79 5) LISP=ccl ;;
80 6) echo -n "Please, enter your Lisp implementation: "
81 read LISP ;;
82 *) echo "Error"; exit -1 ;;
83 esac
86 EXTRA_OPT=""
88 case $LISP in
89 clisp) LISP=$(which clisp)
90 EVAL_OPT="-x -q"
91 LOAD_OPT=""
92 EXT=fas ;;
93 sbcl) LISP=$(which sbcl)
94 EVAL_OPT="--eval"
95 LOAD_OPT="--load"
96 EXT=fasl ;;
97 cmucl) LISP=$(which cmucl)
98 EVAL_OPT="-eval"
99 LOAD_OPT="-load"
100 EXT=x86f ;;
101 ecl) LISP=$(which ecl)
102 EVAL_OPT="-eval"
103 LOAD_OPT="-load"
104 EXT=fas ;;
105 ccl) LISP=$(which ccl)
106 EVAL_OPT="-e"
107 LOAD_OPT="-l"
108 EXT=lx32fsl
109 EXTRA_OPT="--" ;;
110 esac
112 echo "Configuration:"
113 echo SRCDIR = $SRCDIR
114 echo PREFIX = $PREFIX
115 echo "LISP=$LISP EVAL_OPT=$EVAL_OPT LOAD_OPT=$LOAD_OPT EXT=$EXT CORE=$CORE EXTRA_OPT=$EXTRA_OPT"
117 sed -e "s#+PROJECT_NAME+#$PROJECT_NAME#g" \
118 -e "s#+DESTDIR+#$DESTDIR#g" \
119 -e "s#+LISP+#$LISP#g" \
120 -e "s#+EVAL_OPT+#$EVAL_OPT#g" \
121 -e "s#+LOAD_OPT+#$LOAD_OPT#g" \
122 -e "s#+EXT+#$EXT#g" \
123 -e "s#+CORE+#$CORE#g" \
124 -e "s#+EXTRA_OPT+#$EXTRA_OPT#g" \
125 Makefile.template > Makefile
127 echo ""
128 echo "Type 'make' to build $PROJECT_NAME"
129 echo ""