[ofa-general] [PATCH] ibuitls: use osm_config.h file instead of osm_build_id.h

Sasha Khapyorsky sashak at voltaire.com
Sat Feb 14 23:47:01 PST 2009


Use standard osm_config.h file for OpenSM build mode detection rather
than not valid osm_build_id.h junk which will be removed very soon from
OpenSM tree.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 config/osm.m4          |    7 ++++---
 ibis/config/osm.m4     |    7 ++++---
 ibmgtsim/config/osm.m4 |    7 ++++---
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/config/osm.m4 b/config/osm.m4
index f8d92d7..cc50fdf 100644
--- a/config/osm.m4
+++ b/config/osm.m4
@@ -166,11 +166,12 @@ if test "x$libcheck" = "xtrue"; then
 
 
    dnl validate the defined path - so the build id header is there
-   AC_CHECK_FILE($osm_include_dir/opensm/osm_build_id.h,,
-      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_build_id.h]))
+   AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
+      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
 
    dnl now figure out somehow if the build was for debug or not
-   if test `grep debug $osm_include_dir/opensm/osm_build_id.h | wc -l` = 1; then
+   grep '#define OSM_DEBUG 1' $osm_include_dir/opensm/osm_config.h > /dev/null
+   if test $? -eq 0 ; then
       dnl why did they need so many ???
       osm_debug_flags='-DDEBUG -D_DEBUG -D_DEBUG_ -DDBG'
       AC_MSG_NOTICE(OSM: compiled in DEBUG mode)
diff --git a/ibis/config/osm.m4 b/ibis/config/osm.m4
index f8d92d7..cc50fdf 100644
--- a/ibis/config/osm.m4
+++ b/ibis/config/osm.m4
@@ -166,11 +166,12 @@ if test "x$libcheck" = "xtrue"; then
 
 
    dnl validate the defined path - so the build id header is there
-   AC_CHECK_FILE($osm_include_dir/opensm/osm_build_id.h,,
-      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_build_id.h]))
+   AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
+      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
 
    dnl now figure out somehow if the build was for debug or not
-   if test `grep debug $osm_include_dir/opensm/osm_build_id.h | wc -l` = 1; then
+   grep '#define OSM_DEBUG 1' $osm_include_dir/opensm/osm_config.h > /dev/null
+   if test $? -eq 0 ; then
       dnl why did they need so many ???
       osm_debug_flags='-DDEBUG -D_DEBUG -D_DEBUG_ -DDBG'
       AC_MSG_NOTICE(OSM: compiled in DEBUG mode)
diff --git a/ibmgtsim/config/osm.m4 b/ibmgtsim/config/osm.m4
index f8d92d7..cc50fdf 100644
--- a/ibmgtsim/config/osm.m4
+++ b/ibmgtsim/config/osm.m4
@@ -166,11 +166,12 @@ if test "x$libcheck" = "xtrue"; then
 
 
    dnl validate the defined path - so the build id header is there
-   AC_CHECK_FILE($osm_include_dir/opensm/osm_build_id.h,,
-      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_build_id.h]))
+   AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
+      AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
 
    dnl now figure out somehow if the build was for debug or not
-   if test `grep debug $osm_include_dir/opensm/osm_build_id.h | wc -l` = 1; then
+   grep '#define OSM_DEBUG 1' $osm_include_dir/opensm/osm_config.h > /dev/null
+   if test $? -eq 0 ; then
       dnl why did they need so many ???
       osm_debug_flags='-DDEBUG -D_DEBUG -D_DEBUG_ -DDBG'
       AC_MSG_NOTICE(OSM: compiled in DEBUG mode)
-- 
1.6.1.2.319.gbd9e




More information about the general mailing list