winlin

always use static link, for manually build arm, and x86/64 use static link is ok.

@@ -201,7 +201,7 @@ Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then "CentOS perfapre failed, ret=$ @@ -201,7 +201,7 @@ Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then "CentOS perfapre failed, ret=$
201 # check the arm flag file, if flag changed, need to rebuild the st. 201 # check the arm flag file, if flag changed, need to rebuild the st.
202 if [ $SRS_ARM_UBUNTU12 = YES ]; then 202 if [ $SRS_ARM_UBUNTU12 = YES ]; then
203 # ok, arm specified, if the flag filed does not exists, need to rebuild. 203 # ok, arm specified, if the flag filed does not exists, need to rebuild.
204 - if [[ -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st-1.9/obj/libst.a && -f ${SRS_OBJS}/st-1.9/obj/libst.so ]]; then 204 + if [[ -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a && -f ${SRS_OBJS}/st/libst.so ]]; then
205 echo "st-1.9t for arm is ok."; 205 echo "st-1.9t for arm is ok.";
206 else 206 else
207 # TODO: FIXME: patch the bug. 207 # TODO: FIXME: patch the bug.
@@ -218,7 +218,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then @@ -218,7 +218,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then
218 fi 218 fi
219 else 219 else
220 # arm not specified, if exists flag, need to rebuild for no-arm platform. 220 # arm not specified, if exists flag, need to rebuild for no-arm platform.
221 - if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st-1.9/obj/libst.a && -f ${SRS_OBJS}/st-1.9/obj/libst.so ]]; then 221 + if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a && -f ${SRS_OBJS}/st/libst.so ]]; then
222 echo "st-1.9t is ok."; 222 echo "st-1.9t is ok.";
223 else 223 else
224 echo "build st-1.9t"; 224 echo "build st-1.9t";
@@ -233,14 +233,14 @@ else @@ -233,14 +233,14 @@ else
233 fi 233 fi
234 # check status 234 # check status
235 ret=$?; if [[ $ret -ne 0 ]]; then echo "build st-1.9 failed, ret=$ret"; exit $ret; fi 235 ret=$?; if [[ $ret -ne 0 ]]; then echo "build st-1.9 failed, ret=$ret"; exit $ret; fi
236 -if [ ! -f ${SRS_OBJS}/st-1.9/obj/libst.a ]; then echo "build st-1.9 failed."; exit -1; fi  
237 -if [ ! -f ${SRS_OBJS}/st-1.9/obj/libst.so ]; then echo "build st-1.9 failed."; exit -1; fi 236 +if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "build st-1.9 failed."; exit -1; fi
  237 +if [ ! -f ${SRS_OBJS}/st/libst.so ]; then echo "build st-1.9 failed."; exit -1; fi
238 238
239 ##################################################################################### 239 #####################################################################################
240 # http-parser-2.1 240 # http-parser-2.1
241 ##################################################################################### 241 #####################################################################################
242 if [ $SRS_HTTP_CALLBACK = YES ]; then 242 if [ $SRS_HTTP_CALLBACK = YES ]; then
243 - if [[ -f ${SRS_OBJS}/http-parser-2.1/http_parser.h && -f ${SRS_OBJS}/http-parser-2.1/libhttp_parser.a ]]; then 243 + if [[ -f ${SRS_OBJS}/hp/http_parser.h && -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then
244 echo "http-parser-2.1 is ok."; 244 echo "http-parser-2.1 is ok.";
245 else 245 else
246 echo "build http-parser-2.1"; 246 echo "build http-parser-2.1";
@@ -255,8 +255,8 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then @@ -255,8 +255,8 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then
255 fi 255 fi
256 # check status 256 # check status
257 ret=$?; if [[ $ret -ne 0 ]]; then echo "build http-parser-2.1 failed, ret=$ret"; exit $ret; fi 257 ret=$?; if [[ $ret -ne 0 ]]; then echo "build http-parser-2.1 failed, ret=$ret"; exit $ret; fi
258 - if [[ ! -f ${SRS_OBJS}/http-parser-2.1/http_parser.h ]]; then echo "build http-parser-2.1 failed"; exit -1; fi  
259 - if [[ ! -f ${SRS_OBJS}/http-parser-2.1/libhttp_parser.a ]]; then echo "build http-parser-2.1 failed"; exit -1; fi 258 + if [[ ! -f ${SRS_OBJS}/hp/http_parser.h ]]; then echo "build http-parser-2.1 failed"; exit -1; fi
  259 + if [[ ! -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then echo "build http-parser-2.1 failed"; exit -1; fi
260 fi 260 fi
261 261
262 ##################################################################################### 262 #####################################################################################
@@ -316,8 +316,8 @@ if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile @@ -316,8 +316,8 @@ if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile
316 # gperftools-2.1, for mem check and mem/cpu profile 316 # gperftools-2.1, for mem check and mem/cpu profile
317 LibGperfRoot=""; LibGperfFile="" 317 LibGperfRoot=""; LibGperfFile=""
318 if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi 318 if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi
319 -# the link options, if arm, use static link  
320 -SrsLinkOptions="-ldl"; if [ $SRS_ARM_UBUNTU12 = YES ]; then SrsLinkOptions="-ldl -static"; fi 319 +# the link options, always use static link
  320 +SrsLinkOptions="-static"
321 321
322 ##################################################################################### 322 #####################################################################################
323 # Modules, compile each module, then link to binary 323 # Modules, compile each module, then link to binary