OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ## | 2 ## |
3 ## configure.sh | 3 ## configure.sh |
4 ## | 4 ## |
5 ## This script is sourced by the main configure script and contains | 5 ## This script is sourced by the main configure script and contains |
6 ## utility functions and other common bits that aren't strictly libvpx | 6 ## utility functions and other common bits that aren't strictly libvpx |
7 ## related. | 7 ## related. |
8 ## | 8 ## |
9 ## This build system is based in part on the FFmpeg configure script. | 9 ## This build system is based in part on the FFmpeg configure script. |
10 ## | 10 ## |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RANDOM}.asm" | 270 TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RANDOM}.asm" |
271 | 271 |
272 clean_temp_files() { | 272 clean_temp_files() { |
273 rm -f ${TMP_C} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM} | 273 rm -f ${TMP_C} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM} |
274 } | 274 } |
275 | 275 |
276 # | 276 # |
277 # Toolchain Check Functions | 277 # Toolchain Check Functions |
278 # | 278 # |
279 check_cmd() { | 279 check_cmd() { |
| 280 enabled external_build && return |
280 log "$@" | 281 log "$@" |
281 "$@" >>${logfile} 2>&1 | 282 "$@" >>${logfile} 2>&1 |
282 } | 283 } |
283 | 284 |
284 check_cc() { | 285 check_cc() { |
285 log check_cc "$@" | 286 log check_cc "$@" |
286 cat >${TMP_C} | 287 cat >${TMP_C} |
287 log_file ${TMP_C} | 288 log_file ${TMP_C} |
288 check_cmd ${CC} ${CFLAGS} "$@" -c -o ${TMP_O} ${TMP_C} | 289 check_cmd ${CC} ${CFLAGS} "$@" -c -o ${TMP_O} ${TMP_C} |
289 } | 290 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 ARFLAGS = -rus\$(if \$(quiet),c,v) | 429 ARFLAGS = -rus\$(if \$(quiet),c,v) |
429 LDFLAGS = ${LDFLAGS} | 430 LDFLAGS = ${LDFLAGS} |
430 ASFLAGS = ${ASFLAGS} | 431 ASFLAGS = ${ASFLAGS} |
431 extralibs = ${extralibs} | 432 extralibs = ${extralibs} |
432 AS_SFX = ${AS_SFX:-.asm} | 433 AS_SFX = ${AS_SFX:-.asm} |
433 EXE_SFX = ${EXE_SFX} | 434 EXE_SFX = ${EXE_SFX} |
434 RTCD_OPTIONS = ${RTCD_OPTIONS} | 435 RTCD_OPTIONS = ${RTCD_OPTIONS} |
435 EOF | 436 EOF |
436 | 437 |
437 if enabled rvct; then cat >> $1 << EOF | 438 if enabled rvct; then cat >> $1 << EOF |
438 fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide | 439 fmt_deps = sed -e 's;^__image.axf;\$\${@:.d=.o} \$\$@;' #hide |
439 EOF | 440 EOF |
440 else cat >> $1 << EOF | 441 else cat >> $1 << EOF |
441 fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' | 442 fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$\${@:.d=.o} \$\$@;' |
442 EOF | 443 EOF |
443 fi | 444 fi |
444 | 445 |
445 print_config_mk ARCH "${1}" ${ARCH_LIST} | 446 print_config_mk ARCH "${1}" ${ARCH_LIST} |
446 print_config_mk HAVE "${1}" ${HAVE_LIST} | 447 print_config_mk HAVE "${1}" ${HAVE_LIST} |
447 print_config_mk CONFIG "${1}" ${CONFIG_LIST} | 448 print_config_mk CONFIG "${1}" ${CONFIG_LIST} |
448 print_config_mk HAVE "${1}" gnu_strip | 449 print_config_mk HAVE "${1}" gnu_strip |
449 | 450 |
450 enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}" | 451 enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}" |
451 | 452 |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 mips*) | 1169 mips*) |
1169 if enabled dspr2; then | 1170 if enabled dspr2; then |
1170 if enabled big_endian; then | 1171 if enabled big_endian; then |
1171 echo "dspr2 optimizations are available only for little endi
an platforms" | 1172 echo "dspr2 optimizations are available only for little endi
an platforms" |
1172 disable dspr2 | 1173 disable dspr2 |
1173 fi | 1174 fi |
1174 fi | 1175 fi |
1175 ;; | 1176 ;; |
1176 esac | 1177 esac |
1177 | 1178 |
1178 # for sysconf(3) and friends. | |
1179 check_header unistd.h | |
1180 | |
1181 # glibc needs these | 1179 # glibc needs these |
1182 if enabled linux; then | 1180 if enabled linux; then |
1183 add_cflags -D_LARGEFILE_SOURCE | 1181 add_cflags -D_LARGEFILE_SOURCE |
1184 add_cflags -D_FILE_OFFSET_BITS=64 | 1182 add_cflags -D_FILE_OFFSET_BITS=64 |
1185 fi | 1183 fi |
1186 | 1184 |
1187 # append any user defined extra cflags | 1185 # append any user defined extra cflags |
1188 if [ -n "${extra_cflags}" ] ; then | 1186 if [ -n "${extra_cflags}" ] ; then |
1189 check_add_cflags ${extra_cflags} || \ | 1187 check_add_cflags ${extra_cflags} || \ |
1190 die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler" | 1188 die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 # Prepare the PWD for building. | 1265 # Prepare the PWD for building. |
1268 for f in ${OOT_INSTALLS}; do | 1266 for f in ${OOT_INSTALLS}; do |
1269 install -D ${source_path}/$f $f | 1267 install -D ${source_path}/$f $f |
1270 done | 1268 done |
1271 fi | 1269 fi |
1272 cp ${source_path}/build/make/Makefile . | 1270 cp ${source_path}/build/make/Makefile . |
1273 | 1271 |
1274 clean_temp_files | 1272 clean_temp_files |
1275 true | 1273 true |
1276 } | 1274 } |
OLD | NEW |