[PATCH] configure/Makefile.am: use pkg-config to discover libatomic_ops

Emil Velikov emil.l.velikov at gmail.com
Thu Mar 8 18:04:14 UTC 2018


On 6 February 2018 at 21:19, Peter Seiderer <ps.report at gmx.net> wrote:
> From: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>
> The configure script currently tests the availability of libatomic_ops
> by checking the presence of atomic_ops.h. While this is good enough as
> an availability test, it is not sufficient as on some platforms,
> libatomic_ops provides an actual shared library against which we
> should be linked to access libatomic_ops functionality.
>
> Therefore, we instead use PKG_CHECK_MODULES() to test the availability
> of libatomic_ops. Besides testing its availability, this also fills in
> the ATOMIC_OPS_LIBS variable with the list of libraries we need to
> link with to use libatomic_ops.
>
> All Mesa drivers that include xf86atomic.h have been updated to link
> against ATOMIC_OPS_LIBS.
>
> Of course, if we're not using libatomic_ops, ATOMIC_OPS_LIBS is empty,
> and we don't link against it.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Signed-off-by: Peter Seiderer <ps.report at gmx.net>
> [Bernd: PKG_CHECK_MODULES should not fail when libatomic_ops is missing]
> Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
> ---
>  amdgpu/Makefile.am    | 2 +-
>  configure.ac          | 2 +-
>  etnaviv/Makefile.am   | 3 ++-
>  freedreno/Makefile.am | 3 ++-
>  intel/Makefile.am     | 3 ++-
>  nouveau/Makefile.am   | 2 +-
>  omap/Makefile.am      | 2 +-
>  radeon/Makefile.am    | 2 +-
>  tegra/Makefile.am     | 2 +-
You're adding ATOMIC_OPS_LIBS to all the correct places, although
ATOMIC_OPS_CFLAGS seems to be missing.
Can you re-spin with that one added?

Thanks
Emil


More information about the dri-devel mailing list