summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-07-27 13:53:08 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-07-27 13:54:01 +0300
commit469b97c52413adc85bab7d7ee6e0a9cb5adddf30 (patch)
treeca654339f0f3b53adf3a15570208ddb46ea11501
parente367a413b09fece55ce4e08872ce79f328941ddd (diff)
Fallback to uuid for ossp-uuid with meson
The upstream name for the ossp-uuid package / pkg-config file is "uuid". Many distributions change this to be "ossp-uuid" to not conflict with e2fsprogs. This lookup fails on distributions which don't change this name, for example NixOS / nixpkgs. Both "ossp-uuid" and "uuid" are also checked in configure.ac. Author: Wolfgang Walther Reviewed-by: Nazir Bilal Yavuz, Alvaro Herrera, Peter Eisentraut Reviewed-by: Tristan Partin Discussion: https://www.postgresql.org/message-id/ca8f37e1-a2c3-40e2-91f6-59c3d3652ad4@technowledgy.de Backpatch: 16-, where meson support was added
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 29af7d06342..7a89e4cedc8 100644
--- a/meson.build
+++ b/meson.build
@@ -1416,7 +1416,9 @@ if uuidopt != 'none'
uuidfunc = 'uuid_to_string'
uuidheader = 'uuid.h'
elif uuidopt == 'ossp'
- uuid = dependency('ossp-uuid', required: false)
+ # 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)
uuidfunc = 'uuid_export'
uuidheader = 'uuid.h'
@@ -1424,8 +1426,6 @@ if uuidopt != 'none'
# windows installs neither a pkg-config nor a cmake dependency
# information. Nor is there another supported uuid implementation
# available on windows.
- #
- # Sometimes the ossp-uuid library is named 'uuid' sometimes 'ossp-uuid'
if not uuid.found()
uuid = cc.find_library('ossp-uuid',
required: false, dirs: test_lib_d,