Commit d9847638 authored by John Koleszar's avatar John Koleszar
Browse files

configure: add --enable-external-build support

First attempt at avoiding all the compile-time environment detection for
cases where you can generate the environments statically, as when the
real build is being performed by another build system.

Change-Id: Ie3cf95d71d6c5169900f31e263b84bc123cdf73f
parent fccebcba
...@@ -277,6 +277,7 @@ clean_temp_files() { ...@@ -277,6 +277,7 @@ clean_temp_files() {
# Toolchain Check Functions # Toolchain Check Functions
# #
check_cmd() { check_cmd() {
enabled external_build && return
log "$@" log "$@"
"$@" >>${logfile} 2>&1 "$@" >>${logfile} 2>&1
} }
...@@ -1175,9 +1176,6 @@ EOF ...@@ -1175,9 +1176,6 @@ EOF
;; ;;
esac esac
# for sysconf(3) and friends.
check_header unistd.h
# glibc needs these # glibc needs these
if enabled linux; then if enabled linux; then
add_cflags -D_LARGEFILE_SOURCE add_cflags -D_LARGEFILE_SOURCE
......
...@@ -298,6 +298,7 @@ CONFIG_LIST=" ...@@ -298,6 +298,7 @@ CONFIG_LIST="
${EXPERIMENT_LIST} ${EXPERIMENT_LIST}
" "
CMDLINE_SELECT=" CMDLINE_SELECT="
external_build
extra_warnings extra_warnings
werror werror
install_docs install_docs
...@@ -497,7 +498,7 @@ process_detect() { ...@@ -497,7 +498,7 @@ process_detect() {
fi fi
fi fi
fi fi
if [ -z "$CC" ]; then if [ -z "$CC" ] || enabled external_build; then
echo "Bypassing toolchain for environment detection." echo "Bypassing toolchain for environment detection."
enable external_build enable external_build
check_header() { check_header() {
...@@ -506,6 +507,7 @@ process_detect() { ...@@ -506,6 +507,7 @@ process_detect() {
shift shift
var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
disable $var disable $var
# Headers common to all environments
case $header in case $header in
stdio.h) stdio.h)
true; true;
...@@ -517,6 +519,25 @@ process_detect() { ...@@ -517,6 +519,25 @@ process_detect() {
done done
${result:-true} ${result:-true}
esac && enable $var esac && enable $var
# Specialize windows and POSIX environments.
case $toolchain in
*-win*-*)
case $header-$toolchain in
stdint*-gcc) true;;
*) false;;
esac && enable $var
;;
*)
case $header in
stdint.h) true;;
pthread.h) true;;
sys/mman.h) true;;
unistd.h) true;;
*) false;;
esac && enable $var
esac
enabled $var
} }
check_ld() { check_ld() {
true true
...@@ -530,6 +551,7 @@ EOF ...@@ -530,6 +551,7 @@ EOF
check_header stdint.h check_header stdint.h
check_header pthread.h check_header pthread.h
check_header sys/mman.h check_header sys/mman.h
check_header unistd.h # for sysconf(3) and friends.
check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment