All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dan Ben-Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH infiniband-diags] Add new configure flag to enable/disable the rdma-ndd build
Date: Thu, 05 Feb 2015 07:19:15 -0500	[thread overview]
Message-ID: <54D35FC3.60407@dev.mellanox.co.il> (raw)

From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Add new flag --enable-rdma-ndd (default=yes) 

Signed-off-by: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/Makefile.am b/Makefile.am
index 4e08c2b..63c4b48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,9 +15,11 @@ sbin_PROGRAMS = src/ibaddr src/ibnetdiscover src/ibping src/ibportstate \
 	        src/perfquery src/sminfo src/smpdump src/smpquery \
 	        src/saquery src/vendstat src/iblinkinfo \
 		src/ibqueryerrors src/ibcacheedit src/ibccquery \
-		src/ibccconfig \
-		src/dump_fts \
-		src/rdma-ndd
+		src/ibccconfig src/dump_fts
+
+if ENABLE_RDMA_NDD
+sbin_PROGRAMS += src/rdma-ndd
+endif
 
 if ENABLE_TEST_UTILS
 sbin_PROGRAMS += src/ibsendtrap src/mcm_rereg_test
@@ -71,10 +73,13 @@ man_MANS = doc/man/ibaddr.8 \
 		doc/man/smpquery.8 \
 		doc/man/vendstat.8 \
 		doc/man/infiniband-diags.8 \
-		doc/man/rdma-ndd.8 \
 		man/dump_lfts.8 \
 		man/dump_mfts.8
 
+if ENABLE_RDMA_NDD
+man_MANS += doc/man/rdma-ndd.8
+endif
+
 # define this for the dist target
 compat_man_pages = man/ibdiscover.8 man/ibcheckerrors.8 man/ibcheckerrs.8 \
 		man/ibchecknet.8 man/ibchecknode.8 man/ibcheckport.8 \
@@ -161,6 +166,8 @@ install-data-hook:
 	$(top_srcdir)/config/install-sh -c -m 444 $(top_srcdir)/etc/error_thresholds $(DESTDIR)/$(sysconfdir)/infiniband-diags
 	$(top_srcdir)/config/install-sh -c -m 400 $(top_srcdir)/etc/ibdiag.conf $(DESTDIR)/$(sysconfdir)/infiniband-diags
 
+if ENABLE_RDMA_NDD
 install-exec-hook:
 	$(top_srcdir)/config/install-sh -m 755 -d $(DESTDIR)/$(sysconfdir)/init.d
 	$(top_srcdir)/config/install-sh -m 755 $(top_srcdir)/etc/rdma-ndd.init $(DESTDIR)/$(sysconfdir)/init.d/rdma-ndd
+endif
diff --git a/configure.ac b/configure.ac
index ed1b834..11f47f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,18 @@ fi
 AC_SUBST(ibnetdisc_api_version)
 dnl End libibnetdisc stuff
 
+dnl with or with rdma-ndd
+AC_MSG_CHECKING(for --enable-rdma-ndd)
+AC_ARG_ENABLE(rdma-ndd,
+[  --enable-rdma-ndd build rdma-ndd (default=yes)],
+[case "${enableval}" in
+  yes) rdmandd=yes ;;
+  no)  rdmandd=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-rdma-ndd) ;;
+esac],[rdmandd=yes])
+AM_CONDITIONAL(ENABLE_RDMA_NDD, test x$rdmandd = xyes)
+AC_MSG_RESULT(${rdmandd=no})
+
 dnl configures for rdma-ndd startup script
 default_rdma_service=openibd
 AC_ARG_WITH([rdma_service],
@@ -198,9 +210,12 @@ default_start="null"
 AC_SUBST(DEFAULT_START, $default_start)
 AC_SUBST(DEFAULT_STOP, $default_stop)
 
-AC_CHECK_HEADER(libudev.h, with_udev="yes", with_udev="no")
-AC_CHECK_LIB(udev, udev_monitor_ref, [], AC_MSG_ERROR(libudev is required for rdma-ndd...))
-AC_CHECK_FUNCS_ONCE(udev_get_sys_path)
+if test x$rdmandd = xyes; then
+    AC_CHECK_HEADER(libudev.h, with_udev="yes", with_udev="no")
+    AC_CHECK_LIB(udev, udev_monitor_ref, [], AC_MSG_ERROR(libudev is required for rdma-ndd...))
+    AC_CONFIG_FILES([doc/man/rdma-ndd.8 etc/rdma-ndd.init])
+    AC_CHECK_FUNCS_ONCE(udev_get_sys_path)
+fi
 
 dnl Generate doc/man/*.in files if possible
 DOC_DATE="`date +%Y-%m-%d`"
@@ -275,8 +290,6 @@ AC_CONFIG_FILES([\
 	doc/man/smpquery.8 \
 	doc/man/vendstat.8 \
 	doc/man/infiniband-diags.8 \
-	doc/man/rdma-ndd.8 \
-	etc/rdma-ndd.init \
 	libibnetdisc/Makefile \
 ])
 AC_OUTPUT
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2015-02-05 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 12:19 Hal Rosenstock [this message]
     [not found] ` <54D35FC3.60407-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-02-07  3:40   ` [PATCH infiniband-diags] Add new configure flag to enable/disable the rdma-ndd build Weiny, Ira

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=54D35FC3.60407@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.