mirror_zfs/cmd/zed
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
..
agents Add device rebuild feature 2020-07-03 11:05:50 -07:00
zed.d Add device rebuild feature 2020-07-03 11:05:50 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Clean up lib dependencies 2020-07-10 14:26:00 -07:00
zed_conf.c zed additional features 2020-06-22 09:53:34 -07:00
zed_conf.h zed additional features 2020-06-22 09:53:34 -07:00
zed_disk_event.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zed_disk_event.h Bring over illumos ZFS FMA logic -- phase 1 2016-09-01 11:39:45 -07:00
zed_event.c zed additional features 2020-06-22 09:53:34 -07:00
zed_event.h zed additional features 2020-06-22 09:53:34 -07:00
zed_exec.c Add include files for prototypes 2020-06-18 12:21:25 -07:00
zed_exec.h Add include files for prototypes 2020-06-18 12:21:25 -07:00
zed_file.c Add include files for prototypes 2020-06-18 12:21:25 -07:00
zed_file.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_log.c Add missing includes to zed_log.c 2017-04-12 08:57:25 -07:00
zed_log.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_strings.c Mark functions as static 2020-06-18 12:20:38 -07:00
zed_strings.h Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed.c zed additional features 2020-06-22 09:53:34 -07:00
zed.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00