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

Side by Side Diff: source/libvpx/configure

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « source/libvpx/build/make/msvs_common.sh ('k') | source/libvpx/examples.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 all_platforms="${all_platforms} x86_64-iphonesimulator-gcc" 141 all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
142 all_platforms="${all_platforms} x86_64-linux-gcc" 142 all_platforms="${all_platforms} x86_64-linux-gcc"
143 all_platforms="${all_platforms} x86_64-linux-icc" 143 all_platforms="${all_platforms} x86_64-linux-icc"
144 all_platforms="${all_platforms} x86_64-solaris-gcc" 144 all_platforms="${all_platforms} x86_64-solaris-gcc"
145 all_platforms="${all_platforms} x86_64-win64-gcc" 145 all_platforms="${all_platforms} x86_64-win64-gcc"
146 all_platforms="${all_platforms} x86_64-win64-vs8" 146 all_platforms="${all_platforms} x86_64-win64-vs8"
147 all_platforms="${all_platforms} x86_64-win64-vs9" 147 all_platforms="${all_platforms} x86_64-win64-vs9"
148 all_platforms="${all_platforms} x86_64-win64-vs10" 148 all_platforms="${all_platforms} x86_64-win64-vs10"
149 all_platforms="${all_platforms} x86_64-win64-vs11" 149 all_platforms="${all_platforms} x86_64-win64-vs11"
150 all_platforms="${all_platforms} x86_64-win64-vs12" 150 all_platforms="${all_platforms} x86_64-win64-vs12"
151 all_platforms="${all_platforms} universal-darwin8-gcc"
152 all_platforms="${all_platforms} universal-darwin9-gcc"
153 all_platforms="${all_platforms} universal-darwin10-gcc"
154 all_platforms="${all_platforms} universal-darwin11-gcc"
155 all_platforms="${all_platforms} universal-darwin12-gcc"
156 all_platforms="${all_platforms} universal-darwin13-gcc"
157 all_platforms="${all_platforms} universal-darwin14-gcc"
158 all_platforms="${all_platforms} generic-gnu" 151 all_platforms="${all_platforms} generic-gnu"
159 152
160 # all_targets is a list of all targets that can be configured 153 # all_targets is a list of all targets that can be configured
161 # note that these should be in dependency order for now. 154 # note that these should be in dependency order for now.
162 all_targets="libs examples docs" 155 all_targets="libs examples docs"
163 156
164 # all targets available are enabled, by default. 157 # all targets available are enabled, by default.
165 for t in ${all_targets}; do 158 for t in ${all_targets}; do
166 [ -f "${source_path}/${t}.mk" ] && enable_feature ${t} 159 [ -f "${source_path}/${t}.mk" ] && enable_feature ${t}
167 done 160 done
(...skipping 16 matching lines...) Expand all
184 if [ ${doxy_major:-0} -ge 1 ]; then 177 if [ ${doxy_major:-0} -ge 1 ]; then
185 doxy_version=${doxy_version#*.} 178 doxy_version=${doxy_version#*.}
186 doxy_minor=${doxy_version%%.*} 179 doxy_minor=${doxy_version%%.*}
187 doxy_patch=${doxy_version##*.} 180 doxy_patch=${doxy_version##*.}
188 181
189 [ $doxy_major -gt 1 ] && enable_feature doxygen 182 [ $doxy_major -gt 1 ] && enable_feature doxygen
190 [ $doxy_minor -gt 5 ] && enable_feature doxygen 183 [ $doxy_minor -gt 5 ] && enable_feature doxygen
191 [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen 184 [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
192 fi 185 fi
193 186
187 # disable codecs when their source directory does not exist
188 [ -d "${source_path}/vp8" ] || disable_feature vp8
189 [ -d "${source_path}/vp9" ] || disable_feature vp9
190
194 # install everything except the sources, by default. sources will have 191 # install everything except the sources, by default. sources will have
195 # to be enabled when doing dist builds, since that's no longer a common 192 # to be enabled when doing dist builds, since that's no longer a common
196 # case. 193 # case.
197 enabled doxygen && enable_feature install_docs 194 enabled doxygen && enable_feature install_docs
198 enable_feature install_bins 195 enable_feature install_bins
199 enable_feature install_libs 196 enable_feature install_libs
200 197
201 enable_feature static 198 enable_feature static
202 enable_feature optimizations 199 enable_feature optimizations
203 enable_feature dependency_tracking 200 enable_feature dependency_tracking
204 enable_feature spatial_resampling 201 enable_feature spatial_resampling
205 enable_feature multithread 202 enable_feature multithread
206 enable_feature os_support 203 enable_feature os_support
207 enable_feature temporal_denoising 204 enable_feature temporal_denoising
208 205
209 [ -d "${source_path}/../include" ] && enable_feature alt_tree_layout 206 CODECS="
210 for d in vp8 vp9; do 207 vp8_encoder
211 [ -d "${source_path}/${d}" ] && disable_feature alt_tree_layout; 208 vp8_decoder
212 done 209 vp9_encoder
213 210 vp9_decoder
214 if ! enabled alt_tree_layout; then 211 "
215 # development environment 212 CODEC_FAMILIES="
216 [ -d "${source_path}/vp8" ] && CODECS="${CODECS} vp8_encoder vp8_decoder" 213 vp8
217 [ -d "${source_path}/vp9" ] && CODECS="${CODECS} vp9_encoder vp9_decoder" 214 vp9
218 else 215 "
219 # customer environment
220 [ -f "${source_path}/../include/vpx/vp8cx.h" ] && CODECS="${CODECS} vp8_encoder"
221 [ -f "${source_path}/../include/vpx/vp8dx.h" ] && CODECS="${CODECS} vp8_decoder"
222 [ -f "${source_path}/../include/vpx/vp9cx.h" ] && CODECS="${CODECS} vp9_encoder"
223 [ -f "${source_path}/../include/vpx/vp9dx.h" ] && CODECS="${CODECS} vp9_decoder"
224 [ -f "${source_path}/../include/vpx/vp8cx.h" ] || disable_feature vp8_encoder
225 [ -f "${source_path}/../include/vpx/vp8dx.h" ] || disable_feature vp8_decoder
226 [ -f "${source_path}/../include/vpx/vp9cx.h" ] || disable_feature vp9_encoder
227 [ -f "${source_path}/../include/vpx/vp9dx.h" ] || disable_feature vp9_decoder
228
229 [ -f "${source_path}/../lib/*/*mt.lib" ] && soft_enable static_msvcrt
230 fi
231
232 CODECS="$(echo ${CODECS} | tr ' ' '\n')"
233 CODEC_FAMILIES="$(for c in ${CODECS}; do echo ${c%_*}; done | sort | uniq)"
234 216
235 ARCH_LIST=" 217 ARCH_LIST="
236 arm 218 arm
237 mips 219 mips
238 x86 220 x86
239 x86_64 221 x86_64
240 " 222 "
241 ARCH_EXT_LIST=" 223 ARCH_EXT_LIST="
242 edsp 224 edsp
243 media 225 media
(...skipping 11 matching lines...) Expand all
255 sse3 237 sse3
256 ssse3 238 ssse3
257 sse4_1 239 sse4_1
258 avx 240 avx
259 avx2 241 avx2
260 " 242 "
261 HAVE_LIST=" 243 HAVE_LIST="
262 ${ARCH_EXT_LIST} 244 ${ARCH_EXT_LIST}
263 vpx_ports 245 vpx_ports
264 stdint_h 246 stdint_h
265 alt_tree_layout
266 pthread_h 247 pthread_h
267 sys_mman_h 248 sys_mman_h
268 unistd_h 249 unistd_h
269 " 250 "
270 EXPERIMENT_LIST=" 251 EXPERIMENT_LIST="
271 spatial_svc 252 spatial_svc
272 fp_mb_stats 253 fp_mb_stats
273 emulate_hardware 254 emulate_hardware
274 " 255 "
275 CONFIG_LIST=" 256 CONFIG_LIST="
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 410
430 # Set the {en,de}coders variable if any algorithm in that class is enabled 411 # Set the {en,de}coders variable if any algorithm in that class is enabled
431 for c in ${CODECS}; do 412 for c in ${CODECS}; do
432 enabled ${c} && enable_feature ${c##*_}s 413 enabled ${c} && enable_feature ${c##*_}s
433 done 414 done
434 } 415 }
435 416
436 417
437 process_targets() { 418 process_targets() {
438 enabled child || write_common_config_banner 419 enabled child || write_common_config_banner
439 enabled universal || write_common_target_config_h ${BUILD_PFX}vpx_config.h 420 write_common_target_config_h ${BUILD_PFX}vpx_config.h
440
441 # For fat binaries, call configure recursively to configure for each
442 # binary architecture to be included.
443 if enabled universal; then
444 # Call configure (ourselves) for each subarchitecture
445 for arch in $fat_bin_archs; do
446 BUILD_PFX=${arch}/ toolchain=${arch} $self --child $cmdline_args || exit $?
447 done
448 fi
449
450 # The write_common_config (config.mk) logic is deferred until after the
451 # recursive calls to configure complete, because we want our universal
452 # targets to be executed last.
453 write_common_config_targets 421 write_common_config_targets
454 enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
455 422
456 # Calculate the default distribution name, based on the enabled features 423 # Calculate the default distribution name, based on the enabled features
457 cf="" 424 cf=""
458 DIST_DIR=vpx 425 DIST_DIR=vpx
459 for cf in $CODEC_FAMILIES; do 426 for cf in $CODEC_FAMILIES; do
460 if enabled ${cf}_encoder && enabled ${cf}_decoder; then 427 if enabled ${cf}_encoder && enabled ${cf}_decoder; then
461 DIST_DIR="${DIST_DIR}-${cf}" 428 DIST_DIR="${DIST_DIR}-${cf}"
462 elif enabled ${cf}_encoder; then 429 elif enabled ${cf}_encoder; then
463 DIST_DIR="${DIST_DIR}-${cf}cx" 430 DIST_DIR="${DIST_DIR}-${cf}cx"
464 elif enabled ${cf}_decoder; then 431 elif enabled ${cf}_decoder; then
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 check_header pthread.h 556 check_header pthread.h
590 check_header sys/mman.h 557 check_header sys/mman.h
591 check_header unistd.h # for sysconf(3) and friends. 558 check_header unistd.h # for sysconf(3) and friends.
592 559
593 check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports 560 check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
594 } 561 }
595 562
596 process_toolchain() { 563 process_toolchain() {
597 process_common_toolchain 564 process_common_toolchain
598 565
599 # Handle universal binaries for this architecture
600 case $toolchain in
601 universal-darwin*)
602 darwin_ver=${tgt_os##darwin}
603
604 # Tiger (10.4/darwin8) brought support for x86
605 if [ $darwin_ver -ge 8 ]; then
606 fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
607 fi
608
609 # Leopard (10.5/darwin9) brought 64 bit support
610 if [ $darwin_ver -ge 9 ]; then
611 fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
612 fi
613 ;;
614 esac
615
616
617 # Enable some useful compiler flags 566 # Enable some useful compiler flags
618 if enabled gcc; then 567 if enabled gcc; then
619 enabled werror && check_add_cflags -Werror 568 enabled werror && check_add_cflags -Werror
620 check_add_cflags -Wall 569 check_add_cflags -Wall
621 check_add_cflags -Wdeclaration-after-statement 570 check_add_cflags -Wdeclaration-after-statement
622 check_add_cflags -Wdisabled-optimization 571 check_add_cflags -Wdisabled-optimization
623 check_add_cflags -Wpointer-arith 572 check_add_cflags -Wpointer-arith
624 check_add_cflags -Wtype-limits 573 check_add_cflags -Wtype-limits
625 check_add_cflags -Wcast-qual 574 check_add_cflags -Wcast-qual
626 check_add_cflags -Wvla 575 check_add_cflags -Wvla
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh 643 gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
695 enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-we rror" 644 enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-we rror"
696 ;; 645 ;;
697 esac 646 esac
698 all_targets="${all_targets} solution" 647 all_targets="${all_targets} solution"
699 INLINE="__forceinline" 648 INLINE="__forceinline"
700 ;; 649 ;;
701 esac 650 esac
702 651
703 # Other toolchain specific defaults 652 # Other toolchain specific defaults
704 case $toolchain in x86*|universal*) soft_enable postproc;; esac 653 case $toolchain in x86*) soft_enable postproc;; esac
705 654
706 if enabled postproc_visualizer; then 655 if enabled postproc_visualizer; then
707 enabled postproc || die "postproc_visualizer requires postproc to be ena bled" 656 enabled postproc || die "postproc_visualizer requires postproc to be ena bled"
708 fi 657 fi
709 658
710 # Enable unit tests by default if we have a working C++ compiler. 659 # Enable unit tests by default if we have a working C++ compiler.
711 case "$toolchain" in 660 case "$toolchain" in
712 *-vs*) 661 *-vs*)
713 soft_enable unit_tests 662 soft_enable unit_tests
714 soft_enable webm_io 663 soft_enable webm_io
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 707 }
759 708
760 709
761 ## 710 ##
762 ## END APPLICATION SPECIFIC CONFIGURATION 711 ## END APPLICATION SPECIFIC CONFIGURATION
763 ## 712 ##
764 CONFIGURE_ARGS="$@" 713 CONFIGURE_ARGS="$@"
765 process "$@" 714 process "$@"
766 print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */" 715 print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
767 cat <<EOF >> ${BUILD_PFX}vpx_config.c 716 cat <<EOF >> ${BUILD_PFX}vpx_config.c
717 #include "vpx/vpx_codec.h"
768 static const char* const cfg = "$CONFIGURE_ARGS"; 718 static const char* const cfg = "$CONFIGURE_ARGS";
769 const char *vpx_codec_build_config(void) {return cfg;} 719 const char *vpx_codec_build_config(void) {return cfg;}
770 EOF 720 EOF
OLDNEW
« no previous file with comments | « source/libvpx/build/make/msvs_common.sh ('k') | source/libvpx/examples.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698