From: Mans Rullgard Date: Tue, 23 Oct 2012 22:33:44 +0000 (+0100) Subject: configure: generalise 64-bit test X-Git-Tag: android-x86-4.4-r1~8529^2~11 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d4c99513f41272b9753e59642724717b834710a0;p=android-x86%2Fexternal-ffmpeg.git configure: generalise 64-bit test Signed-off-by: Mans Rullgard --- diff --git a/configure b/configure index 37cdf1e096..b1c6d4511c 100755 --- a/configure +++ b/configure @@ -2668,13 +2668,20 @@ EOF check_host_cflags -std=c99 check_host_cflags -Wall +check_64bit(){ + arch32=$1 + arch64=$2 + expr=$3 + check_code cc "" "int test[2*($expr) - 1]" && + subarch=$arch64 || subarch=$arch32 +} + case "$arch" in alpha|ia64|mips|parisc|sparc) spic=$shared ;; x86) - subarch="x86_32" - check_code cc "" "int test[(int)sizeof(char*) - 7]" && subarch="x86_64" + check_64bit x86_32 x86_64 'sizeof(void *) > 4' if test "$subarch" = "x86_64"; then spic=$shared fi