OLD | NEW |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 all_platforms="${all_platforms} iwmmxt-wince-vs8" | 88 all_platforms="${all_platforms} iwmmxt-wince-vs8" |
89 all_platforms="${all_platforms} iwmmxt2-linux-rvct" | 89 all_platforms="${all_platforms} iwmmxt2-linux-rvct" |
90 all_platforms="${all_platforms} iwmmxt2-linux-gcc" | 90 all_platforms="${all_platforms} iwmmxt2-linux-gcc" |
91 all_platforms="${all_platforms} iwmmxt2-wince-vs8" | 91 all_platforms="${all_platforms} iwmmxt2-wince-vs8" |
92 all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 | 92 all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 |
93 all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 | 93 all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 |
94 all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 | 94 all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 |
95 all_platforms="${all_platforms} mips32-linux-gcc" | 95 all_platforms="${all_platforms} mips32-linux-gcc" |
96 all_platforms="${all_platforms} ppc32-darwin8-gcc" | 96 all_platforms="${all_platforms} ppc32-darwin8-gcc" |
97 all_platforms="${all_platforms} ppc32-darwin9-gcc" | 97 all_platforms="${all_platforms} ppc32-darwin9-gcc" |
| 98 all_platforms="${all_platforms} ppc32-linux-gcc" |
98 all_platforms="${all_platforms} ppc64-darwin8-gcc" | 99 all_platforms="${all_platforms} ppc64-darwin8-gcc" |
99 all_platforms="${all_platforms} ppc64-darwin9-gcc" | 100 all_platforms="${all_platforms} ppc64-darwin9-gcc" |
100 all_platforms="${all_platforms} ppc64-linux-gcc" | 101 all_platforms="${all_platforms} ppc64-linux-gcc" |
101 all_platforms="${all_platforms} x86-darwin8-gcc" | 102 all_platforms="${all_platforms} x86-darwin8-gcc" |
102 all_platforms="${all_platforms} x86-darwin8-icc" | 103 all_platforms="${all_platforms} x86-darwin8-icc" |
103 all_platforms="${all_platforms} x86-darwin9-gcc" | 104 all_platforms="${all_platforms} x86-darwin9-gcc" |
104 all_platforms="${all_platforms} x86-darwin9-icc" | 105 all_platforms="${all_platforms} x86-darwin9-icc" |
105 all_platforms="${all_platforms} x86-linux-gcc" | 106 all_platforms="${all_platforms} x86-linux-gcc" |
106 all_platforms="${all_platforms} x86-linux-icc" | 107 all_platforms="${all_platforms} x86-linux-icc" |
107 all_platforms="${all_platforms} x86-solaris-gcc" | 108 all_platforms="${all_platforms} x86-solaris-gcc" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 fi | 406 fi |
406 done | 407 done |
407 | 408 |
408 } | 409 } |
409 | 410 |
410 process_detect() { | 411 process_detect() { |
411 if enabled shared; then | 412 if enabled shared; then |
412 # Can only build shared libs on a subset of platforms. Doing this check | 413 # Can only build shared libs on a subset of platforms. Doing this check |
413 # here rather than at option parse time because the target auto-detect | 414 # here rather than at option parse time because the target auto-detect |
414 # magic happens after the command line has been parsed. | 415 # magic happens after the command line has been parsed. |
415 » enabled linux || die "--enable-shared only supported on ELF for now" | 416 enabled linux || die "--enable-shared only supported on ELF for now" |
416 fi | 417 fi |
417 if [ -z "$CC" ]; then | 418 if [ -z "$CC" ]; then |
418 echo "Bypassing toolchain for environment detection." | 419 echo "Bypassing toolchain for environment detection." |
419 enable external_build | 420 enable external_build |
420 check_header() { | 421 check_header() { |
421 log fake_check_header "$@" | 422 log fake_check_header "$@" |
422 header=$1 | 423 header=$1 |
423 shift | 424 shift |
424 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` | 425 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` |
425 disable $var | 426 disable $var |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 for w in ${EXTRA_WARNINGS}; do | 508 for w in ${EXTRA_WARNINGS}; do |
508 check_add_cflags ${w} | 509 check_add_cflags ${w} |
509 enabled gcc && enabled werror && check_add_cflags -Wno-error=${w} | 510 enabled gcc && enabled werror && check_add_cflags -Wno-error=${w} |
510 done | 511 done |
511 fi | 512 fi |
512 | 513 |
513 # ccache only really works on gcc toolchains | 514 # ccache only really works on gcc toolchains |
514 enabled gcc || soft_disable ccache | 515 enabled gcc || soft_disable ccache |
515 if enabled mips; then | 516 if enabled mips; then |
516 enable dequant_tokens | 517 enable dequant_tokens |
517 » enable dc_recon | 518 enable dc_recon |
518 fi | 519 fi |
519 | 520 |
520 # Enable the postbuild target if building for visual studio. | 521 # Enable the postbuild target if building for visual studio. |
521 case "$tgt_cc" in | 522 case "$tgt_cc" in |
522 vs*) enable msvs | 523 vs*) enable msvs |
523 enable solution | 524 enable solution |
524 vs_version=${tgt_cc##vs} | 525 vs_version=${tgt_cc##vs} |
525 all_targets="${all_targets} solution" | 526 all_targets="${all_targets} solution" |
526 ;; | 527 ;; |
527 esac | 528 esac |
528 | 529 |
529 # Other toolchain specific defaults | 530 # Other toolchain specific defaults |
530 case $toolchain in x86*|ppc*|universal*) soft_enable postproc;; esac | 531 case $toolchain in x86*|ppc*|universal*) soft_enable postproc;; esac |
531 } | 532 } |
532 | 533 |
533 | 534 |
534 ## | 535 ## |
535 ## END APPLICATION SPECIFIC CONFIGURATION | 536 ## END APPLICATION SPECIFIC CONFIGURATION |
536 ## | 537 ## |
537 CONFIGURE_ARGS="$@" | 538 CONFIGURE_ARGS="$@" |
538 process "$@" | 539 process "$@" |
539 cat <<EOF > ${BUILD_PFX}vpx_config.c | 540 cat <<EOF > ${BUILD_PFX}vpx_config.c |
540 static const char* const cfg = "$CONFIGURE_ARGS"; | 541 static const char* const cfg = "$CONFIGURE_ARGS"; |
541 const char *vpx_codec_build_config(void) {return cfg;} | 542 const char *vpx_codec_build_config(void) {return cfg;} |
542 EOF | 543 EOF |
OLD | NEW |