dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
dnl versions are explictly not supported.
+GEN_ASM_OFFSETS=no
if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
AC_MSG_CHECKING([whether gcc version is sufficient])
major=0
else
AC_MSG_RESULT([yes])
fi
+
+ if test "x$cross_compiling" = xyes; then
+ GEN_ASM_OFFSETS=yes
+ fi
fi
+AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes)
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
case "$host_cpu" in
- i?86 | x86_64)
+ i?86 | x86_64 | amd64)
enable_asm=no
AC_MSG_RESULT([no, cross compiling])
;;
case "$host_cpu" in
i?86)
case "$host_os" in
- linux* | *freebsd* | dragonfly* | *netbsd*)
+ linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
;;
gnu*)
;;
esac
;;
- x86_64)
+ x86_64|amd64)
case "$host_os" in
- linux* | *freebsd* | dragonfly* | *netbsd*)
+ linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
;;
esac
DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
AC_MSG_RESULT([yes, x86])
;;
- x86_64)
+ x86_64|amd64)
DEFINES="$DEFINES -DUSE_X86_64_ASM"
AC_MSG_RESULT([yes, x86_64])
;;
DEFINES="$DEFINES -DHAVE_ALIAS"
case "$host_cpu" in
- x86_64)
+ x86_64|amd64)
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
fi
;;
esac
;;
- freebsd* | dragonfly* | *netbsd*)
+ freebsd* | dragonfly* | *netbsd* | openbsd*)
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DHAVE_ALIAS"
fi
if test "x$enable_gallium_llvm" = xauto; then
case "$host_cpu" in
- i*86|x86_64) enable_gallium_llvm=yes;;
+ i*86|x86_64|amd64) enable_gallium_llvm=yes;;
esac
fi
if test "x$enable_gallium_llvm" = xyes; then
fi
LLVM_COMPONENTS="engine bitwriter"
- if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
+ if $LLVM_CONFIG --components | grep -qw 'mcjit'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
fi
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
# LLVM 3.3 >= 177971 requires IRReader
- if $LLVM_CONFIG --components | grep -q '\<irreader\>'; then
+ if $LLVM_CONFIG --components | grep -qw 'irreader'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
fi
fi
gallium_require_llvm() {
if test "x$MESA_LLVM" = x0; then
case "$host_cpu" in
- i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
+ i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
esac
fi
}
if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for r600g and radeonsi.])
fi
- if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
+ if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then
AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
sources with the --enable-experimental-targets=R600
configure flag])