1 diff --git a/meson_options.txt b/meson_options.txt
2 index b8f753e2e1a..2163e3ab7ee 100644
3 --- a/meson_options.txt
4 +++ b/meson_options.txt
6 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13 + description : 'Locations to search for clang libraries.'
18 diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
19 index 14df6b86f7f..adcd5110342 100644
20 --- a/src/gallium/targets/opencl/meson.build
21 +++ b/src/gallium/targets/opencl/meson.build
22 @@ -30,6 +30,7 @@ if with_ld_version_script
25 llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
26 +clang_libdir = get_option('clang-libdir')
27 opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
30 @@ -60,19 +61,19 @@ else
32 if not (dep_clang.found() and dep_clang_usable)
34 - cpp.find_library('clangCodeGen', dirs : llvm_libdir),
35 - cpp.find_library('clangFrontendTool', dirs : llvm_libdir),
36 - cpp.find_library('clangFrontend', dirs : llvm_libdir),
37 - cpp.find_library('clangDriver', dirs : llvm_libdir),
38 - cpp.find_library('clangSerialization', dirs : llvm_libdir),
39 - cpp.find_library('clangParse', dirs : llvm_libdir),
40 - cpp.find_library('clangSema', dirs : llvm_libdir),
41 - cpp.find_library('clangAnalysis', dirs : llvm_libdir),
42 - cpp.find_library('clangAST', dirs : llvm_libdir),
43 - cpp.find_library('clangASTMatchers', dirs : llvm_libdir),
44 - cpp.find_library('clangEdit', dirs : llvm_libdir),
45 - cpp.find_library('clangLex', dirs : llvm_libdir),
46 - cpp.find_library('clangBasic', dirs : llvm_libdir),
47 + cpp.find_library('clangCodeGen', dirs : clang_libdir),
48 + cpp.find_library('clangFrontendTool', dirs : clang_libdir),
49 + cpp.find_library('clangFrontend', dirs : clang_libdir),
50 + cpp.find_library('clangDriver', dirs : clang_libdir),
51 + cpp.find_library('clangSerialization', dirs : clang_libdir),
52 + cpp.find_library('clangParse', dirs : clang_libdir),
53 + cpp.find_library('clangSema', dirs : clang_libdir),
54 + cpp.find_library('clangAnalysis', dirs : clang_libdir),
55 + cpp.find_library('clangAST', dirs : clang_libdir),
56 + cpp.find_library('clangASTMatchers', dirs : clang_libdir),
57 + cpp.find_library('clangEdit', dirs : clang_libdir),
58 + cpp.find_library('clangLex', dirs : clang_libdir),
59 + cpp.find_library('clangBasic', dirs : clang_libdir),
60 polly_dep, polly_isl_dep,
62 # check clang once more
63 @@ -112,7 +113,7 @@ if with_opencl_icd
64 input : 'mesa.icd.in',
67 - install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
68 + install_dir : join_paths(get_option('prefix'), 'etc', 'OpenCL', 'vendors'),
71 if meson.version().version_compare('>= 0.58')