-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·53 lines (47 loc) · 1.13 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
#!/bin/sh
prefix=/usr/local
opt=false
dbg=true
build_mod_url=true
while [ $# != 0 ]; do
case $1 in
--prefix=*)
prefix=`echo $1 | sed 's/^--prefix=//'`
;;
--enable-opt)
opt=true
;;
--disable-opt)
opt=false
;;
--enable-dbg)
dbg=true
;;
--disable-dbg)
dbg=false
;;
--enable-url)
build_mod_url=true
;;
--disable-url)
build_mod_url=false
;;
esac
shift
done
echo "installation prefix: $prefix"
$build_mod_url && echo 'build mod_url: yes' || echo 'build mod_url: no'
$opt && echo 'optimizations: yes' || echo 'optimizations: no'
$dbg && echo 'debug symbols: yes' || echo 'debug symbols: no'
echo "Configuring assfile..."
echo "# do not modify this file manually, it's generated by the configure script" >Makefile
echo "PREFIX = $prefix" >>Makefile
$opt && echo '-O3' | xargs echo 'opt =' >>Makefile
$dbg && echo '-g' | xargs echo 'dbg =' >>Makefile
if $build_mod_url; then
echo 'mod_url_cflags = -DBUILD_MOD_URL' >>Makefile
echo 'mod_url_libs = -lcurl -lpthread' >>Makefile
fi
echo '# --- end of generated part, start of Makefile.in ---' >>Makefile
cat Makefile.in >>Makefile
echo 'Done. Run make (or gmake) to compile.'