ref: d984763867f82879783c5b88615d9a458e3e7ad0
parent: fccebcba57c6ae57d23047a0759effc014267963
author: John Koleszar <jkoleszar@google.com>
date: Mon Dec 10 07:07:59 EST 2012
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
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -277,6 +277,7 @@
# Toolchain Check Functions
#
check_cmd() {
+ enabled external_build && return
log "$@"
"$@" >>${logfile} 2>&1
}
@@ -1174,9 +1175,6 @@
fi
;;
esac
-
- # for sysconf(3) and friends.
- check_header unistd.h
# glibc needs these
if enabled linux; then
--- a/configure
+++ b/configure
@@ -298,6 +298,7 @@
${EXPERIMENT_LIST}
"
CMDLINE_SELECT="
+ external_build
extra_warnings
werror
install_docs
@@ -497,7 +498,7 @@
fi
fi
fi
- if [ -z "$CC" ]; then
+ if [ -z "$CC" ] || enabled external_build; then
echo "Bypassing toolchain for environment detection."
enable external_build
check_header() {
@@ -506,6 +507,7 @@
shift
var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
disable $var
+ # Headers common to all environments
case $header in
stdio.h)
true;
@@ -517,6 +519,25 @@
done
${result:-true}
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() {
true
@@ -530,6 +551,7 @@
check_header stdint.h
check_header pthread.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
}
--
⑨