diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-07-27 13:22:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 13:22:49 -0700 |
commit | 3c8ede75a164a884c115a648ef15fa66823f339e (patch) | |
tree | 80f3cf8baa935a5b24c573c2f8481900d9b3ccb1 /configure.ac | |
parent | 1832d76aaacd9b19e4b6bdb0549579a6eda5b1a4 (diff) |
Fix issues related to cxxtest in configure.ac (#2226)
Fixes #2188. There were two issues related to cxxtest in configure.ac:
- `AC_PATH_PROGS` was used wrong (the third argument is a value to
assign to the first argument and cannot be used for arbitrary
commands)
- The `test` command always executes both sides of an "and" (`-a`), so
`basename` was called without arguments when `CXXTESTGEN` was empty
This commit fixes both issues.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 1480879c8..f802fa1c0 100644 --- a/configure.ac +++ b/configure.ac @@ -1078,26 +1078,26 @@ else # cxxtest under <cxxtest-root>/bin/cxxtest AC_PATH_PROGS(CXXTESTGEN, cxxtestgen.pl cxxtestgen.py cxxtestgen, - [ - AC_MSG_NOTICE([unit tests disabled, \ - could not find cxxtestgen.pl or \ - cxxtestgen.py or cxxtestgen]) - CXXTEST= - ], + [], [$CXXTEST:$CXXTEST/bin:$PATH]) - if test -n "$CXXTESTGEN" -a "`basename $CXXTESTGEN`" = "cxxtestgen.pl"; then - if test -z "$PERL"; then - AC_CHECK_PROGS(PERL, perl, perl, []) - else - AC_CHECK_PROG(PERL, "$PERL", "$PERL", []) - fi + if test -n "$CXXTESTGEN"; then + if "`basename $CXXTESTGEN`" = "cxxtestgen.pl"; then + if test -z "$PERL"; then + AC_CHECK_PROGS(PERL, perl, perl, []) + else + AC_CHECK_PROG(PERL, "$PERL", "$PERL", []) + fi - if test -z "$PERL"; then - AC_MSG_WARN([unit tests disabled, perl not found.]) - CXXTESTGEN= - CXXTEST= + if test -z "$PERL"; then + AC_MSG_WARN([unit tests disabled, perl not found.]) + CXXTESTGEN= + CXXTEST= + fi fi + else + AC_MSG_NOTICE([unit tests disabled, could not find cxxtestgen.pl or cxxtestgen.py or cxxtestgen]) + CXXTEST= fi # check if CxxTest headers exist and set include paths accordingly |