5 ## This script is sourced by the main configure script and contains
6 ## utility functions and other common bits that aren't strictly libvpx
9 ## This build system is based in part on the FFmpeg configure script.
14 # Logging / Output Functions
17 echo "Unknown option \"$1\"."
18 echo "See $0 --help for available options."
27 echo "Configuration failed. This could reflect a misconfiguration of your"
28 echo "toolchains, improper options selected, or another problem. If you"
29 echo "don't see any useful error messages above, the next step is to look"
30 echo "at the configure error log file ($logfile) to determine what"
31 echo "configure was trying to do when it died."
44 pr -n -t $1 >>$logfile
58 echo "$@" >> ${outfile}
63 for opt in ${CMDLINE_SELECT}; do
64 opt2=`echo $opt | sed -e 's;_;-;g'`
66 eval "toggle_${opt}=\"--disable-${opt2}\""
68 eval "toggle_${opt}=\"--enable-${opt2} \""
73 Usage: configure [options]
77 --help print this message
78 --log=yes|no|FILE file configure log is written to [config.err]
79 --target=TARGET target platform tuple [generic-gnu]
80 --cpu=CPU optimize for a specific cpu rather than a family
81 --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
82 ${toggle_extra_warnings} emit harmless warnings (always non-fatal)
83 ${toggle_werror} treat warnings as errors, if possible
84 (not available with all compilers)
85 ${toggle_optimizations} turn on/off compiler optimization flags
86 ${toggle_pic} turn on/off Position Independent Code
87 ${toggle_ccache} turn on/off compiler cache
88 ${toggle_debug} enable/disable debug mode
89 ${toggle_gprof} enable/disable gprof profiling instrumentation
90 ${toggle_gcov} enable/disable gcov coverage instrumentation
93 ${toggle_install_docs} control whether docs are installed
94 ${toggle_install_bins} control whether binaries are installed
95 ${toggle_install_libs} control whether libraries are installed
96 ${toggle_install_srcs} control whether sources are installed
108 Object files are built at the place where configure is launched.
110 All boolean options can be negated. The default value is the opposite
111 of that shown above. If the option --disable-foo is listed, then
112 the default value for foo is enabled.
116 show_targets ${all_platforms}
123 while [ -n "$*" ]; do
124 if [ "${1%%-*}" = "${2%%-*}" ]; then
125 if [ "${2%%-*}" = "${3%%-*}" ]; then
126 printf " %-24s %-24s %-24s\n" "$1" "$2" "$3"
129 printf " %-24s %-24s\n" "$1" "$2"
133 printf " %-24s\n" "$1"
146 # List Processing Functions
161 [ $var = $value ] && return 0
168 CFLAGS="${CFLAGS} $@"
173 LDFLAGS="${LDFLAGS} $@"
178 ASFLAGS="${ASFLAGS} $@"
183 extralibs="${extralibs} $@"
187 # Boolean Manipulation Functions
198 eval test "x\$$1" = "xyes"
202 eval test "x\$$1" = "xno"
208 if ! disabled $var; then
209 log_echo " enabling $var"
217 if ! enabled $var; then
218 log_echo " disabling $var"
226 # Text Processing Functions
229 echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
234 echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
239 # Temporary File Functions
242 enable source_path_used
243 if test -z "$source_path" -o "$source_path" = "." ; then
245 disable source_path_used
248 if test ! -z "$TMPDIR" ; then
250 elif test ! -z "$TEMPDIR" ; then
255 TMP_H="${TMPDIRx}/vpx-conf-$$-${RANDOM}.h"
256 TMP_C="${TMPDIRx}/vpx-conf-$$-${RANDOM}.c"
257 TMP_O="${TMPDIRx}/vpx-conf-$$-${RANDOM}.o"
258 TMP_X="${TMPDIRx}/vpx-conf-$$-${RANDOM}.x"
259 TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RANDOM}.asm"
262 rm -f ${TMP_C} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM}
266 # Toolchain Check Functions
270 "$@" >>${logfile} 2>&1
277 check_cmd ${CC} ${CFLAGS} "$@" -c -o ${TMP_O} ${TMP_C}
284 check_cmd ${CC} ${CFLAGS} "$@" -E -o ${TMP_O} ${TMP_C}
290 && check_cmd ${LD} ${LDFLAGS} "$@" -o ${TMP_X} ${TMP_O} ${extralibs}
294 log check_header "$@"
297 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
299 check_cpp "$@" <<EOF && enable $var
307 log check_cflags "$@"
314 check_cflags "$@" && add_cflags "$@"
317 check_add_asflags() {
322 check_add_ldflags() {
328 log check_asm_align "$@"
329 cat >${TMP_ASM} <<EOF
334 check_cmd ${AS} ${ASFLAGS} -o ${TMP_O} ${TMP_ASM}
335 readelf -WS ${TMP_O} >${TMP_X}
337 if ! grep -q '\.rodata .* 16$' ${TMP_X}; then
338 die "${AS} ${ASFLAGS} does not support section alignment (nasm <=2.08?)"
342 write_common_config_banner() {
343 print_webm_license config.mk "##" ""
344 echo '# This file automatically generated by configure. Do not edit!' >> config.mk
345 echo "TOOLCHAIN := ${toolchain}" >> config.mk
349 echo "ALT_LIBC := ${alt_libc}" >> config.mk
354 write_common_config_targets() {
355 for t in ${all_targets}; do
356 if enabled ${t}; then
357 if enabled universal || enabled child; then
358 fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}"
360 fwrite config.mk "ALL_TARGETS += ${t}"
368 write_common_target_config_mk() {
370 enabled ccache && CC="ccache ${CC}"
371 print_webm_license $1 "##" ""
374 # This file automatically generated by configure. Do not edit!
375 SRC_PATH="$source_path"
376 SRC_PATH_BARE=$source_path
377 BUILD_PFX=${BUILD_PFX}
378 TOOLCHAIN=${toolchain}
379 ASM_CONVERSION=${asm_conversion_cmd:-${source_path}/build/make/ads2gas.pl}
389 ARFLAGS = -rus\$(if \$(quiet),c,v)
392 extralibs = ${extralibs}
393 AS_SFX = ${AS_SFX:-.asm}
395 RTCD_OPTIONS = ${RTCD_OPTIONS}
398 if enabled rvct; then cat >> $1 << EOF
399 fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
401 else cat >> $1 << EOF
402 fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;'
406 print_config_mk ARCH "${1}" ${ARCH_LIST}
407 print_config_mk HAVE "${1}" ${HAVE_LIST}
408 print_config_mk CONFIG "${1}" ${CONFIG_LIST}
409 print_config_mk HAVE "${1}" gnu_strip
411 enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}"
416 write_common_target_config_h() {
417 print_webm_license ${TMP_H} "/*" " */"
418 cat >> ${TMP_H} << EOF
419 /* This file automatically generated by configure. Do not edit! */
422 #define RESTRICT ${RESTRICT}
424 print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
425 print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
426 print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
427 echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H}
428 mkdir -p `dirname "$1"`
429 cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
432 process_common_cmdline() {
436 --child) enable child
440 if ! disabled logging ; then
441 enabled logging || logfile="$logging"
446 --target=*) toolchain="${toolchain:-${optval}}"
448 --force-target=*) toolchain="${toolchain:-${optval}}"; enable force_toolchain
452 --cpu=*) tune_cpu="$optval"
455 extra_cflags="${optval}"
457 --enable-?*|--disable-?*)
458 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
459 if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
460 [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
461 elif [ $action = "disable" ] && ! disabled $option ; then
462 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
464 elif [ $action = "enable" ] && ! enabled $option ; then
465 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
471 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
472 if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then
473 RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
478 --force-enable-?*|--force-disable-?*)
479 eval `echo "$opt" | sed 's/--force-/action=/;s/-/ option=/;s/-/_/g'`
483 [ -d "${optval}" ] || die "Not a directory: ${optval}"
488 [ "${optval}" = yasm -o "${optval}" = nasm -o "${optval}" = auto ] \
489 || die "Must be yasm, nasm or auto: ${optval}"
499 [ -d "${optval}" ] || die "Not a directory: ${optval}"
502 --libc|--as|--prefix|--libdir|--sdk-path)
503 die "Option ${opt} requires argument"
517 *) process_common_cmdline $opt
524 post_process_common_cmdline() {
525 prefix="${prefix:-/usr/local}"
527 libdir="${libdir:-${prefix}/lib}"
529 if [ "${libdir#${prefix}}" = "${libdir}" ]; then
530 die "Libdir ${libdir} must be a subdirectory of ${prefix}"
535 post_process_cmdline() {
539 setup_gnu_toolchain() {
540 CC=${CC:-${CROSS}gcc}
542 LD=${LD:-${CROSS}${link_with_cc:-ld}}
544 STRIP=${STRIP:-${CROSS}strip}
550 process_common_toolchain() {
551 if [ -z "$toolchain" ]; then
552 gcctarget="$(gcc -dumpmachine 2> /dev/null)"
592 [ -z "$tgt_isa" ] && tgt_isa=x86
606 if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then
607 toolchain=${tgt_isa}-${tgt_os}-gcc
611 toolchain=${toolchain:-generic-gnu}
613 is_in ${toolchain} ${all_platforms} || enabled force_toolchain \
614 || die "Unrecognized toolchain '${toolchain}'"
616 enabled child || log_echo "Configuring for target '${toolchain}'"
619 # Set up toolchain variables
621 tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}')
622 tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}')
623 tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}')
625 # Mark the specific ISA requested as enabled
626 soft_enable ${tgt_isa}
630 # Enable the architecture family
636 # PIC is probably what we want when building shared libs
637 enabled shared && soft_enable pic
639 # Handle darwin variants. Newer SDKs allow targeting older
640 # platforms, so find the newest SDK available.
643 if [ -z "${DEVELOPER_DIR}" ]; then
644 DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null`
645 [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1
647 if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then
648 OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs"
649 OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk"
650 OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk"
651 for v in ${OSX_SDK_VERSIONS}; do
652 if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then
653 osx_sdk_dir="${OSX_SDK_ROOTS}/${v}"
660 if [ -d "${osx_sdk_dir}" ]; then
661 add_cflags "-isysroot ${osx_sdk_dir}"
662 add_ldflags "-isysroot ${osx_sdk_dir}"
667 add_cflags "-mmacosx-version-min=10.4"
668 add_ldflags "-mmacosx-version-min=10.4"
671 add_cflags "-mmacosx-version-min=10.5"
672 add_ldflags "-mmacosx-version-min=10.5"
675 add_cflags "-mmacosx-version-min=10.6"
676 add_ldflags "-mmacosx-version-min=10.6"
679 add_cflags "-mmacosx-version-min=10.7"
680 add_ldflags "-mmacosx-version-min=10.7"
684 # Handle Solaris variants. Solaris 10 needs -lposix4
687 add_extralibs -lposix4
688 disable fast_unaligned
691 add_extralibs -lposix4
695 # Process ARM architecture variants
698 # on arm, isa versions are supersets
704 soft_enable fast_unaligned
709 soft_enable fast_unaligned
716 asm_conversion_cmd="cat"
720 CROSS=${CROSS:-arm-none-linux-gnueabi-}
723 arch_int=${tgt_isa##armv}
724 arch_int=${arch_int%%te}
725 check_add_asflags --defsym ARCHITECTURE=${arch_int}
726 tune_cflags="-mtune="
727 if [ ${tgt_isa} == "armv7" ]; then
730 check_add_cflags -mfpu=neon #-ftree-vectorize
731 check_add_asflags -mfpu=neon
733 check_add_cflags -march=armv7-a -mcpu=cortex-a8 -mfloat-abi=softfp
734 check_add_asflags -mcpu=cortex-a8 -mfloat-abi=softfp #-march=armv7-a
736 check_add_cflags -march=${tgt_isa}
737 check_add_asflags -march=${tgt_isa}
739 enabled debug && add_asflags -g
740 asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
746 LD=${source_path}/build/make/armlink_adapter.sh
747 STRIP=arm-none-linux-gnueabi-strip
748 NM=arm-none-linux-gnueabi-nm
750 tune_asflags="--cpu="
751 if [ -z "${tune_cpu}" ]; then
752 if [ ${tgt_isa} == "armv7" ]; then
755 check_add_cflags --fpu=softvfp+vfpv3
756 check_add_asflags --fpu=softvfp+vfpv3
758 check_add_cflags --cpu=Cortex-A8
759 check_add_asflags --cpu=Cortex-A8
761 check_add_cflags --cpu=${tgt_isa##armv}
762 check_add_asflags --cpu=${tgt_isa##armv}
765 arch_int=${tgt_isa##armv}
766 arch_int=${arch_int%%te}
767 check_add_asflags --pd "\"ARCHITECTURE SETA ${arch_int}\""
768 enabled debug && add_asflags -g
770 add_cflags --enum_is_int
783 COMPILER_LOCATION=`find "${SDK_PATH}" \
784 -name "arm-linux-androideabi-gcc*" -print -quit`
785 TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi-
786 CC=${TOOLCHAIN_PATH}gcc
787 AR=${TOOLCHAIN_PATH}ar
788 LD=${TOOLCHAIN_PATH}gcc
789 AS=${TOOLCHAIN_PATH}as
790 STRIP=${TOOLCHAIN_PATH}strip
791 NM=${TOOLCHAIN_PATH}nm
793 if [ -z "${alt_libc}" ]; then
794 alt_libc=`find "${SDK_PATH}" -name arch-arm -print | \
795 awk '{n = split($0,a,"/"); \
796 split(a[n-1],b,"-"); \
797 print $0 " " b[2]}' | \
799 awk '{ print $1 }' | tail -1`
802 add_cflags "--sysroot=${alt_libc}"
803 add_ldflags "--sysroot=${alt_libc}"
805 add_cflags "-I${SDK_PATH}/sources/android/cpufeatures/"
808 soft_enable realtime_only
809 if [ ${tgt_isa} == "armv7" ]; then
810 enable runtime_cpu_detect
815 if [ -z "${sdk_path}" ]; then
816 SDK_PATH=/Developer/Platforms/iPhoneOS.platform/Developer
820 TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
821 CC=${TOOLCHAIN_PATH}/gcc
822 AR=${TOOLCHAIN_PATH}/ar
823 LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
824 AS=${TOOLCHAIN_PATH}/as
825 STRIP=${TOOLCHAIN_PATH}/strip
826 NM=${TOOLCHAIN_PATH}/nm
829 # ASFLAGS is written here instead of using check_add_asflags
830 # because we need to overwrite all of ASFLAGS and purge the
831 # options that were put in above
832 ASFLAGS="-version -arch ${tgt_isa} -g"
834 add_cflags -arch ${tgt_isa}
835 add_ldflags -arch_only ${tgt_isa}
837 if [ -z "${alt_libc}" ]; then
838 alt_libc=${SDK_PATH}/SDKs/iPhoneOS5.0.sdk
841 add_cflags "-isysroot ${alt_libc}"
843 # Add the paths for the alternate libc
844 for d in usr/include; do
845 try_dir="${alt_libc}/${d}"
846 [ -d "${try_dir}" ] && add_cflags -I"${try_dir}"
849 for d in lib usr/lib usr/lib/system; do
850 try_dir="${alt_libc}/${d}"
851 [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
854 asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
859 if enabled rvct; then
860 # Check if we have CodeSourcery GCC in PATH. Needed for
862 hash arm-none-linux-gnueabi-gcc 2>&- || \
863 die "Couldn't find CodeSourcery GCC from PATH"
865 # Use armcc as a linker to enable translation of
866 # some gcc specific options such as -lm and -lpthread.
867 LD="armcc --translate_gcc"
869 # create configuration file (uses path to CodeSourcery GCC)
870 armcc --arm_linux_configure --arm_linux_config_file=arm_linux.cfg
872 add_cflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg
873 add_asflags --no_hide_all --apcs=/interwork
874 add_ldflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg
875 enabled pic && add_cflags --apcs=/fpic
876 enabled pic && add_asflags --apcs=/fpic
877 enabled shared && add_cflags --shared
884 CROSS=${CROSS:-mipsel-linux-uclibc-}
887 tune_cflags="-mtune="
888 check_add_cflags -march=${tgt_isa}
889 check_add_asflags -march=${tgt_isa}
890 check_add_asflags -KPIC
897 add_asflags -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
899 enabled altivec && add_cflags -maltivec
903 add_asflags -maltivec -mregnames -I"\$(dir \$<)linux"
906 darwin_arch="-arch ppc"
907 enabled ppc64 && darwin_arch="${darwin_arch}64"
908 add_cflags ${darwin_arch} -m${bits} -fasm-blocks
909 add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
910 add_ldflags ${darwin_arch} -m${bits}
911 enabled altivec && add_cflags -faltivec
917 enabled x86_64 && bits=64
918 soft_enable runtime_cpu_detect
928 enabled gcc && add_cflags -fno-common
931 CC=${CC:-${CROSS}gcc}
932 LD=${LD:-${CROSS}gcc}
940 AS="${alt_as:-${AS:-auto}}"
946 add_cflags -use-msasm -use-asm
947 add_ldflags -i-static
948 enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE2 -axSSE2
949 enabled x86_64 && AR=xiar
956 tune_cflags="-march="
962 add_ldflags -m${bits}
964 tune_cflags="-march="
966 #for 32 bit x86 builds, -O3 did not turn on this flag
967 enabled optimizations && check_add_cflags -fomit-frame-pointer
973 which nasm >/dev/null 2>&1 && AS=nasm
974 which yasm >/dev/null 2>&1 && AS=yasm
975 [ "${AS}" = auto -o -z "${AS}" ] \
976 && die "Neither yasm nor nasm have been found"
979 log_echo " using $AS"
980 [ "${AS##*/}" = nasm ] && add_asflags -Ox
985 enabled debug && add_asflags -g cv8
989 enabled debug && add_asflags -g cv8
992 add_asflags -f elf${bits}
993 enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
994 enabled debug && [ "${AS}" = nasm ] && add_asflags -g
995 [ "${AS##*/}" = nasm ] && check_asm_align
998 add_asflags -f macho${bits}
999 enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x86_64"
1000 add_cflags ${darwin_arch}
1001 add_ldflags ${darwin_arch}
1002 # -mdynamic-no-pic is still a bit of voodoo -- it was required at
1003 # one time, but does not seem to be now, and it breaks some of the
1004 # code that still relies on inline assembly.
1005 # enabled icc && ! enabled pic && add_cflags -fno-pic -mdynamic-no-pic
1006 enabled icc && ! enabled pic && add_cflags -fno-pic
1010 enabled debug && add_asflags -g
1013 *) log "Warning: Unknown os $tgt_os while setting up $AS flags"
1017 universal*|*-gcc|generic-gnu)
1024 # Try to enable CPU specific tuning
1025 if [ -n "${tune_cpu}" ]; then
1026 if [ -n "${tune_cflags}" ]; then
1027 check_add_cflags ${tune_cflags}${tune_cpu} || \
1028 die "Requested CPU '${tune_cpu}' not supported by compiler"
1030 if [ -n "${tune_asflags}" ]; then
1031 check_add_asflags ${tune_asflags}${tune_cpu} || \
1032 die "Requested CPU '${tune_cpu}' not supported by assembler"
1034 if [ -z "${tune_cflags}${tune_asflags}" ]; then
1035 log_echo "Warning: CPU tuning not supported by this toolchain"
1039 enabled debug && check_add_cflags -g && check_add_ldflags -g
1040 enabled gprof && check_add_cflags -pg && check_add_ldflags -pg
1042 check_add_cflags -fprofile-arcs -ftest-coverage &&
1043 check_add_ldflags -fprofile-arcs -ftest-coverage
1045 if enabled optimizations; then
1046 if enabled rvct; then
1047 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime
1049 enabled small && check_add_cflags -O2 || check_add_cflags -O3
1053 # Position Independent Code (PIC) support, for building relocatable
1055 enabled gcc && enabled pic && check_add_cflags -fPIC
1057 # Work around longjmp interception on glibc >= 2.11, to improve binary
1058 # compatibility. See http://code.google.com/p/webm/issues/detail?id=166
1059 enabled linux && check_add_cflags -D_FORTIFY_SOURCE=0
1061 # Check for strip utility variant
1062 ${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable gnu_strip
1064 # Try to determine target endianness
1066 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E';
1068 [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' |
1069 grep '4f *32 *42 *45' >/dev/null 2>&1 && enable big_endian
1071 # Almost every platform uses pthreads.
1072 if enabled multithread; then
1073 case ${toolchain} in
1076 *) check_header pthread.h && add_extralibs -lpthread
1080 # for sysconf(3) and friends.
1081 check_header unistd.h
1084 if enabled linux; then
1085 add_cflags -D_LARGEFILE_SOURCE
1086 add_cflags -D_FILE_OFFSET_BITS=64
1089 # append any user defined extra cflags
1090 if [ -n "${extra_cflags}" ] ; then
1091 check_add_cflags ${extra_cflags} || \
1092 die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
1096 process_toolchain() {
1097 process_common_toolchain
1105 upname="`toupper $cfg`"
1106 if enabled $cfg; then
1107 echo "${prefix}_${upname}=yes" >> $makefile
1117 upname="`toupper $cfg`"
1118 if enabled $cfg; then
1119 echo "#define ${prefix}_${upname} 1" >> $header
1121 echo "#define ${prefix}_${upname} 0" >> $header
1126 print_webm_license() {
1127 local destination=$1
1131 cat <<EOF > ${destination}
1132 ${prefix} Copyright (c) 2011 The WebM project authors. All Rights Reserved.${suffix}
1134 ${prefix} Use of this source code is governed by a BSD-style license${suffix}
1135 ${prefix} that can be found in the LICENSE file in the root of the source${suffix}
1136 ${prefix} tree. An additional intellectual property rights grant can be found${suffix}
1137 ${prefix} in the file PATENTS. All contributing project authors may${suffix}
1138 ${prefix} be found in the AUTHORS file in the root of the source tree.${suffix}
1151 logfile="config.err"
1155 process_cmdline "$@"
1156 if enabled child; then
1157 echo "# ${self} $@" >> ${logfile}
1159 echo "# ${self} $@" > ${logfile}
1161 post_process_common_cmdline
1162 post_process_cmdline
1167 OOT_INSTALLS="${OOT_INSTALLS}"
1168 if enabled source_path_used; then
1169 # Prepare the PWD for building.
1170 for f in ${OOT_INSTALLS}; do
1171 install -D ${source_path}/$f $f
1174 cp ${source_path}/build/make/Makefile .