winlin

refine options, change to 0.9.66

@@ -39,38 +39,111 @@ SRS_GPERF_MP=RESERVED @@ -39,38 +39,111 @@ SRS_GPERF_MP=RESERVED
39 SRS_GPERF_CP=RESERVED 39 SRS_GPERF_CP=RESERVED
40 # gprof 40 # gprof
41 SRS_GPROF=RESERVED 41 SRS_GPROF=RESERVED
42 -# armhf(v7cpu) built on ubuntu12  
43 -SRS_ARM_UBUNTU12=RESERVED  
44 # 42 #
45 # arguments 43 # arguments
46 SRS_PREFIX=/usr/local/srs 44 SRS_PREFIX=/usr/local/srs
47 SRS_JOBS=1 45 SRS_JOBS=1
48 SRS_STATIC=RESERVED 46 SRS_STATIC=RESERVED
49 # 47 #
50 -# private internal 48 +# presets
  49 +# for x86/x64 pc/servers
  50 +SRS_X86_X64=NO
  51 +# armhf(v7cpu) built on ubuntu12
  52 +SRS_ARM_UBUNTU12=NO
51 # dev, open all features for dev, no gperf/prof/arm. 53 # dev, open all features for dev, no gperf/prof/arm.
52 SRS_DEV=NO 54 SRS_DEV=NO
53 # raspberry-pi, open hls/ssl/static 55 # raspberry-pi, open hls/ssl/static
54 SRS_PI=NO 56 SRS_PI=NO
55 57
56 ##################################################################################### 58 #####################################################################################
57 -# parse options 59 +# menu
58 ##################################################################################### 60 #####################################################################################
59 -opt= 61 +function show_help() {
  62 + cat << END
60 63
61 -for option  
62 -do  
63 - opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`" 64 +Options:
  65 + -h, --help print this message
  66 +
  67 + --with-ssl enable rtmp complex handshake, requires openssl-devel installed.
  68 + to delivery h264 video and aac audio to flash player.
  69 + --with-hls enable hls streaming, mux RTMP to m3u8/ts files.
  70 + --with-dvr enable dvr, mux RTMP to flv files.
  71 + --with-nginx enable delivery HTTP stream with nginx.
  72 + build nginx at: ./objs/nginx/sbin/nginx
  73 + --with-http-callback enable http hooks, build cherrypy as demo api server.
  74 + --with-http-server enable http server to delivery http stream.
  75 + --with-http-api enable http api, to manage SRS by http api.
  76 + --with-ffmpeg enable transcoding tool ffmpeg.
  77 + build ffmpeg at: ./objs/ffmpeg/bin/ffmpeg
  78 + --with-transcode enable transcoding features.
  79 + user must specifies the transcode tools in conf.
  80 + --with-ingest enable ingest features.
  81 + user must specifies the ingest tools in conf.
  82 + --with-librtmp enable srs-librtmp, library for client.
  83 + --with-bwtc enable SRS bandwidth test client tool.
  84 + --with-research build the research tools.
  85 + --with-utest build the utest for SRS.
  86 + --with-gperf build SRS with gperf tools(no gmc/gmp/gcp, with tcmalloc only).
  87 + --with-gmc build memory check for SRS with gperf tools.
  88 + --with-gmp build memory profile for SRS with gperf tools.
  89 + --with-gcp build cpu profile for SRS with gperf tools.
  90 + --with-gprof build SRS with gprof(GNU profile tool).
  91 + --with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu).
  92 +
  93 + --without-ssl disable rtmp complex handshake.
  94 + --without-hls disable hls, rtmp streaming only.
  95 + --without-dvr disable dvr, donot support record RTMP stream to flv.
  96 + --without-nginx disable delivery HTTP stream with nginx.
  97 + --without-http-callback disable http, http hooks callback.
  98 + --without-http-server disable http server, use external server to delivery http stream.
  99 + --without-http-api disable http api, only use console to manage SRS process.
  100 + --without-ffmpeg disable the ffmpeg transcode tool feature.
  101 + --without-transcode disable the transcoding feature.
  102 + --without-ingest disable the ingest feature.
  103 + --without-librtmp disable srs-librtmp, library for client.
  104 + --without-bwtc disable SRS bandwidth test client tool.
  105 + --without-research do not build the research tools.
  106 + --without-utest do not build the utest for SRS.
  107 + --without-gperf do not build SRS with gperf tools(without tcmalloc and gmc/gmp/gcp).
  108 + --without-gmc do not build memory check for SRS with gperf tools.
  109 + --without-gmp do not build memory profile for SRS with gperf tools.
  110 + --without-gcp do not build cpu profile for SRS with gperf tools.
  111 + --without-gprof do not build srs with gprof(GNU profile tool).
  112 + --without-arm-ubuntu12 do not build srs on ubuntu12 for armhf(v7cpu).
  113 +
  114 + --prefix=<path> the absolute install path for srs.
  115 + --static whether add '-static' to link options. always set this option for arm.
  116 + --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
  117 + used for make in the configure, for example, to make ffmpeg.
64 118
65 - case "$option" in  
66 - -*=*)  
67 - value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`  
68 - option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`  
69 - ;;  
70 - *) value="" ;;  
71 - esac 119 +Presets:
  120 + --x86_x64 [default] for x86/x64 cpu, common pc and servers.
  121 + --pi for raspberry-pi(directly build), open features hls/ssl/static.
  122 + --arm alias for --with-arm-ubuntu12
  123 + --dev for dev, open all features, no gperf/gprof/arm.
  124 +
  125 +Conflicts:
  126 + 1. --dev/x86_x64 vs --static:
  127 + the --static only for arm cpus.
  128 + 2. --with-gmc vs --with-gmp:
  129 + @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
  130 + 3. --with-gperf/gmc/gmp vs --with-gprof:
  131 + gperftools not compatible with gprof.
  132 + 4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof:
  133 + the complex tools not available for arm.
  134 +
  135 +Workflow:
  136 + 1. apply "Presets". if not specified, use default preset.
  137 + 2. apply "Options". user specified option will override the preset.
  138 + 3. check conflicts. @see Conflicts section.
  139 + 4. generate detail features.
  140 +
  141 +END
  142 +}
72 143
  144 +function parse_user_option() {
73 case "$option" in 145 case "$option" in
  146 + -h) help=yes ;;
74 --help) help=yes ;; 147 --help) help=yes ;;
75 148
76 --with-ssl) SRS_SSL=YES ;; 149 --with-ssl) SRS_SSL=YES ;;
@@ -120,6 +193,7 @@ do @@ -120,6 +193,7 @@ do
120 --static) SRS_STATIC=YES ;; 193 --static) SRS_STATIC=YES ;;
121 194
122 --dev) SRS_DEV=YES ;; 195 --dev) SRS_DEV=YES ;;
  196 + --x86_x64) SRS_X86_X64=YES ;;
123 --arm) SRS_ARM_UBUNTU12=YES ;; 197 --arm) SRS_ARM_UBUNTU12=YES ;;
124 --pi) SRS_PI=YES ;; 198 --pi) SRS_PI=YES ;;
125 199
@@ -128,68 +202,87 @@ do @@ -128,68 +202,87 @@ do
128 exit 1 202 exit 1
129 ;; 203 ;;
130 esac 204 esac
131 -done 205 +}
132 206
133 ##################################################################################### 207 #####################################################################################
134 -# apply the default value when user donot specified. 208 +# parse preset options
135 ##################################################################################### 209 #####################################################################################
136 -# if transcode specified, try ffmpeg if possible.  
137 -if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi  
138 -if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi 210 +opt=
  211 +
  212 +for option
  213 +do
  214 + opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
  215 +
  216 + case "$option" in
  217 + -*=*)
  218 + value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`
  219 + option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`
  220 + ;;
  221 + *) value="" ;;
  222 + esac
  223 +
  224 + parse_user_option
  225 +done
  226 +
  227 +# set default preset if not specifies
  228 +if [ $SRS_DEV = NO ]; then
  229 + if [ $SRS_ARM_UBUNTU12 = NO ]; then
  230 + if [ $SRS_PI = NO ]; then
  231 + if [ $SRS_X86_X64 = NO ]; then
  232 + SRS_X86_X64=YES; opt="--x86_x64 $opt";
  233 + fi
  234 + fi
  235 + fi
  236 +fi
139 237
140 # if arm specified, set some default to disabled. 238 # if arm specified, set some default to disabled.
141 if [ $SRS_ARM_UBUNTU12 = YES ]; then 239 if [ $SRS_ARM_UBUNTU12 = YES ]; then
142 - if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi  
143 - if [ $SRS_DVR = RESERVED ]; then SRS_DVR=YES; fi 240 + SRS_HLS=YES
  241 + SRS_DVR=YES
144 SRS_NGINX=NO 242 SRS_NGINX=NO
145 - if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi 243 + SRS_SSL=YES
146 SRS_FFMPEG_TOOL=NO 244 SRS_FFMPEG_TOOL=NO
147 - if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=YES; fi  
148 - if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=YES; fi  
149 - if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi  
150 - if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=YES; fi  
151 - if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi  
152 - if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi  
153 - if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi  
154 - if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi  
155 - if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi  
156 - if [ $SRS_UTEST = RESERVED ]; then SRS_UTEST=NO; fi  
157 - if [ $SRS_GPERF = RESERVED ]; then SRS_GPERF=NO; fi  
158 - if [ $SRS_GPERF_MC = RESERVED ]; then SRS_GPERF_MC=NO; fi  
159 - if [ $SRS_GPERF_MP = RESERVED ]; then SRS_GPERF_MP=NO; fi  
160 - if [ $SRS_GPERF_CP = RESERVED ]; then SRS_GPERF_CP=NO; fi  
161 - if [ $SRS_GPROF = RESERVED ]; then SRS_GPROF=NO; fi  
162 - if [ $SRS_ARM_UBUNTU12 = RESERVED ]; then SRS_ARM_UBUNTU12=NO; fi  
163 - if [ $SRS_DEV = RESERVED ]; then SRS_DEV=NO; fi  
164 - if [ $SRS_PI = RESERVED ]; then SRS_PI=NO; fi  
165 - # for arm, always set to static link. 245 + SRS_TRANSCODE=YES
  246 + SRS_INGEST=YES
  247 + SRS_HTTP_PARSER=YES
  248 + SRS_HTTP_CALLBACK=YES
  249 + SRS_HTTP_SERVER=YES
  250 + SRS_HTTP_API=YES
  251 + SRS_LIBRTMP=NO
  252 + SRS_BWTC=NO
  253 + SRS_RESEARCH=NO
  254 + SRS_UTEST=NO
  255 + SRS_GPERF=NO
  256 + SRS_GPERF_MC=NO
  257 + SRS_GPERF_MP=NO
  258 + SRS_GPERF_CP=NO
  259 + SRS_GPROF=NO
166 SRS_STATIC=YES 260 SRS_STATIC=YES
  261 +fi
  262 +
167 # defaults for x86/x64 263 # defaults for x86/x64
168 -else  
169 - if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi  
170 - if [ $SRS_DVR = RESERVED ]; then SRS_DVR=YES; fi  
171 - if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi  
172 - if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi  
173 - if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=NO; fi  
174 - if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi  
175 - if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=NO; fi  
176 - if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi  
177 - if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=YES; fi  
178 - if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi  
179 - if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi  
180 - if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi  
181 - if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi  
182 - if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi  
183 - if [ $SRS_UTEST = RESERVED ]; then SRS_UTEST=NO; fi  
184 - if [ $SRS_GPERF = RESERVED ]; then SRS_GPERF=NO; fi  
185 - if [ $SRS_GPERF_MC = RESERVED ]; then SRS_GPERF_MC=NO; fi  
186 - if [ $SRS_GPERF_MP = RESERVED ]; then SRS_GPERF_MP=NO; fi  
187 - if [ $SRS_GPERF_CP = RESERVED ]; then SRS_GPERF_CP=NO; fi  
188 - if [ $SRS_GPROF = RESERVED ]; then SRS_GPROF=NO; fi  
189 - if [ $SRS_ARM_UBUNTU12 = RESERVED ]; then SRS_ARM_UBUNTU12=NO; fi  
190 - if [ $SRS_STATIC = RESERVED ]; then SRS_STATIC=NO; fi  
191 - if [ $SRS_DEV = RESERVED ]; then SRS_DEV=NO; fi  
192 - if [ $SRS_PI = RESERVED ]; then SRS_PI=NO; fi 264 +if [ $SRS_X86_X64 = YES ]; then
  265 + SRS_HLS=YES
  266 + SRS_DVR=YES
  267 + SRS_NGINX=NO
  268 + SRS_SSL=YES
  269 + SRS_FFMPEG_TOOL=NO
  270 + SRS_TRANSCODE=YES
  271 + SRS_INGEST=YES
  272 + SRS_HTTP_PARSER=YES
  273 + SRS_HTTP_CALLBACK=YES
  274 + SRS_HTTP_SERVER=YES
  275 + SRS_HTTP_API=YES
  276 + SRS_LIBRTMP=YES
  277 + SRS_BWTC=YES
  278 + SRS_RESEARCH=NO
  279 + SRS_UTEST=YES
  280 + SRS_GPERF=NO
  281 + SRS_GPERF_MC=NO
  282 + SRS_GPERF_MP=NO
  283 + SRS_GPERF_CP=NO
  284 + SRS_GPROF=NO
  285 + SRS_STATIC=NO
193 fi 286 fi
194 287
195 # if dev specified, open features if possible. 288 # if dev specified, open features if possible.
@@ -206,16 +299,14 @@ if [ $SRS_DEV = YES ]; then @@ -206,16 +299,14 @@ if [ $SRS_DEV = YES ]; then
206 SRS_HTTP_SERVER=YES 299 SRS_HTTP_SERVER=YES
207 SRS_HTTP_API=YES 300 SRS_HTTP_API=YES
208 SRS_LIBRTMP=YES 301 SRS_LIBRTMP=YES
209 - if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=YES; fi  
210 - if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=YES; fi 302 + SRS_BWTC=YES
  303 + SRS_RESEARCH=YES
211 SRS_UTEST=YES 304 SRS_UTEST=YES
212 - if [ $SRS_GPERF = RESERVED ]; then SRS_GPERF=NO; fi  
213 - if [ $SRS_GPERF_MC = RESERVED ]; then SRS_GPERF_MC=NO; fi  
214 - if [ $SRS_GPERF_MP = RESERVED ]; then SRS_GPERF_MP=NO; fi  
215 - if [ $SRS_GPERF_CP = RESERVED ]; then SRS_GPERF_CP=NO; fi  
216 - if [ $SRS_GPROF = RESERVED ]; then SRS_GPROF=NO; fi  
217 - SRS_ARM_UBUNTU12=NO  
218 - # for arm, always set to static link. 305 + SRS_GPERF=NO
  306 + SRS_GPERF_MC=NO
  307 + SRS_GPERF_MP=NO
  308 + SRS_GPERF_CP=NO
  309 + SRS_GPROF=NO
219 SRS_STATIC=NO 310 SRS_STATIC=NO
220 fi 311 fi
221 312
@@ -236,16 +327,45 @@ if [ $SRS_PI = YES ]; then @@ -236,16 +327,45 @@ if [ $SRS_PI = YES ]; then
236 SRS_BWTC=NO 327 SRS_BWTC=NO
237 SRS_RESEARCH=NO 328 SRS_RESEARCH=NO
238 SRS_UTEST=NO 329 SRS_UTEST=NO
239 - if [ $SRS_GPERF = RESERVED ]; then SRS_GPERF=NO; fi  
240 - if [ $SRS_GPERF_MC = RESERVED ]; then SRS_GPERF_MC=NO; fi  
241 - if [ $SRS_GPERF_MP = RESERVED ]; then SRS_GPERF_MP=NO; fi  
242 - if [ $SRS_GPERF_CP = RESERVED ]; then SRS_GPERF_CP=NO; fi  
243 - if [ $SRS_GPROF = RESERVED ]; then SRS_GPROF=NO; fi  
244 - SRS_ARM_UBUNTU12=NO  
245 - # for arm, always set to static link. 330 + SRS_GPERF=NO
  331 + SRS_GPERF_MC=NO
  332 + SRS_GPERF_MP=NO
  333 + SRS_GPERF_CP=NO
  334 + SRS_GPROF=NO
246 SRS_STATIC=YES 335 SRS_STATIC=YES
247 fi 336 fi
248 337
  338 +#####################################################################################
  339 +# parse detail feature options
  340 +#####################################################################################
  341 +for option
  342 +do
  343 + case "$option" in
  344 + -*=*)
  345 + value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`
  346 + option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`
  347 + ;;
  348 + *) value="" ;;
  349 + esac
  350 +
  351 + parse_user_option
  352 +done
  353 +
  354 +#####################################################################################
  355 +# show help and exit
  356 +#####################################################################################
  357 +if [ $help = yes ]; then
  358 + show_help
  359 + exit 0
  360 +fi
  361 +
  362 +#####################################################################################
  363 +# generate the internal values from user specifies options
  364 +#####################################################################################
  365 +# if transcode specified, try ffmpeg if possible.
  366 +if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi
  367 +if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi
  368 +
249 # if http-xxxx specified, open the SRS_HTTP_PARSER 369 # if http-xxxx specified, open the SRS_HTTP_PARSER
250 SRS_HTTP_PARSER=NO 370 SRS_HTTP_PARSER=NO
251 if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi 371 if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi
@@ -263,73 +383,6 @@ fi @@ -263,73 +383,6 @@ fi
263 SRS_AUTO_USER_CONFIGURE="$opt" 383 SRS_AUTO_USER_CONFIGURE="$opt"
264 384
265 ##################################################################################### 385 #####################################################################################
266 -# show help and exit  
267 -#####################################################################################  
268 -if [ $help = yes ]; then  
269 - cat << END  
270 -  
271 - --help print this message  
272 -  
273 - --with-ssl enable rtmp complex handshake, requires openssl-devel installed.  
274 - to delivery h264 video and aac audio to flash player.  
275 - --with-hls enable hls streaming, mux RTMP to m3u8/ts files.  
276 - --with-dvr enable dvr, mux RTMP to flv files.  
277 - --with-nginx enable delivery HTTP stream with nginx.  
278 - build nginx at: ./objs/nginx/sbin/nginx  
279 - --with-http-callback enable http hooks, build cherrypy as demo api server.  
280 - --with-http-server enable http server to delivery http stream.  
281 - --with-http-api enable http api, to manage SRS by http api.  
282 - --with-ffmpeg enable transcoding tool ffmpeg.  
283 - build ffmpeg at: ./objs/ffmpeg/bin/ffmpeg  
284 - --with-transcode enable transcoding features.  
285 - user must specifies the transcode tools in conf.  
286 - --with-ingest enable ingest features.  
287 - user must specifies the ingest tools in conf.  
288 - --with-librtmp enable srs-librtmp, library for client.  
289 - --with-bwtc enable SRS bandwidth test client tool.  
290 - --with-research build the research tools.  
291 - --with-utest build the utest for SRS.  
292 - --with-gperf build SRS with gperf tools(no gmc/gmp/gcp, with tcmalloc only).  
293 - --with-gmc build memory check for SRS with gperf tools.  
294 - --with-gmp build memory profile for SRS with gperf tools.  
295 - --with-gcp build cpu profile for SRS with gperf tools.  
296 - --with-gprof build SRS with gprof(GNU profile tool).  
297 - --with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu).  
298 -  
299 - --without-ssl disable rtmp complex handshake.  
300 - --without-hls disable hls, rtmp streaming only.  
301 - --without-dvr disable dvr, donot support record RTMP stream to flv.  
302 - --without-nginx disable delivery HTTP stream with nginx.  
303 - --without-http-callback disable http, http hooks callback.  
304 - --without-http-server disable http server, use external server to delivery http stream.  
305 - --without-http-api disable http api, only use console to manage SRS process.  
306 - --without-ffmpeg disable the ffmpeg transcode tool feature.  
307 - --without-transcode disable the transcoding feature.  
308 - --without-ingest disable the ingest feature.  
309 - --without-librtmp disable srs-librtmp, library for client.  
310 - --without-bwtc disable SRS bandwidth test client tool.  
311 - --without-research do not build the research tools.  
312 - --without-utest do not build the utest for SRS.  
313 - --without-gperf do not build SRS with gperf tools(without tcmalloc and gmc/gmp/gcp).  
314 - --without-gmc do not build memory check for SRS with gperf tools.  
315 - --without-gmp do not build memory profile for SRS with gperf tools.  
316 - --without-gcp do not build cpu profile for SRS with gperf tools.  
317 - --without-gprof do not build srs with gprof(GNU profile tool).  
318 - --without-arm-ubuntu12 do not build srs on ubuntu12 for armhf(v7cpu).  
319 -  
320 - --static whether add '-static' to link options. always set this option for arm.  
321 - --jobs[=N] Allow N jobs at once; infinite jobs with no arg.  
322 - used for make in the configure, for example, to make ffmpeg.  
323 - --prefix=<path> the absolute install path for srs.  
324 - --dev for dev, open all features, no gperf/gprof/arm.  
325 - --pi for raspberry-pi(directly build), open features hls/ssl/static.  
326 - --arm alias for --with-arm-ubuntu12  
327 -  
328 -END  
329 - exit 0  
330 -fi  
331 -  
332 -#####################################################################################  
333 # check user options 386 # check user options
334 ##################################################################################### 387 #####################################################################################
335 __check_ok=YES 388 __check_ok=YES
@@ -371,8 +424,10 @@ fi @@ -371,8 +424,10 @@ fi
371 424
372 # if x86/x64 or directly build, never use static 425 # if x86/x64 or directly build, never use static
373 if [ $SRS_ARM_UBUNTU12 = NO ]; then 426 if [ $SRS_ARM_UBUNTU12 = NO ]; then
374 - if [ $SRS_STATIC = YES ]; then  
375 - echo "x86/x64/pi should never use static, see: ./configure --help"; __check_ok=NO; 427 + if [ $SRS_PI = NO ]; then
  428 + if [ $SRS_STATIC = YES ]; then
  429 + echo "x86/x64 should never use static, see: ./configure --help"; __check_ok=NO;
  430 + fi
376 fi 431 fi
377 fi 432 fi
378 433
@@ -401,7 +456,7 @@ if [ $__check_ok = NO ]; then @@ -401,7 +456,7 @@ if [ $__check_ok = NO ]; then
401 fi 456 fi
402 457
403 # regenerate the options for default values. 458 # regenerate the options for default values.
404 -SRS_AUTO_CONFIGURE="" 459 +SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
405 if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi 460 if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
406 if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi 461 if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
407 if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi 462 if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
@@ -423,5 +478,4 @@ if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --wit @@ -423,5 +478,4 @@ if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --wit
423 if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi 478 if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi
424 if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi 479 if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi
425 if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi 480 if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi
426 -SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} ${SRS_JOBS} --prefix=${SRS_PREFIX}"  
427 echo "regenerate config: ${SRS_AUTO_CONFIGURE}" 481 echo "regenerate config: ${SRS_AUTO_CONFIGURE}"
  1 +#!/bin/bash
  2 +
  3 +# discover the current work dir, the log and access.
  4 +echo "argv[0]=$0"
  5 +if [[ ! -f $0 ]]; then
  6 + echo "directly execute the scripts on shell.";
  7 + work_dir=`pwd`
  8 +else
  9 + echo "execute scripts in file: $0";
  10 + work_dir=`dirname $0`; work_dir=`(cd ${work_dir} && pwd)`
  11 +fi
  12 +work_dir=`(cd ${work_dir}/.. && pwd)`
  13 +product_dir=$work_dir
  14 +build_objs=${work_dir}/objs
  15 +package_dir=${build_objs}/package
  16 +
  17 +log="${build_objs}/logs/package.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
  18 +ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
  19 +
  20 +# test default configure.
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "0" 32 #define VERSION_MAJOR "0"
33 #define VERSION_MINOR "9" 33 #define VERSION_MINOR "9"
34 -#define VERSION_REVISION "65" 34 +#define VERSION_REVISION "66"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "srs" 37 #define RTMP_SIG_SRS_KEY "srs"