b4n commented on this pull request.


> @@ -0,0 +1,10 @@
+dnl Checks for everything required for criterion unit tests
+AC_DEFUN([GEANY_CHECK_CRITERION],
+[
+       AC_REQUIRE_AUX_FILE([tap-driver.sh])
+       AC_PROG_AWK
+
+       PKG_CHECK_MODULES([CRITERION], [criterion >= 2.3.1],
+                       [AM_CONDITIONAL([WITH_CRITERION], true)],
+                       [AM_CONDITIONAL([WITH_CRITERION], false)])

https://www.gnu.org/software/automake/manual/automake.html#Usage-of-Conditionals
>The shell *condition* (suitable for use in a shell `if` statement) is 
>evaluated when `configure` is run. Note that you must arrange for every 
>`AM_CONDITIONAL` to be invoked every time configure is run. **If 
>`AM_CONDITIONAL` is run conditionally (e.g., in a shell `if` statement), then 
>the result will confuse `automake`.**

I'm not sure it's the issue, and I get that it's supposed to be run anyway (and 
we have similar double conditionals), yet *this might be cached*, in which case 
I'm not completely sure of what runs and what doesn't.
I'd try the obvious way to move the condition outside and do something like
```m4
        PKG_CHECK_MODULES([CRITERION], [criterion >= 2.3.1],
                          [with_criterion=yes], [with_criterion=no])
        AM_CONDITIONAL([WITH_CRITERION], [test "x$with_criterion" = xyes])
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1427#pullrequestreview-27724702

Reply via email to