public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Kendall <wkendall@sgi.com>
To: xfs@oss.sgi.com
Subject: [PATCH 1/8] xfsdump: link with libpthread
Date: Wed,  2 Nov 2011 16:10:47 -0500	[thread overview]
Message-ID: <1320268254-20583-2-git-send-email-wkendall@sgi.com> (raw)
In-Reply-To: <1320268254-20583-1-git-send-email-wkendall@sgi.com>

This patch changes xfsdump/xfsrestore to link with libpthread in
preparation for enabling multi-stream support. The libpthread checks
are the same as those used in xfsprogs.

Signed-off-by: Bill Kendall <wkendall@sgi.com>
---
 configure.in          |    3 +++
 dump/Makefile         |    2 +-
 include/builddefs.in  |    1 +
 m4/Makefile           |    1 +
 m4/package_pthread.m4 |   19 +++++++++++++++++++
 restore/Makefile      |    2 +-
 6 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 m4/package_pthread.m4

diff --git a/configure.in b/configure.in
index b7ea1eb..8d4a256 100644
--- a/configure.in
+++ b/configure.in
@@ -67,6 +67,9 @@ AC_MULTILIB($enable_lib64)
 AC_PACKAGE_NEED_UUID_H
 AC_PACKAGE_NEED_UUIDCOMPARE
 
+AC_PACKAGE_NEED_PTHREAD_H
+AC_PACKAGE_NEED_PTHREADMUTEXINIT
+
 AC_PACKAGE_NEED_NCURSES_H
 AC_PACKAGE_WANT_WORKING_LIBNCURSES
 
diff --git a/dump/Makefile b/dump/Makefile
index ce964a0..d193f68 100644
--- a/dump/Makefile
+++ b/dump/Makefile
@@ -89,7 +89,7 @@ HFILES = $(LOCALINCL)
 LHFILES = $(COMMINCL) $(INVINCL)
 LINKS = $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
 LDIRT = $(LINKS)
-LLDLIBS = $(LIBUUID) $(LIBHANDLE) $(LIBATTR) $(LIBRMT)
+LLDLIBS = $(LIBUUID) $(LIBHANDLE) $(LIBATTR) $(LIBRMT) $(LIBPTHREAD)
 LTDEPENDENCIES = $(LIBRMT)
 
 LCFLAGS = -DDUMP
diff --git a/include/builddefs.in b/include/builddefs.in
index f69c038..d5cc8d3 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -16,6 +16,7 @@ CFLAGS = @CFLAGS@
 LIBRMT = $(TOPDIR)/librmt/librmt.la
 LIBXFS = @libxfs@
 LIBATTR = @libattr@
+LIBPTHREAD = @libpthread@
 LIBUUID = @libuuid@
 LIBCURSES = @libcurses@
 LIBHANDLE = @libhdl@
diff --git a/m4/Makefile b/m4/Makefile
index 8ce63f8..9a35056 100644
--- a/m4/Makefile
+++ b/m4/Makefile
@@ -17,6 +17,7 @@ LSRCFILES = \
 	package_attrdev.m4 \
 	package_globals.m4 \
 	package_ncurses.m4 \
+	package_pthread.m4 \
 	package_utilies.m4 \
 	package_uuiddev.m4 \
 	package_xfslibs.m4 \
diff --git a/m4/package_pthread.m4 b/m4/package_pthread.m4
new file mode 100644
index 0000000..be21d29
--- /dev/null
+++ b/m4/package_pthread.m4
@@ -0,0 +1,19 @@
+AC_DEFUN([AC_PACKAGE_NEED_PTHREAD_H],
+  [ AC_CHECK_HEADERS(pthread.h)
+    if test $ac_cv_header_pthread_h = no; then
+	AC_CHECK_HEADERS(pthread.h,, [
+	echo
+	echo 'FATAL ERROR: could not find a valid pthread header.'
+	exit 1])
+    fi
+  ])
+
+AC_DEFUN([AC_PACKAGE_NEED_PTHREADMUTEXINIT],
+  [ AC_CHECK_LIB(pthread, pthread_mutex_init,, [
+	echo
+	echo 'FATAL ERROR: could not find a valid pthread library.'
+	exit 1
+    ])
+    libpthread=-lpthread
+    AC_SUBST(libpthread)
+  ])
diff --git a/restore/Makefile b/restore/Makefile
index 003ea16..ce3d6b4 100644
--- a/restore/Makefile
+++ b/restore/Makefile
@@ -99,7 +99,7 @@ HFILES = $(LOCALINCL)
 LHFILES = $(COMMINCL) $(INVINCL)
 LINKS = $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
 LDIRT = $(LINKS)
-LLDLIBS = $(LIBUUID) $(LIBHANDLE) $(LIBATTR) $(LIBRMT)
+LLDLIBS = $(LIBUUID) $(LIBHANDLE) $(LIBATTR) $(LIBRMT) $(LIBPTHREAD)
 LTDEPENDENCIES = $(LIBRMT)
 
 LCFLAGS = -DRESTORE
-- 
1.7.0.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-11-02 21:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 21:10 [PATCH 0/8] xfsdump: enable support for multiple streams Bill Kendall
2011-11-02 21:10 ` Bill Kendall [this message]
2011-11-03  8:21   ` [PATCH 1/8] xfsdump: link with libpthread Christoph Hellwig
2011-11-02 21:10 ` [PATCH 2/8] xfsdump: remove multi-stream synchronous dir dump Bill Kendall
2011-11-03  8:22   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 3/8] xfsdump: implement lock abstraction with pthreads Bill Kendall
2011-11-03  7:10   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 4/8] xfsdump: simplify qlock ordinal bitmap Bill Kendall
2011-11-03  8:30   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 5/8] xfsdump: convert IRIX sproc threads to pthreads Bill Kendall
2011-11-03  8:31   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 6/8] xfsdump: process thread exit status Bill Kendall
2011-11-03  8:32   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 7/8] xfsdump: path lookup cache must be thread specific Bill Kendall
2011-11-03  8:33   ` Christoph Hellwig
2011-11-02 21:10 ` [PATCH 8/8] xfsdump: enable multiple streams Bill Kendall
2011-11-03  8:36   ` Christoph Hellwig
2011-11-03 10:19 ` [PATCH 0/8] xfsdump: enable support for " Christoph Hellwig
2011-11-03 12:11   ` Bill Kendall

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=1320268254-20583-2-git-send-email-wkendall@sgi.com \
    --to=wkendall@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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