diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-09-22 08:03:23 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-09-22 08:03:23 +0900 |
commit | 293a3286d764df15d834fe5ac3bac4dc513817e7 (patch) | |
tree | 35e6370be1efa8cdc662e7344305bb9056ad27a7 | |
parent | e1d917182c1953b16b32a39ed2fe38e3d0823047 (diff) |
Fix meson build with -Duuid=ossp when using version older than 0.60
The package for the UUID library may be named "uuid" or "ossp-uuid", and
meson.build has been using a single call of dependency() with multiple
names, something only supported since meson 0.60.0.
The minimum version of meson supported by Postgres is 0.57.2 on HEAD,
since f039c2244110, and 0.54 on stable branches down to 16.
Author: Oreo Yang <oreo.yang@hotmail.com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/OS3P301MB01656E6F91539770682B1E77E711A@OS3P301MB0165.JPNP301.PROD.OUTLOOK.COM
Backpatch-through: 16
-rw-r--r-- | meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build index d71c7c8267e..395416a6060 100644 --- a/meson.build +++ b/meson.build @@ -1607,7 +1607,10 @@ if uuidopt != 'none' elif uuidopt == 'ossp' # In upstream, the package and library is called just 'uuid', but many # distros change it to 'ossp-uuid'. - uuid = dependency('ossp-uuid', 'uuid', required: false) + uuid = dependency('ossp-uuid', required: false) + if not uuid.found() + uuid = dependency('uuid', required: false) + endif uuidfunc = 'uuid_export' uuidheader = 'uuid.h' |