Browse Source

Do not try to link any ICD file if /etc/OpenCL/vendors does not exist, or is not a directory.

Cyril Roelandt 12 years ago
parent
commit
d960ca1ed2
1 changed files with 10 additions and 7 deletions
  1. 10 7
      configure.ac

+ 10 - 7
configure.ac

@@ -1774,13 +1774,16 @@ AC_CONFIG_COMMANDS([executable-scripts], [
   chmod +x tools/starpu_workers_activity
 ])
 
-# Create links to ICD files in build/socl/vendors directory. SOCL will use this directory as the OCL_ICD_VENDORS directory
-for icd in /etc/OpenCL/vendors/*.icd ; do
-    if test "$(basename $icd)" != "socl.icd" ; then
-         new_icd=$(basename $icd)
- 	 AC_CONFIG_LINKS([socl/vendors/$new_icd:$icd])
-    fi
-done
+# Create links to ICD files in build/socl/vendors directory. SOCL will use this
+# directory as the OCL_ICD_VENDORS directory
+if test -d /etc/OpenCL/vendors; then
+    for icd in /etc/OpenCL/vendors/*.icd ; do
+        if test "$(basename $icd)" != "socl.icd" ; then
+            new_icd=$(basename $icd)
+ 	    AC_CONFIG_LINKS([socl/vendors/$new_icd:$icd])
+        fi
+    done
+fi
 
 AC_CONFIG_FILES(tests/regression/regression.sh tests/regression/profiles tests/regression/profiles.build.only)
 AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h gcc-plugin/src/starpu-gcc-config.h starpu-top/config.h)