Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: source/libvpx/configure

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 ## 2 ##
3 ## configure 3 ## configure
4 ## 4 ##
5 ## This script is the front-end to the build system. It provides a similar 5 ## This script is the front-end to the build system. It provides a similar
6 ## interface to standard configure scripts with some extra bits for dealing 6 ## interface to standard configure scripts with some extra bits for dealing
7 ## with toolchains that differ from the standard POSIX interface and 7 ## with toolchains that differ from the standard POSIX interface and
8 ## for extracting subsets of the source tree. In theory, reusable parts 8 ## for extracting subsets of the source tree. In theory, reusable parts
9 ## of this script were intended to live in build/make/configure.sh, 9 ## of this script were intended to live in build/make/configure.sh,
10 ## but in practice, the line is pretty blurry. 10 ## but in practice, the line is pretty blurry.
(...skipping 16 matching lines...) Expand all
27 --libc=PATH path to alternate libc 27 --libc=PATH path to alternate libc
28 --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred] 28 --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
29 --sdk-path=PATH path to root of sdk (iOS, android builds only) 29 --sdk-path=PATH path to root of sdk (iOS, android builds only)
30 ${toggle_fast_unaligned} don't use unaligned accesses, even when 30 ${toggle_fast_unaligned} don't use unaligned accesses, even when
31 supported by hardware [auto] 31 supported by hardware [auto]
32 ${toggle_codec_srcs} in/exclude codec library source code 32 ${toggle_codec_srcs} in/exclude codec library source code
33 ${toggle_debug_libs} in/exclude debug version of libraries 33 ${toggle_debug_libs} in/exclude debug version of libraries
34 ${toggle_md5} support for output of checksum data 34 ${toggle_md5} support for output of checksum data
35 ${toggle_static_msvcrt} use static MSVCRT (VS builds only) 35 ${toggle_static_msvcrt} use static MSVCRT (VS builds only)
36 ${toggle_vp8} VP8 codec support 36 ${toggle_vp8} VP8 codec support
37 ${toggle_vp9} VP9 codec support
37 ${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders) 38 ${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
38 ${toggle_mem_tracker} track memory usage 39 ${toggle_mem_tracker} track memory usage
39 ${toggle_postproc} postprocessing 40 ${toggle_postproc} postprocessing
40 ${toggle_multithread} multithreaded encoding and decoding 41 ${toggle_multithread} multithreaded encoding and decoding
41 ${toggle_spatial_resampling} spatial sampling (scaling) support 42 ${toggle_spatial_resampling} spatial sampling (scaling) support
42 ${toggle_realtime_only} enable this option while building for real-tim e encoding 43 ${toggle_realtime_only} enable this option while building for real-tim e encoding
43 ${toggle_onthefly_bitpacking} enable on-the-fly bitpacking in real-time enco ding 44 ${toggle_onthefly_bitpacking} enable on-the-fly bitpacking in real-time enco ding
44 ${toggle_error_concealment} enable this option to get a decoder which is a ble to conceal losses 45 ${toggle_error_concealment} enable this option to get a decoder which is a ble to conceal losses
45 ${toggle_runtime_cpu_detect} runtime cpu detection 46 ${toggle_runtime_cpu_detect} runtime cpu detection
46 ${toggle_shared} shared library support 47 ${toggle_shared} shared library support
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 enable static 170 enable static
170 enable optimizations 171 enable optimizations
171 enable fast_unaligned #allow unaligned accesses, if supported by hw 172 enable fast_unaligned #allow unaligned accesses, if supported by hw
172 enable md5 173 enable md5
173 enable spatial_resampling 174 enable spatial_resampling
174 enable multithread 175 enable multithread
175 enable os_support 176 enable os_support
176 enable temporal_denoising 177 enable temporal_denoising
177 178
178 [ -d ${source_path}/../include ] && enable alt_tree_layout 179 [ -d ${source_path}/../include ] && enable alt_tree_layout
179 for d in vp8; do 180 for d in vp8 vp9; do
180 [ -d ${source_path}/${d} ] && disable alt_tree_layout; 181 [ -d ${source_path}/${d} ] && disable alt_tree_layout;
181 done 182 done
182 183
183 if ! enabled alt_tree_layout; then 184 if ! enabled alt_tree_layout; then
184 # development environment 185 # development environment
185 [ -d ${source_path}/vp8 ] && CODECS="${CODECS} vp8_encoder vp8_decoder" 186 [ -d ${source_path}/vp8 ] && CODECS="${CODECS} vp8_encoder vp8_decoder"
187 [ -d ${source_path}/vp9 ] && CODECS="${CODECS} vp9_encoder vp9_decoder"
186 else 188 else
187 # customer environment 189 # customer environment
188 [ -f ${source_path}/../include/vpx/vp8cx.h ] && CODECS="${CODECS} vp8_encoder" 190 [ -f ${source_path}/../include/vpx/vp8cx.h ] && CODECS="${CODECS} vp8_encoder"
189 [ -f ${source_path}/../include/vpx/vp8dx.h ] && CODECS="${CODECS} vp8_decoder" 191 [ -f ${source_path}/../include/vpx/vp8dx.h ] && CODECS="${CODECS} vp8_decoder"
192 [ -f ${source_path}/../include/vpx/vp9cx.h ] && CODECS="${CODECS} vp9_encoder"
193 [ -f ${source_path}/../include/vpx/vp9dx.h ] && CODECS="${CODECS} vp9_decoder"
190 [ -f ${source_path}/../include/vpx/vp8cx.h ] || disable vp8_encoder 194 [ -f ${source_path}/../include/vpx/vp8cx.h ] || disable vp8_encoder
191 [ -f ${source_path}/../include/vpx/vp8dx.h ] || disable vp8_decoder 195 [ -f ${source_path}/../include/vpx/vp8dx.h ] || disable vp8_decoder
196 [ -f ${source_path}/../include/vpx/vp9cx.h ] || disable vp9_encoder
197 [ -f ${source_path}/../include/vpx/vp9dx.h ] || disable vp9_decoder
192 198
193 [ -f ${source_path}/../lib/*/*mt.lib ] && soft_enable static_msvcrt 199 [ -f ${source_path}/../lib/*/*mt.lib ] && soft_enable static_msvcrt
194 fi 200 fi
195 201
196 CODECS="$(echo ${CODECS} | tr ' ' '\n')" 202 CODECS="$(echo ${CODECS} | tr ' ' '\n')"
197 CODEC_FAMILIES="$(for c in ${CODECS}; do echo ${c%_*}; done | sort | uniq)" 203 CODEC_FAMILIES="$(for c in ${CODECS}; do echo ${c%_*}; done | sort | uniq)"
198 204
199 ARCH_LIST=" 205 ARCH_LIST="
200 arm 206 arm
201 mips 207 mips
(...skipping 21 matching lines...) Expand all
223 " 229 "
224 HAVE_LIST=" 230 HAVE_LIST="
225 ${ARCH_EXT_LIST} 231 ${ARCH_EXT_LIST}
226 vpx_ports 232 vpx_ports
227 stdint_h 233 stdint_h
228 alt_tree_layout 234 alt_tree_layout
229 pthread_h 235 pthread_h
230 sys_mman_h 236 sys_mman_h
231 unistd_h 237 unistd_h
232 " 238 "
239 EXPERIMENT_LIST="
240 csm
241 comp_intra_pred
242 superblocks
243 pred_filter
244 lossless
245 subpelrefmv
246 new_mvref
247 implicit_segmentation
248 newbintramodes
249 comp_interintra_pred
250 "
233 CONFIG_LIST=" 251 CONFIG_LIST="
234 external_build 252 external_build
235 install_docs 253 install_docs
236 install_bins 254 install_bins
237 install_libs 255 install_libs
238 install_srcs 256 install_srcs
239 debug 257 debug
240 gprof 258 gprof
241 gcov 259 gcov
242 rvct 260 rvct
(...skipping 26 matching lines...) Expand all
269 onthefly_bitpacking 287 onthefly_bitpacking
270 error_concealment 288 error_concealment
271 shared 289 shared
272 static 290 static
273 small 291 small
274 postproc_visualizer 292 postproc_visualizer
275 os_support 293 os_support
276 unit_tests 294 unit_tests
277 multi_res_encoding 295 multi_res_encoding
278 temporal_denoising 296 temporal_denoising
297 experimental
298 ${EXPERIMENT_LIST}
279 " 299 "
280 CMDLINE_SELECT=" 300 CMDLINE_SELECT="
301 external_build
281 extra_warnings 302 extra_warnings
282 werror 303 werror
283 install_docs 304 install_docs
284 install_bins 305 install_bins
285 install_libs 306 install_libs
286 install_srcs 307 install_srcs
287 debug 308 debug
288 gprof 309 gprof
289 gcov 310 gcov
290 pic 311 pic
(...skipping 24 matching lines...) Expand all
315 realtime_only 336 realtime_only
316 onthefly_bitpacking 337 onthefly_bitpacking
317 error_concealment 338 error_concealment
318 shared 339 shared
319 static 340 static
320 small 341 small
321 postproc_visualizer 342 postproc_visualizer
322 unit_tests 343 unit_tests
323 multi_res_encoding 344 multi_res_encoding
324 temporal_denoising 345 temporal_denoising
346 experimental
325 " 347 "
326 348
327 process_cmdline() { 349 process_cmdline() {
328 for opt do 350 for opt do
329 optval="${opt#*=}" 351 optval="${opt#*=}"
330 case "$opt" in 352 case "$opt" in
331 --disable-codecs) for c in ${CODECS}; do disable $c; done ;; 353 --disable-codecs) for c in ${CODECS}; do disable $c; done ;;
354 --enable-?*|--disable-?*)
355 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
356 if echo "${EXPERIMENT_LIST}" | grep "^ *$option\$" >/dev/null; then
357 if enabled experimental; then
358 $action $option
359 else
360 log_echo "Ignoring $opt -- not in experimental mode."
361 fi
362 else
363 process_common_cmdline $opt
364 fi
365 ;;
332 *) process_common_cmdline "$opt" 366 *) process_common_cmdline "$opt"
333 ;; 367 ;;
334 esac 368 esac
335 done 369 done
336 } 370 }
337 371
338 post_process_cmdline() { 372 post_process_cmdline() {
339 local c 373 local c
340 374
341 # If the codec family is disabled, disable all components of that family. 375 # If the codec family is disabled, disable all components of that family.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 # here rather than at option parse time because the target auto-detect 491 # here rather than at option parse time because the target auto-detect
458 # magic happens after the command line has been parsed. 492 # magic happens after the command line has been parsed.
459 if ! enabled linux; then 493 if ! enabled linux; then
460 if enabled gnu; then 494 if enabled gnu; then
461 echo "--enable-shared is only supported on ELF; assuming this is OK" 495 echo "--enable-shared is only supported on ELF; assuming this is OK"
462 else 496 else
463 die "--enable-shared only supported on ELF for now" 497 die "--enable-shared only supported on ELF for now"
464 fi 498 fi
465 fi 499 fi
466 fi 500 fi
467 if [ -z "$CC" ]; then 501 if [ -z "$CC" ] || enabled external_build; then
468 echo "Bypassing toolchain for environment detection." 502 echo "Bypassing toolchain for environment detection."
469 enable external_build 503 enable external_build
470 check_header() { 504 check_header() {
471 log fake_check_header "$@" 505 log fake_check_header "$@"
472 header=$1 506 header=$1
473 shift 507 shift
474 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` 508 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
475 disable $var 509 disable $var
510 # Headers common to all environments
476 case $header in 511 case $header in
477 stdio.h) 512 stdio.h)
478 true; 513 true;
479 ;; 514 ;;
480 *) 515 *)
481 local result=false 516 local result=false
482 for d in "$@"; do 517 for d in "$@"; do
483 [ -f "${d##-I}/$header" ] && result=true && break 518 [ -f "${d##-I}/$header" ] && result=true && break
484 done 519 done
485 ${result:-true} 520 ${result:-true}
486 esac && enable $var 521 esac && enable $var
522
523 # Specialize windows and POSIX environments.
524 case $toolchain in
525 *-win*-*)
526 case $header-$toolchain in
527 stdint*-gcc) true;;
528 *) false;;
529 esac && enable $var
530 ;;
531 *)
532 case $header in
533 stdint.h) true;;
534 pthread.h) true;;
535 sys/mman.h) true;;
536 unistd.h) true;;
537 *) false;;
538 esac && enable $var
539 esac
540 enabled $var
487 } 541 }
488 check_ld() { 542 check_ld() {
489 true 543 true
490 } 544 }
491 fi 545 fi
492 check_header stdio.h || die "Unable to invoke compiler: ${CC} ${CFLAGS}" 546 check_header stdio.h || die "Unable to invoke compiler: ${CC} ${CFLAGS}"
493 check_ld <<EOF || die "Toolchain is unable to link executables" 547 check_ld <<EOF || die "Toolchain is unable to link executables"
494 int main(void) {return 0;} 548 int main(void) {return 0;}
495 EOF 549 EOF
496 # check system headers 550 # check system headers
497 check_header stdint.h 551 check_header stdint.h
498 check_header pthread.h 552 check_header pthread.h
499 check_header sys/mman.h 553 check_header sys/mman.h
554 check_header unistd.h # for sysconf(3) and friends.
500 555
501 check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports 556 check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports
502 } 557 }
503 558
504 process_toolchain() { 559 process_toolchain() {
505 process_common_toolchain 560 process_common_toolchain
506 561
507 # Handle universal binaries for this architecture 562 # Handle universal binaries for this architecture
508 case $toolchain in 563 case $toolchain in
509 universal-darwin*) 564 universal-darwin*)
(...skipping 20 matching lines...) Expand all
530 585
531 # Enable some useful compiler flags 586 # Enable some useful compiler flags
532 if enabled gcc; then 587 if enabled gcc; then
533 enabled werror && check_add_cflags -Werror 588 enabled werror && check_add_cflags -Werror
534 check_add_cflags -Wall 589 check_add_cflags -Wall
535 check_add_cflags -Wdeclaration-after-statement 590 check_add_cflags -Wdeclaration-after-statement
536 check_add_cflags -Wdisabled-optimization 591 check_add_cflags -Wdisabled-optimization
537 check_add_cflags -Wpointer-arith 592 check_add_cflags -Wpointer-arith
538 check_add_cflags -Wtype-limits 593 check_add_cflags -Wtype-limits
539 check_add_cflags -Wcast-qual 594 check_add_cflags -Wcast-qual
595 check_add_cflags -Wvla
540 check_add_cflags -Wimplicit-function-declaration 596 check_add_cflags -Wimplicit-function-declaration
541 check_add_cflags -Wuninitialized 597 check_add_cflags -Wuninitialized
542 check_add_cflags -Wunused-variable 598 check_add_cflags -Wunused-variable
543 check_add_cflags -Wunused-but-set-variable 599 check_add_cflags -Wunused-but-set-variable
544 enabled extra_warnings || check_add_cflags -Wno-unused-function 600 enabled extra_warnings || check_add_cflags -Wno-unused-function
545 fi 601 fi
546 602
547 if enabled icc; then 603 if enabled icc; then
548 enabled werror && check_add_cflags -Werror 604 enabled werror && check_add_cflags -Werror
549 check_add_cflags -Wall 605 check_add_cflags -Wall
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 ## 672 ##
617 ## END APPLICATION SPECIFIC CONFIGURATION 673 ## END APPLICATION SPECIFIC CONFIGURATION
618 ## 674 ##
619 CONFIGURE_ARGS="$@" 675 CONFIGURE_ARGS="$@"
620 process "$@" 676 process "$@"
621 print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */" 677 print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
622 cat <<EOF >> ${BUILD_PFX}vpx_config.c 678 cat <<EOF >> ${BUILD_PFX}vpx_config.c
623 static const char* const cfg = "$CONFIGURE_ARGS"; 679 static const char* const cfg = "$CONFIGURE_ARGS";
624 const char *vpx_codec_build_config(void) {return cfg;} 680 const char *vpx_codec_build_config(void) {return cfg;}
625 EOF 681 EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698