commit | be252f36689e9de832b38ec4559b3ffe675de737 | [log] [tgz] |
---|---|---|
author | Sebastian Kemper <sebastian_ml@gmx.net> | Tue Dec 17 19:22:51 2019 +0100 |
committer | Sebastian Kemper <sebastian_ml@gmx.net> | Tue Dec 17 19:36:04 2019 +0100 |
tree | 6d0eb3ffacc54b513e0b657fa2e983c75b60c44a | |
parent | 3ac234eb67dced393c336c9de17d5c59c4696bed [diff] |
cmake: detect fts also in external lib Not all libc implementations support fts. fts support may be added via an external library. One such example is musl libc. It doesn't support fts. But support for fts can be added to the target device via musl-fts, which provides libfts. When libzip encounters such a setup (fts.h available but symbols in libfts.so) the build fails at the linking stage: zipcmp.c:(.text.startup+0x130): undefined reference to `fts_open' /home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: zipcmp.c:(.text.startup+0x172): undefined reference to `fts_read' This commit sets up cmake so that it checks for fts symbols first in libc and - if none encountered there - in an external libfts. So in case libc provides fts nothing changes, libzip will use libc's fts symbols (if fts.h is present). If on the other hand libc doesn't provide fts but libfts does, it'll link it in where required (zipcmp). Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This is libzip, a C library for reading, creating, and modifying zip archives. Files can be added from data buffers, files, or compressed data copied directly from other zip archives. Changes made without closing the archive can be reverted. Decryption and encryption of Winzip AES and decryption of legacy PKware encrypted files is supported. The API is documented by man pages.
libzip is fully documented via man pages. HTML versions of the man pages are on libzip.org and in the man directory. You can start with libzip(3), which lists all others. Example source code is in the examples and src subdirectories.
If you have developed an application using libzip, you can find out about API changes and how to adapt your code for them in the included file API-CHANGES.md.
See the INSTALL.md file for installation instructions and dependencies.
If you make a binary distribution, please include a pointer to the distribution site:
The latest version can always be found there. The official repository is at github.
There is a mailing list for developers using libzip. You can subscribe to it by sending a mail with the subject “subscribe libzip-discuss” to minimalist at nih.at. List mail should be sent to libzip-discuss at nih.at. Use this for bug reports or questions.
If you want to reach the authors in private, use libzip@nih.at.