mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
19 lines
921 B
Diff
19 lines
921 B
Diff
diff --git a/meson.build b/meson.build
|
|
index 1c6b32d..aa7dd25 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -58,10 +58,10 @@ endif
|
|
|
|
# argp-standalone dependency (if required)
|
|
if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
|
|
- if fs.is_dir(join_paths([get_option('prefix'), 'include']))
|
|
- inc += include_directories(join_paths([get_option('prefix'), 'include']))
|
|
+ argplib = cc.find_library('argp', has_headers : ['argp.h'], required: false)
|
|
+ if not argplib.found()
|
|
+ argplib = dependency('argp-standalone')
|
|
endif
|
|
- argplib = cc.find_library('argp', dirs : join_paths([get_option('prefix'), 'lib']))
|
|
else
|
|
argplib = dependency('', required : false)
|
|
endif
|