lib/meson.build: don't crash if there's no libdl
authorNikolaus Rath <Nikolaus@rath.org>
Wed, 24 May 2017 23:12:41 +0000 (16:12 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 24 May 2017 23:12:41 +0000 (16:12 -0700)
For example, FreeBSD doesn't have it.

Fixes: #173.
lib/meson.build

index 287dc866cd2954d66c89faec45cfc4a9df6f5c8a..c583b85d480ae4b866ba8ca5f2c3d887e19553fb 100644 (file)
@@ -17,7 +17,7 @@ if cfg.has('HAVE_ICONV')
 endif
 
 deps = [ thread_dep ]
-libdl = meson.get_compiler('c').find_library('dl')
+libdl = meson.get_compiler('c').find_library('dl', required: false)
 if libdl.found()
    deps += [ libdl ]
 endif