zfs/config
Arvind Sankar 4d61ade1a3 Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.

Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
  libssl
- librt is only used for clock_gettime, however on modern systems that's
  in libc rather than librt. Add a configure check to see if we actually
  need librt
- libdl from raidz_test

Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
  libspl_assertf

Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.

Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.

List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-07-10 14:26:00 -07:00
..
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Rules.am Move zfs_gitrev.h to build directory 2020-06-24 18:19:28 -07:00
always-arch.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
always-compiler-options.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
always-python.m4 Python config cleanup 2019-06-13 13:15:46 -07:00
always-pyzfs.m4 Python config cleanup 2019-06-13 13:15:46 -07:00
always-sed.m4 Fix check for sed --in-place 2020-06-24 18:19:59 -07:00
always-system.m4 OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
ax_code_coverage.m4 Moves Codecov Ignore to LCOV 2019-12-17 17:47:58 -08:00
ax_python_devel.m4 Adopt pyzfs from ClusterHQ 2018-05-01 10:33:35 -07:00
ax_restore_flags.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
ax_save_flags.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
config.awk Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
config.rpath Prevent `make distclean` removing config/config.rpath 2019-04-26 11:22:14 -07:00
deb.am Fix dracut Debian/Ubuntu packaging 2019-07-09 09:28:05 -07:00
find_system_library.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
gettext.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
host-cpu-c-abi.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
iconv.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
intlmacosx.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
kernel-access-ok-type.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-acl.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-aio-fsync.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-automount.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-bdi.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-bio.m4 Linux 5.5 compat: blkg_tryget() 2020-02-28 08:58:39 -08:00
kernel-blk-queue.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-blkdev.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-block-device-operations.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-clear-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-commit-metadata.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-config-defined.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-current-time.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-declare-event-class.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-dentry-operations.m4 Partially revert 5a6ac4c 2019-11-18 13:05:56 -08:00
kernel-dirty-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-discard-granularity.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-encode-fh-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-evict-inode.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fallocate.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-file-dentry.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-file-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-fmode-t.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-follow-down-one.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fpu.m4 Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore 2019-10-24 10:17:33 -07:00
kernel-fst-mount.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fsync.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-generic_io_acct.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-generic_readlink.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-get-disk-and-module.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-get-disk-ro.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-get-link.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-global_page_state.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-group-info.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-in-compat-syscall.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-create.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-inode-getattr.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-lock.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-lookup.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-inode-set-flags.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-set-iversion.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-times.m4 config/kernel-inode-times: initialize timespec 2020-05-04 15:25:48 -07:00
kernel-insert-inode-locked.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-is_owner_or_cap.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmap-atomic-args.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmem-cache.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmem.m4 Linux 5.8 compat: __vmalloc() 2020-06-08 16:32:02 -07:00
kernel-kstrtoul.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-ktime.m4 Linux 5.6 compat: ktime_get_raw_ts64() 2020-02-27 09:30:45 -08:00
kernel-kuid-helpers.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kuidgid.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-lseek-execute.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-make-request-fn.m4 Linux 5.7 compat: blk_alloc_queue() 2020-04-09 09:16:46 -07:00
kernel-misc-minor.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-mkdir-umode-t.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-mod-param.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-objtool.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-pde-data.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-percpu.m4 Use percpu_counter for obj_alloc counter of Linux-backed caches 2020-06-26 18:06:50 -07:00
kernel-proc-operations.m4 Linux 5.6 compat: struct proc_ops 2020-02-07 11:03:53 -08:00
kernel-put-link.m4 Fix typos 2020-06-09 21:24:09 -07:00
kernel-rename.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-rw.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-rwsem.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-sched.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-security-inode-init.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-set-nlink.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-setattr-prepare.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-sget-args.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-show-options.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-shrink.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-super-userns.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-timer.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-tmpfile.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-totalhigh_pages.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-totalram-pages-func.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-truncate-setsize.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-userns-capabilities.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-usleep_range.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-vfs-direct_IO.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-fsync.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-vfs-getattr.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-iterate.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-rw-iterate.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-wait.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-xattr-handler.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-zlib.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel.m4 Use percpu_counter for obj_alloc counter of Linux-backed caches 2020-06-26 18:06:50 -07:00
lib-ld.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
lib-link.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
lib-prefix.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
mount-helper.m4 The mount helper mount.zfs MUST be in /sbin (not '$sbindir'). 2015-05-18 16:54:36 -07:00
nls.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
pkg.m4 Fix typos in config/ 2019-08-30 09:40:30 -07:00
po.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
progtest.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
rpm.am Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
tgz.am Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
toolchain-simd.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
user-clock_gettime.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-dracut.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-gettext.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
user-libaio.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-libblkid.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-libcrypto.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-libexec.m4 Tunable directory for zfs runtime scripts 2018-06-07 09:59:59 -07:00
user-libtirpc.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
user-libudev.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-libuuid.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-makedev.m4 glibc 2.5 compat: use correct header for makedev() et al. 2017-03-31 09:32:00 -07:00
user-pam.m4 pam: fix test usage in configure script 2020-06-29 09:28:22 -07:00
user-runstatedir.m4 Add defs for makefile installation dir vars 2014-03-31 16:11:13 -07:00
user-systemd.m4 Fix systemd spec file macros 2018-11-11 18:06:36 -08:00
user-sysvinit.m4 Add systemd unit files for ZFS startup 2014-02-05 12:25:30 -08:00
user-udev.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-zlib.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
zfs-build.m4 configure fixes 2020-07-01 09:05:21 -07:00
zfs-meta.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00