浏览代码

configure.ac: restore LDFLAGS when no valid opencl setup is found.

Nathalie Furmento 14 年之前
父节点
当前提交
583abfa0b4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      configure.ac

+ 2 - 1
configure.ac

@@ -463,7 +463,6 @@ if test x$enable_opencl = xyes -o x$enable_opencl = xmaybe; then
 	# in case OpenCL was explicitely required, but is not available, this is an error
 	if test x$enable_opencl = xyes -a x$have_valid_opencl = no; then
 		AC_MSG_ERROR([cannot find OpenCL])
-                LDFLAGS="${SAVED_LDFLAGS}"
 	fi
 
 	# now we enable OpenCL if and only if a proper setup is available
@@ -478,6 +477,8 @@ if test x$enable_opencl = xyes; then
 	AC_DEFINE(STARPU_USE_OPENCL, [1], [OpenCL support is activated])
 	CPPFLAGS="${CPPFLAGS} -DSTARPU_OPENCL_DATADIR=${datarootdir}/starpu/opencl"
         AC_SUBST(STARPU_OPENCL_DATAdir, "$(eval echo ${datarootdir}/starpu/opencl/examples)")
+else
+        LDFLAGS="${SAVED_LDFLAGS}"
 fi
 
 ###############################################################################