forked from SrainApp/srain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·43 lines (37 loc) · 1.03 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
prefix=/usr/local
config_dir=/etc
debugsym=true
for arg in "$@"; do
case "$arg" in
--prefix=*)
prefix=`echo $arg | sed 's/--prefix=//'`
;;
--config-dir=*)
config_dir=`echo $arg | sed 's/--config-dir=//'`
;;
--enable-debug)
debugsym=true;;
--disable-debug)
debugsym=false;;
--help)
echo 'Usage: ./configure [options]'
echo 'Options:'
echo ' --prefix=<path>: Installation prefix'
echo ' --config-dir=<path>: Configure file location'
echo ' --enable-debug: Include debug symbols'
echo ' --disable-debug: Do not include debug symbols'
echo 'All invalid options are silently ignored'
exit 0
;;
esac
done
echo 'Generating makefile ...'
echo '' > Makefile
echo "PREFIX = $prefix" | tee -a Makefile
echo "CONFIG_DIR = $config_dir" | tee -a Makefile
if $debugsym; then
echo 'DBGFLAGS = -ggdb' | tee -a Makefile
fi
cat Makefile.in >> Makefile
echo 'Configuration complete, type make to build.'