From: Dave Chinner Date: Fri, 20 Nov 2020 22:03:29 +0000 (-0500) Subject: build: add support for libinih for mkfs X-Git-Tag: xfsprogs-5.10-fixes_2020-12-06~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50949a0f96bcf6ed4f112b8e533e5c4366baac47;p=thirdparty%2Fxfsprogs-dev.git build: add support for libinih for mkfs Need to make sure the library is present so we can build mkfs with config file support. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/configure.ac b/configure.ac index c70784be2..645e45723 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,9 @@ AC_PACKAGE_UTILITIES(xfsprogs) AC_MULTILIB($enable_lib64) AC_RT($enable_librt) +AC_PACKAGE_NEED_INI_H +AC_PACKAGE_NEED_LIBINIH + AC_PACKAGE_NEED_UUID_H AC_PACKAGE_NEED_UUIDCOMPARE diff --git a/doc/INSTALL b/doc/INSTALL index d4395eefa..2b04f9cfe 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -28,6 +28,11 @@ Linux Instructions (on an RPM based system) or the uuid-dev package (on a Debian system) as some of the commands make use of the UUID library provided by these. + If your distro does not provide a libinih package, you can download and build + it from source from the upstream repository found at: + + https://github.com/benhoyt/inih + To build the package and install it manually, use the following steps: # make diff --git a/include/builddefs.in b/include/builddefs.in index 30b2727a8..e8f447f92 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -27,6 +27,7 @@ LIBTERMCAP = @libtermcap@ LIBEDITLINE = @libeditline@ LIBBLKID = @libblkid@ LIBDEVMAPPER = @libdevmapper@ +LIBINIH = @libinih@ LIBXFS = $(TOPDIR)/libxfs/libxfs.la LIBFROG = $(TOPDIR)/libfrog/libfrog.la LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la diff --git a/m4/package_inih.m4 b/m4/package_inih.m4 new file mode 100644 index 000000000..a2775592e --- /dev/null +++ b/m4/package_inih.m4 @@ -0,0 +1,20 @@ +AC_DEFUN([AC_PACKAGE_NEED_INI_H], + [ AC_CHECK_HEADERS([ini.h]) + if test $ac_cv_header_ini_h = no; then + echo + echo 'FATAL ERROR: could not find a valid ini.h header.' + echo 'Install the libinih development package.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_LIBINIH], + [ AC_CHECK_LIB(inih, ini_parse,, [ + echo + echo 'FATAL ERROR: could not find a valid inih library.' + echo 'Install the libinih library package.' + exit 1 + ]) + libinih=-linih + AC_SUBST(libinih) + ])