1
1

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 <jhursey@us.ibm.com>
This commit is contained in:
Joshua Hursey 2017-09-12 17:35:08 -04:00
parent 39a83a25c1
commit fe97d3ef5a

View File

@ -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)])]
)
]
)
]
)