summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-06-04 23:04:44 +1000
committerTom Stellard <thomas.stellard@amd.com>2013-07-12 13:21:28 -0700
commitaf16f73051c2edf234970289795d270a593d3c0a (patch)
tree22195380c79c686c056a05ef76a617a1baae81c2 /configure.ac
parentbf86e0e050279394c80062e2d910c8619c1d1fe1 (diff)
configure: Avoid use of AC_CHECK_FILE for cross compiling
The AC_CHECK_FILE macro can't be used for cross compiling as it will result in "error: cannot check for file existence when cross compiling". Replace it with the AS_IF macro. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jonathan Liu <net147@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 2265e854a80..7f933b38671 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1614,8 +1614,8 @@ if test "x$enable_gallium_llvm" = xyes; then
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- AC_CHECK_FILE("$CLANG_RESOURCE_DIR/include/stddef.h",,
- AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
+ AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
+ [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
fi
else
MESA_LLVM=0
@@ -1853,7 +1853,7 @@ if test "x$MESA_LLVM" != x0; then
if test "x$with_llvm_shared_libs" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
- AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
+ AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
if test "x$llvm_have_one_so" = xyes; then
dnl LLVM was built using auto*, so there is only one shared object.
@@ -1861,8 +1861,8 @@ if test "x$MESA_LLVM" != x0; then
else
dnl If LLVM was built with CMake, there will be one shared object per
dnl component.
- AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
- AC_MSG_ERROR([Could not find llvm shared libraries:
+ AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
+ [AC_MSG_ERROR([Could not find llvm shared libraries:
Please make sure you have built llvm with the --enable-shared option
and that your llvm libraries are installed in $LLVM_LIBDIR
If you have installed your llvm libraries to a different directory you
@@ -1873,7 +1873,7 @@ if test "x$MESA_LLVM" != x0; then
--enable-opencl
If you do not want to build with llvm shared libraries and instead want to
use llvm static libraries then remove these options from your configure
- invocation and reconfigure.]))
+ invocation and reconfigure.])])
dnl We don't need to update LLVM_LIBS in this case because the LLVM
dnl install uses a shared object for each compoenent and we have