Commit 4961ddfd authored by James Almer's avatar James Almer

Merge commit 'fd36cf6b'

* commit 'fd36cf6b':
  configure: Factorize check_64_bit()
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents c1c720d5 fd36cf6b
...@@ -4864,7 +4864,7 @@ check_host_cflags $host_cflags_speed ...@@ -4864,7 +4864,7 @@ check_host_cflags $host_cflags_speed
check_64bit(){ check_64bit(){
arch32=$1 arch32=$1
arch64=$2 arch64=$2
expr=$3 expr=${3:-'sizeof(void *) > 4'}
check_code cc "" "int test[2*($expr) - 1]" && check_code cc "" "int test[2*($expr) - 1]" &&
subarch=$arch64 || subarch=$arch32 subarch=$arch64 || subarch=$arch32
enable $subarch enable $subarch
...@@ -4879,23 +4879,23 @@ case "$arch" in ...@@ -4879,23 +4879,23 @@ case "$arch" in
enabled shared && enable_weak pic enabled shared && enable_weak pic
;; ;;
parisc) parisc)
check_64bit parisc parisc64 'sizeof(void *) > 4' check_64bit parisc parisc64
enabled shared && enable_weak pic enabled shared && enable_weak pic
;; ;;
ppc) ppc)
check_64bit ppc ppc64 'sizeof(void *) > 4' check_64bit ppc ppc64
enabled shared && enable_weak pic enabled shared && enable_weak pic
;; ;;
s390) s390)
check_64bit s390 s390x 'sizeof(void *) > 4' check_64bit s390 s390x
enabled shared && enable_weak pic enabled shared && enable_weak pic
;; ;;
sparc) sparc)
check_64bit sparc sparc64 'sizeof(void *) > 4' check_64bit sparc sparc64
enabled shared && enable_weak pic enabled shared && enable_weak pic
;; ;;
x86) x86)
check_64bit x86_32 x86_64 'sizeof(void *) > 4' check_64bit x86_32 x86_64
# Treat x32 as x64 for now. Note it also needs pic if shared # Treat x32 as x64 for now. Note it also needs pic if shared
test "$subarch" = "x86_32" && check_cpp_condition stddef.h 'defined(__x86_64__)' && test "$subarch" = "x86_32" && check_cpp_condition stddef.h 'defined(__x86_64__)' &&
subarch=x86_64 && enable x86_64 && disable x86_32 subarch=x86_64 && enable x86_64 && disable x86_32
......
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