From fe97d3ef5a77c9c8d373b0780f1c9a0e0a7277e1 Mon Sep 17 00:00:00 2001 From: Joshua Hursey Date: Tue, 12 Sep 2017 17:35:08 -0400 Subject: [PATCH] config/withdir: Make case for --without-X more clear * Will display a message acknowledging the configure setting instead of 'simple ok' which is misleading. Signed-off-by: Joshua Hursey --- config/opal_check_withdir.m4 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/config/opal_check_withdir.m4 b/config/opal_check_withdir.m4 index 7c0ffa84ff..8ef026eb19 100644 --- a/config/opal_check_withdir.m4 +++ b/config/opal_check_withdir.m4 @@ -8,6 +8,7 @@ dnl reserved. dnl Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. +dnl Copyright (c) 2017 IBM Corporation. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -19,17 +20,21 @@ dnl # ---------------------------------------------------- AC_DEFUN([OPAL_CHECK_WITHDIR],[ AC_MSG_CHECKING([--with-$1 value]) - AS_IF([test "$2" = "yes" || test "$2" = "no" || test "x$2" = "x"], - [AC_MSG_RESULT([simple ok (unspecified)])], - [AS_IF([test ! -d "$2"], - [AC_MSG_RESULT([not found]) - AC_MSG_WARN([Directory $2 not found]) - AC_MSG_ERROR([Cannot continue])], - [AS_IF([test "x`ls $2/$3 2> /dev/null`" = "x"], + AS_IF([test "$2" = "no" ], + [AC_MSG_RESULT([simple no (specified --without-$1)])], + [AS_IF([test "$2" = "yes" || test "x$2" = "x"], + [AC_MSG_RESULT([simple ok (unspecified value)])], + [AS_IF([test ! -d "$2"], [AC_MSG_RESULT([not found]) - AC_MSG_WARN([Expected file $2/$3 not found]) + AC_MSG_WARN([Directory $2 not found]) AC_MSG_ERROR([Cannot continue])], - [AC_MSG_RESULT([sanity check ok ($2)])] + [AS_IF([test "x`ls $2/$3 2> /dev/null`" = "x"], + [AC_MSG_RESULT([not found]) + AC_MSG_WARN([Expected file $2/$3 not found]) + AC_MSG_ERROR([Cannot continue])], + [AC_MSG_RESULT([sanity check ok ($2)])] + ) + ] ) ] )