[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] meson.build: Don't look for libudev for static builds
From: |
Peter Maydell |
Subject: |
Re: [PATCH] meson.build: Don't look for libudev for static builds |
Date: |
Fri, 2 Oct 2020 14:09:30 +0100 |
On Fri, 2 Oct 2020 at 14:05, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 02/10/20 14:35, Peter Maydell wrote:
> >
> > It would be better to do the "see if a static library is present"
> > test. This isn't too hard to do in configure (compare that
> > six line fix to the detection of libgio). Hopefully it is
> > not too hard to do in meson ?
>
> Yes, something like:
>
> if enable_static
> skeleton = 'int main(void) { return 0; }'
> if not cc.links(skeleton, dependencies: libudev)
> if get_option('mpath').enabled()
> error('Cannot link with libudev')
> else
> warning('Cannot link with libudev, disabling')
> libudev = not_found
> endif
> endif
> endif
> endif
This duplicates the information that the thing that depends
on libudev is mpath. Can we put this in a wrapper around
dependency() so that we could just say something like
libudev = compile_checked_dependency('libudev',
required: get_option('mpath').enabled(),
static: enable_static)
for those dependencies that want to do the "does this compile"
check ?
thanks
-- PMM
- [PATCH] meson.build: Don't look for libudev for static builds, Peter Maydell, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Yonggang Luo, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds,
Peter Maydell <=
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Peter Maydell, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Peter Maydell, 2020/10/02
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Yonggang Luo, 2020/10/03
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/03
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Yonggang Luo, 2020/10/03
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/03
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Yonggang Luo, 2020/10/03
- Re: [PATCH] meson.build: Don't look for libudev for static builds, Paolo Bonzini, 2020/10/03