meson: only require libelf if building radv
[mesa.git] / meson.build
index b1bd73691ee6f8e7ab2f594baec6f39680dee9dc..97809e982891bf6074040f3d3ea0f858edeaee11 100644 (file)
@@ -19,7 +19,7 @@
 # SOFTWARE.
 
 project('mesa', ['c', 'cpp'], version : '17.3.0-devel', license : 'MIT',
-        default_options : ['c_std=c99'])
+        default_options : ['c_std=c99', 'cpp_std=c++11'])
 
 with_dri3 = true  # XXX: need a switch for this
 with_vulkan_icd_dir = get_option('vulkan-icd-dir')
@@ -288,7 +288,7 @@ dep_thread = dependency('threads')
 pre_args += '-DHAVE_PTHREAD'
 dep_elf = dependency('libelf', required : false)
 if not dep_elf.found()
-  dep_elf = cc.find_library('elf')
+  dep_elf = cc.find_library('elf', required : with_amd_vk) # TODO: clover, r600, radeonsi
 endif
 dep_expat = dependency('expat')
 # this only exists on linux so either this is linux and it will be found, or