summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 17:22:04 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 18:01:39 +0200
commitf6904a98bffe0bce5fc6aac408c141a25c0e05ab (patch)
tree80e3bc91cc427a06c35d6dc3a3d50baad5ff5873 /configure.ac
parent6dd765d1abd92fe0ec6f3349b5bbd48294078815 (diff)
Add a pkg-config file for libsquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d62f5a0..015c1e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
environment variable AL_OPTS="-I/other/macro/dir" before running
./autogen.sh or autoreconf again. Make sure pkg-config is installed.])])
PKG_PROG_PKG_CONFIG
+PKG_INSTALLDIR
UL_WARN_ADD([-Wall])
UL_WARN_ADD([-Wextra])
@@ -108,6 +109,13 @@ PKG_CHECK_MODULES(ZSTD, [libzstd],
[AM_CONDITIONAL([WITH_ZSTD], [true])],
[AM_CONDITIONAL([WITH_ZSTD], [false])])
+libsqfs_dep_mod=""
+AM_COND_IF([WITH_GZIP], [libsqfs_dep_mod="$libsqfs_dep_mod zlib"], [])
+AM_COND_IF([WITH_XZ], [libsqfs_dep_mod="$libsqfs_dep_mod liblzma >= 5.0.0"], [])
+AM_COND_IF([WITH_LZ4], [libsqfs_dep_mod="$libsqfs_dep_mod liblz4"], [])
+AM_COND_IF([WITH_ZSTD], [libsqfs_dep_mod="$libsqfs_dep_mod libzstd"], [])
+AC_SUBST([LIBSQFS_DEP_MOD], ["$libsqfs_dep_mod"])
+
AM_CONDITIONAL([WITH_LZO], [false])
if test "x$want_lzo" != "xno"; then
@@ -180,5 +188,6 @@ AC_CHECK_HEADERS([sys/xattr.h], [], [])
##### generate output #####
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([lib/sqfs/libsquashfs.pc])
AC_OUTPUT([Makefile])