meson: Move shm_dep check where it belongs
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Wed, 31 Oct 2018 05:36:01 +0000 (12:36 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Sat, 8 Jun 2019 08:32:14 +0000 (10:32 +0200)
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
meson.build

index 89cd145..166e5b8 100644 (file)
@@ -205,11 +205,6 @@ foreach f : check_functions
   endif
 endforeach
 
-shm_dep = cc.find_library('rt', required : false)
-if shm_dep.found()
-  cdata.set('HAVE_SHM_OPEN', 1)
-endif
-
 if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>')
   cdata.set('HAVE_MEMFD', 1)
 endif
@@ -249,6 +244,11 @@ libm_dep = cc.find_library('m', required : true)
 thread_dep = dependency('threads')
 cap_dep = cc.find_library('cap', required : false)
 
+shm_dep = cc.find_library('rt', required : false)
+if shm_dep.found()
+  cdata.set('HAVE_SHM_OPEN', 1)
+endif
+
 atomictest = '''void func() {
   volatile int atomic = 2;
   __sync_bool_compare_and_swap (&atomic, 2, 3);