-
Notifications
You must be signed in to change notification settings - Fork 0
/
build24.sh
executable file
·78 lines (64 loc) · 2.29 KB
/
build24.sh
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/sh
# -*-mode: ksh; ksh-indent: 2; -*-
#
# $Header$
#
# Simple Apache 2.4 build script.
#
TOP=`pwd`
APACHE_VER=2.4.50
#MPM=event
MPM=worker
#MPM=prefork
echo "build Apache $APACHE_VER"
if [ -d httpd-${APACHE_VER}-${MPM} ]; then
rm -rf httpd-${APACHE_VER}-${MPM}
fi
gzip -c -d $TOP/3thrdparty/httpd-${APACHE_VER}.tar.gz | tar xf -
rm -f httpd
rm -rf httpd-${APACHE_VER}-${MPM}
mv httpd-${APACHE_VER} httpd-${APACHE_VER}-${MPM}
ln -s httpd-${APACHE_VER}-${MPM} httpd
cd httpd/srclib
gzip -c -d $TOP/3thrdparty/apr-1.7.0.tar.gz | tar xf -
mv apr-1.7.0 apr
gzip -c -d $TOP/3thrdparty/apr-util-1.6.1.tar.gz | tar xf -
mv apr-util-1.6.1 apr-util
cd ../..
rm -rf httpd/modules/qos
mkdir -p httpd/modules/qos
ln -s `pwd`/httpd_src/modules/qos/mod_qos.c httpd/modules/qos
ln -s `pwd`/httpd_src/modules/qos/mod_qos.h httpd/modules/qos
ln -s `pwd`/httpd_src/modules/qos/config.m4 httpd/modules/qos
ln -s `pwd`/httpd_src/modules/qos/Makefile.in httpd/modules/qos
rm -rf httpd/modules/qtest
mkdir -p httpd/modules/qtest
ln -s `pwd`/httpd_src/modules/qtest/mod_qtest.c httpd/modules/qtest
ln -s `pwd`/httpd_src/modules/qtest/config.m4 httpd/modules/qtest
ln -s `pwd`/httpd_src/modules/qtest/Makefile.in httpd/modules/qtest
CFLAGS="-DDEFAULT_SERVER_LIMIT=512 -DDEFAULT_THREAD_LIMIT=256 -DQS_INTERNAL_TEST -g -Wall -O0"
export CFLAGS
cd httpd
prefix=$TOP/install
mkdir -p $prefix
#./configure --prefix=$prefix --with-apr=`pwd`/../../apr --with-mpm=${MPM} --enable-modules=all --enable-mods-static=all --with-module=qos:qos --enable-http2 --with-nghttp2=${TOP}/../nghttp2-1.10.0/ --with-ssl=${TOP}/../../openssl/
./configure --prefix=$prefix --with-included-apr --with-mpm=${MPM} --enable-modules=all --enable-mods-static=all --with-module=qos:qos --enable-http2
if [ $? -ne 0 ]; then
echo "ERROR"
exit 1
fi
make
if [ $? -ne 0 ]; then
echo "ERROR"
exit 1
fi
make install
cd ..
cp ../setenvifplus/httpd_src/modules/metadataplus/mod_setenvifplus.c install/modules
./install/bin/apxs -c ./install/modules/mod_setenvifplus.c
cp ../parp/httpd_src/modules/parp/mod_parp.c install/modules
cp ../parp/httpd_src/modules/parp/mod_parp.h install/modules
./install/bin/apxs -c ./install/modules/mod_parp.c
cp httpd_src/modules/qtest/mod_qtest.c install/modules
./install/bin/apxs -DQOS_TEST_MOD -c ./install/modules/mod_qtest.c
echo "END"