summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-06 21:51:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-07 08:15:36 +0100
commit08bb758b150d6d52258b2a4f783e37298bb42373 (patch)
tree32992eea4b15974423f8868065468cfc020f391f /configure.ac
parentb60705c95bda49b656188d6a75557f32cf8a5f14 (diff)
Adapt to llvm-config --src-root dropped from LLVM 16 trunk
...with <https://github.com/llvm/llvm-project/commit/c061892fcdbdfe46884c54a7a7bfe6df54d1df12> "[llvm-config] Remove --src-root option", causing > checking for llvm-config... .../llvm-config > usage: llvm-config <OPTION>... [<COMPONENT>...] [...] > dirname: missing operand > Try 'dirname --help' for more information. noise during configure Change-Id: I0051dd523a3f4cebfdd8b14d8f2e83ba9e5e959b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142362 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e079b251b108..b4b9a7a24eb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8403,9 +8403,11 @@ if test "$COM_IS_CLANG" = "TRUE"; then
fi
# Try if clang is built from source (in which case its includes are not together with llvm includes).
# src-root is [llvm-toplevel-src-dir]/llvm, clang is [llvm-toplevel-src-dir]/clang
- clangsrcdir=$(dirname $($LLVM_CONFIG --src-root))
- if test -n "$clangsrcdir" -a -d "$clangsrcdir" -a -d "$clangsrcdir/clang/include"; then
- COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangsrcdir/clang/include"
+ if $LLVM_CONFIG --src-root >/dev/null 2>&1; then
+ clangsrcdir=$(dirname $($LLVM_CONFIG --src-root))
+ if test -n "$clangsrcdir" -a -d "$clangsrcdir" -a -d "$clangsrcdir/clang/include"; then
+ COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangsrcdir/clang/include"
+ fi
fi
# obj-root is [llvm-toplevel-obj-dir]/, clang is [llvm-toplevel-obj-dir]/tools/clang
clangobjdir=$($LLVM_CONFIG --obj-root)