From 3fe500aebb31a71f4e9b75bbc63d09def99c3c8b Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 17 Aug 2021 20:07:33 -0500 Subject: [PATCH 1/4] Check more accurately if gradle exists Previously, the configure script would only successfully determine that gradle exists if the user specified an absolute path to the executable. It would fail if the user specified only an executable name or if the default value of "gradle" were used. Now it should succeed in either situation. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 31cd1281..0c1460ef 100644 --- a/configure.ac +++ b/configure.ac @@ -81,7 +81,7 @@ dnl gradle checks. dnl ================================================================ AC_MSG_CHECKING([for gradle]) -if test -e ${GRADLE} ; then +if command -v "$GRADLE" >/dev/null; then AC_MSG_RESULT([${GRADLE}]) AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 1]) else From c8902dff5c37b4070cadf21825eebce2379245ce Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 17 Aug 2021 20:08:33 -0500 Subject: [PATCH 2/4] Remove unnecessary curly braces around var name --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0c1460ef..fb40c6ed 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,7 @@ dnl ================================================================ AC_MSG_CHECKING([for gradle]) if command -v "$GRADLE" >/dev/null; then - AC_MSG_RESULT([${GRADLE}]) + AC_MSG_RESULT([$GRADLE]) AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 1]) else AC_MSG_RESULT([no]) From f02ef622e49ea564b4db513c8d5f06d5220470b8 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 17 Aug 2021 20:10:47 -0500 Subject: [PATCH 3/4] Show in configure summary when gradle is not found Previously, if configure determined that gradle could not be found, the summary at the end of the configure output would nevertheless print the name or path of the nonexistent gradle executable that it tried to find. Now it clears that variable. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index fb40c6ed..1267f6f8 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,7 @@ if command -v "$GRADLE" >/dev/null; then AC_MSG_RESULT([$GRADLE]) AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 1]) else + GRADLE= AC_MSG_RESULT([no]) AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 0]) fi From 51ed8cadb50cbde2a98a40ac0587929950e0aa4c Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 17 Aug 2021 20:16:46 -0500 Subject: [PATCH 4/4] Set HAVE_GRADLE in a more autoconfy way It is perhaps more autoconfy to have AM_CONDITIONAL evaluate a variable rather than call it with what are essentially constants representing either true or false. It might be even more autoconfy to use AC_CHECK_PROG here instead; I don't know if there's a good reason why that wasn't already done here. --- configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1267f6f8..c881ed6a 100644 --- a/configure.ac +++ b/configure.ac @@ -83,12 +83,11 @@ dnl ================================================================ AC_MSG_CHECKING([for gradle]) if command -v "$GRADLE" >/dev/null; then AC_MSG_RESULT([$GRADLE]) - AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 1]) else GRADLE= AC_MSG_RESULT([no]) - AM_CONDITIONAL(HAVE_GRADLE, [test 1 = 0]) fi +AM_CONDITIONAL(HAVE_GRADLE, [test x"$GRADLE" != x]) AC_SUBST(GRADLE)