-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathconfigure
executable file
·61 lines (55 loc) · 1.71 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
prefix=/usr/local
nginx_dir=
hiredis_dir=/usr/local
openssl_dir=/usr/local
debugsym=false
for arg in "$@"; do
case "$arg" in
--with-nginx-dir=*)
nginx_dir=`echo $arg | sed 's/--with-nginx-dir=//'`
;;
--with-hiredis-dir=*)
hiredis_dir=`echo $arg | sed 's/--with-hiredis-dir=//'`
;;
--with-openssl-dir=*)
openssl_dir=`echo $arg | sed 's/--with-openssl-dir=//'`
;;
--prefix=*)
prefix=`echo $arg | sed 's/--prefix=//'`
;;
--enable-debug)
debugsym=true;;
--disable-debug)
debugsym=false;;
--help)
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --prefix=<path>: installation prefix. Default: /usr/local'
echo ' --with-nginx-dir=<path>: nginx source dir'
echo ' --with-hiredis-dir=<path>: hiredis base dir for include files. Default: /usr/local'
echo ' --with-openssl-dir=<path>: openssl base dir for include files. Default: /usr/local'
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
if [ "$nginx_dir" = "" ]
then
echo 'Is necessary to specify Nginx source dir'
echo 'Execute "./configure --help" for usage instructions'
exit 1
fi
echo 'generating makefile ...'
echo "PREFIX = $prefix" > Makefile
echo "NGINX_DIR = $nginx_dir" >> Makefile
echo "HIREDIS_DIR = $hiredis_dir" >> Makefile
echo "OPENSSL_DIR = $openssl_dir" >> Makefile
if $debugsym; then
echo 'dbg = -g' >> Makefile
fi
echo "" >> Makefile
cat Makefile.in >> Makefile
echo 'configuration complete, type make to build.'