From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 1/5] build: add support for libinih for mkfs
Date: Thu, 15 Oct 2020 14:29:21 +1100 [thread overview]
Message-ID: <20201015032925.1574739-2-david@fromorbit.com> (raw)
In-Reply-To: <20201015032925.1574739-1-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Need to make sure the library is present so we can build mkfs with
config file support.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
configure.ac | 3 +++
doc/INSTALL | 5 +++++
include/builddefs.in | 1 +
m4/package_inih.m4 | 20 ++++++++++++++++++++
4 files changed, 29 insertions(+)
create mode 100644 m4/package_inih.m4
diff --git a/configure.ac b/configure.ac
index 4674673ed67c..dc57bbd7cd8c 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 d4395eefa834..2b04f9cfe108 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 30b2727a8db4..e8f447f92baf 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 000000000000..a2775592e09d
--- /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)
+ ])
--
2.28.0
next prev parent reply other threads:[~2020-10-15 3:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 3:29 [PATCH 0/5] mkfs: Configuration file defined options Dave Chinner
2020-10-15 3:29 ` Dave Chinner [this message]
2020-10-15 5:40 ` [PATCH 1/5] build: add support for libinih for mkfs Darrick J. Wong
2020-10-15 3:29 ` [PATCH 2/5] mkfs: add initial ini format config file parsing support Dave Chinner
2020-10-15 5:46 ` Darrick J. Wong
2020-10-15 6:09 ` Dave Chinner
2020-10-15 3:29 ` [PATCH 3/5] mkfs: constify various strings Dave Chinner
2020-10-15 5:31 ` Darrick J. Wong
2020-10-15 3:29 ` [PATCH 4/5] mkfs: hook up suboption parsing to ini files Dave Chinner
2020-10-15 5:24 ` Darrick J. Wong
2020-10-15 3:29 ` [PATCH 5/5] mkfs: document config files in mkfs.xfs(8) Dave Chinner
2020-10-15 5:36 ` Darrick J. Wong
2020-10-15 5:13 ` [PATCH 0/5] mkfs: Configuration file defined options Darrick J. Wong
2020-10-15 5:32 ` Dave Chinner
2020-10-15 5:39 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201015032925.1574739-2-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).