diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2014-05-11 22:09:32 -0500 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-06-21 16:40:39 -0300 |
commit | 0c698ef0374b671d3b6a8def2d9c113797ceaec3 (patch) | |
tree | 8f50497bc5b3af373d20b81b0fa2ce0bded2d4aa /compat | |
parent | dc64ab67207fef897bca88741fc42330793d7bd8 (diff) |
configure: add workaround for systems without zlib.pc
Some systems (e.g. FreeBSD) might not have installed the appropriate
pkg-config file as they should. We can workaround the issue by creating
the .pc file they should have distributed.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/.gitignore | 1 | ||||
-rw-r--r-- | compat/gen_zlib_pc.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/compat/.gitignore b/compat/.gitignore new file mode 100644 index 00000000..107ba17a --- /dev/null +++ b/compat/.gitignore @@ -0,0 +1 @@ +zlib.pc diff --git a/compat/gen_zlib_pc.c b/compat/gen_zlib_pc.c new file mode 100644 index 00000000..198a727c --- /dev/null +++ b/compat/gen_zlib_pc.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <zlib.h> + +static const char *template = + "prefix=/usr\n" + "exec_prefix=${prefix}\n" + "libdir=${exec_prefix}/lib\n" + "\n" + "Name: zlib\n" + "Description: zlib compression library\n" + "Version: %s\n" + "Libs: -lz\n"; + +int main(void) +{ + printf(template, ZLIB_VERSION); + return 0; +} |