]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
configure.ac: Avoid noise when faketime is not available
authorSam James <sam@gentoo.org>
Mon, 7 Aug 2023 07:23:50 +0000 (08:23 +0100)
committerSam James <sam@gentoo.org>
Mon, 7 Aug 2023 07:23:50 +0000 (08:23 +0100)
We already checked for whether faketime is installed, so don't try to call it
if we couldn't find a path to it.

This avoids noise like:
```
checking for faketime... no
checking for datefudge... no
checking whether faketime program works... 1691391464
/var/tmp/portage/net-libs/gnutls-3.8.1/work/gnutls-3.8.1/configure: line 11540: 2006-09-23 00:00:00: command not found
/var/tmp/portage/net-libs/gnutls-3.8.1/work/gnutls-3.8.1/configure: line 11540: test: =: unary operator expected
no
```

Bug: https://bugs.gentoo.org/911833
Signed-off-by: Sam James <sam@gentoo.org>
configure.ac

index 8a841ec06ebeec6fcd84b991039ec8ece7f23cde..8961c0eebaae77f85e9f828cd31ee19076f0b25b 100644 (file)
@@ -90,7 +90,7 @@ AC_RUN_IFELSE(
       puts(outstr);
       return 0;
     ]])],
-  [AS_IF([test `TZ=UTC $FAKETIME $FAKETIME_F_OPT "2006-09-23 00:00:00" ./conftest$EXEEXT` = "1158969600"], [
+  [AS_IF([test -n "$FAKETIME" && test `TZ=UTC $FAKETIME $FAKETIME_F_OPT "2006-09-23 00:00:00" ./conftest$EXEEXT` = "1158969600"], [
      ac_cv_faketime_works=yes
    ], [
      ac_cv_faketime_works=no