autoconf: Only define GPGPU_CODEGEN, if that feature is requested

Before we defined GPGPU_CODEGEN to '0', which does not disable the relevant code
as we just check if that value is defined at all. We now follow the cmake
approach and only define GPGPU_CODEGEN, if the feature should be enabled.

Reported by: Sebastian Pop <spop@codeaurora.org>

llvm-svn: 162275
This commit is contained in:
Tobias Grosser 2012-08-21 12:29:10 +00:00
parent 354686be76
commit 1df5289782
3 changed files with 7 additions and 10 deletions

View File

@ -1,7 +1,8 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

View File

@ -127,8 +127,8 @@ AC_ARG_ENABLE(polly_gpu_codegen,
enableval=default)
case "$enableval" in
yes) AC_DEFINE([GPU_CODEGEN],[1], [Define if gpu codegen is enabled]) ;;
no) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
default) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
no) ;;
default) ;;
*) AC_MSG_ERROR([Invalid setting for --enable-polly-gpu-codegen. Use "yes" or "no"]) ;;
esac

8
polly/configure vendored
View File

@ -3021,12 +3021,8 @@ case "$enableval" in
yes)
$as_echo "#define GPU_CODEGEN 1" >>confdefs.h
;;
no)
$as_echo "#define GPU_CODEGEN 0" >>confdefs.h
;;
default)
$as_echo "#define GPU_CODEGEN 0" >>confdefs.h
;;
no) ;;
default) ;;
*) as_fn_error $? "Invalid setting for --enable-polly-gpu-codegen. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
esac