1#
2# Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m'
3# shows these as x86_64. Ask the system 'gcc' what it thinks.
4#
5AC_DEFUN([AC_IS_LINUX_MIXED],
6[AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed,
7[ AC_LANG_PUSH([C])
8  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
9      [[#ifndef __x86_64__
10       error: Not x86-64 even if uname says so!
11      #endif
12      ]])],
13      [llvm_cv_linux_mixed=no],
14      [llvm_cv_linux_mixed=yes])
15  AC_LANG_POP([C])
16])
17])
18