diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-06-20 14:38:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-06-20 21:30:24 +0200 |
commit | b949efe7ce89e3665704d899ab14094d9d9db53a (patch) | |
tree | 87cb712e96e9c89b6fd9d937f5cf1a620ecef2ee | |
parent | 105edc7453624bf06755911fdd49258a5837ff3c (diff) |
Make check for ant a bit more robust
...by cd'ing to an empty dir first. As reported in the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2018-June/080400.html> "Ant
not working ???", there appear to be Java toolchains that can be disturbed by
filenames with "accented" (non-UTF8?) characters, which people may happen to put
in their checked-out SRCDIR.
Change-Id: I9cf3523f4816c3b0e2d6f67fc490c2514c8e1263
Reviewed-on: https://gerrit.libreoffice.org/56158
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a3bfa9d3e65f..e45a312672fd 100644 --- a/configure.ac +++ b/configure.ac @@ -11699,6 +11699,9 @@ if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE"; then done AC_MSG_CHECKING([if $ANT works]) + mkdir -p conftest.dir + a_cwd=$(pwd) + cd conftest.dir cat > conftest.java << EOF public class conftest { int testmethod(int a, int b) { @@ -11733,7 +11736,8 @@ EOF cat conftest.xml >&5 AC_MSG_ERROR([Ant does not work - Some Java projects will not build!]) fi - rm -f conftest* core core.* *.core + cd "$a_cwd" + rm -fr conftest.dir fi if test -z "$ANT_HOME"; then ANT_HOME="NO_ANT_HOME" |