[Ocfs2-tools-devel] [PATCH 1/3] configure.in: Fix a bug detecting corosync and openais libs.

Joel Becker Joel.Becker at oracle.com
Mon Jun 7 14:48:09 PDT 2010


If they're not in the right place, we can loop forever on a bad shell
substitution.

Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
 configure.in |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.in b/configure.in
index 458b55a..890923c 100644
--- a/configure.in
+++ b/configure.in
@@ -268,7 +268,12 @@ if test "x$cpg_found" = "xyes"; then
     AC_MSG_CHECKING([for cpg_initialize in -lcpg])
     while test "x$TRY_PATH" != "x"; do
         TRY="`echo $TRY_PATH | cut -f1 -d:`"
-        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
+        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
+        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
+            TRY_PATH="$NEW_TRY_PATH"
+        else
+            TRY_PATH=""
+        fi
 
         if test "x$TRY" != "x"; then
             TRY="-L${TRY}/${cpg_package}"
@@ -307,7 +312,12 @@ if test "x$ckpt_found" = "xyes"; then
     AC_MSG_CHECKING([for saCkptInitialize in -lSaCkpt])
     while test "x$TRY_PATH" != "x"; do
         TRY="`echo $TRY_PATH | cut -f1 -d:`"
-        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
+        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
+        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
+            TRY_PATH="$NEW_TRY_PATH"
+        else
+            TRY_PATH=""
+        fi
 
         if test "x$TRY" != "x"; then
             TRY="-L${TRY}/openais"
-- 
1.7.1


-- 

"There are only two ways to live your life. One is as though nothing
 is a miracle. The other is as though everything is a miracle."
        - Albert Einstein

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list