Use configure checks for various inline keywords.

Change-Id: I8508f1a3d3430f998bb9295f849e88e626a52a24
This commit is contained in:
Ronald S. Bultje
2013-02-06 12:45:28 -08:00
parent a788e0fe63
commit aac73df1a7
13 changed files with 104 additions and 91 deletions

View File

@@ -460,6 +460,7 @@ write_common_target_config_h() {
#ifndef VPX_CONFIG_H
#define VPX_CONFIG_H
#define RESTRICT ${RESTRICT}
#define INLINE ${INLINE}
EOF
print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
@@ -1160,6 +1161,14 @@ EOF
[ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' |
grep '4f *32 *42 *45' >/dev/null 2>&1 && enable big_endian
# Try to find which inline keywords are supported
check_cc <<EOF && INLINE="inline"
static inline function() {}
EOF
check_cc <<EOF && INLINE="__attribute__((always_inline))"
static __attribute__((always_inline)) function() {}
EOF
# Almost every platform uses pthreads.
if enabled multithread; then
case ${toolchain} in