>From 2d1d28ca45cc47e3de2bf4c23a5321f15cabd804 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <[EMAIL PROTECTED]>
Date: Sun, 11 Nov 2007 18:12:35 -0800
Subject: [PATCH] Add --with-partitions-conf to configure.

   As well as adding this option, change the default location/name for this
   file to be <sysconfdir>/<opensm-conf-sub-dir>/<file> to be consistent with
   other config files.

Signed-off-by: Ira K. Weiny <[EMAIL PROTECTED]>
---
 opensm/configure.in              |   20 ++++++++++++++++++++
 opensm/include/opensm/osm_base.h |   10 +++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/opensm/configure.in b/opensm/configure.in
index 14fd60a..8e56cc7 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -112,6 +112,26 @@ AC_DEFINE_UNQUOTED(HAVE_DEFAULT_NODENAME_MAP,
        ["$CONF_DIR/$NODENAMEMAPFILE"],
        [Define a default node name map file])
 
+dnl Check for a different partition conf file
+PARTITION_CONFIG_FILE=partitions.conf
+AC_MSG_CHECKING(for --with-partitions-conf)
+AC_ARG_WITH(partitions-conf,
+    AC_HELP_STRING([--with-partitions-conf=file],
+                   [define a partitions config file (default 
partitions.conf)]),
+    [ case "$withval" in
+    no)
+        ;;
+    *)
+        withpartitionsconf=yes
+        PARTITION_CONFIG_FILE=$withval
+        ;;
+    esac ]
+)
+AC_MSG_RESULT(${withpartitionsconf=no})
+AC_DEFINE_UNQUOTED(HAVE_DEFAULT_PARTITION_CONFIG_FILE,
+       ["$CONF_DIR/$PARTITION_CONFIG_FILE"],
+       [Define a QOS policy config file])
+
 dnl Check for a different QOS policy file
 QOS_POLICY_FILE=qos-policy.conf
 AC_MSG_CHECKING(for --with-qos-policy-conf)
diff --git a/opensm/include/opensm/osm_base.h b/opensm/include/opensm/osm_base.h
index c8695a0..aa8d378 100644
--- a/opensm/include/opensm/osm_base.h
+++ b/opensm/include/opensm/osm_base.h
@@ -224,9 +224,13 @@ BEGIN_C_DECLS
 */
 #ifdef __WIN__
 #define OSM_DEFAULT_PARTITION_CONFIG_FILE strcat(GetOsmCachePath(), 
"osm-partitions.conf")
-#else
-#define OSM_DEFAULT_PARTITION_CONFIG_FILE "/etc/ofa/opensm-partitions.conf"
-#endif
+#else /* !__WIN__ */
+#   ifdef HAVE_DEFAULT_PARTITION_CONFIG_FILE
+#      define OSM_DEFAULT_PARTITION_CONFIG_FILE 
HAVE_DEFAULT_PARTITION_CONFIG_FILE
+#   else /* !HAVE_DEFAULT_PARTITION_CONFIG_FILE */
+#      define OSM_DEFAULT_PARTITION_CONFIG_FILE 
"/etc/ofa/opensm-partitions.conf"
+#   endif /* HAVE_DEFAULT_PARTITION_CONFIG_FILE */
+#endif /* __WIN__ */
 /***********/
 
 /****d* OpenSM: Base/OSM_DEFAULT_QOS_POLICY_FILE
-- 
1.5.1

Attachment: 0006-Add-with-partitions-conf-to-configure.patch
Description: Binary data

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to