diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-07 16:07:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-07 16:09:26 +0100 |
commit | a6d6d1c24ba497ac8586857baed9d4fb155a17b1 (patch) | |
tree | bfd4b26854fb40ae3e9d0f01971f61359c507111 /configure.ac | |
parent | 45237f80237f202b278f0561e6b93db2a2306b6a (diff) |
CLANGPLUGIN_CPPFLAGS did not actually work
...it just appeared to work on machines that happen to have /usr/bin/clang. So
hoist CLANGDIR/CLANGBUILD from compilerplugins/Makefile-clang.mk to configure.ac
instead.
Change-Id: Ie5d9c6bb8e9d0caa1583d78c8693f06b69873095
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 8186eb626f76..d0178d4c797c 100644 --- a/configure.ac +++ b/configure.ac @@ -5296,9 +5296,19 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then compiler_plugins=no fi if test "$compiler_plugins" != "no"; then + dnl The prefix where Clang resides, override to where Clang resides if + dnl using a source build: + if test -z "$CLANGDIR"; then + CLANGDIR=/usr + fi + dnl The build directory (different from CLANGDIR if using a Clang out- + dnl of-source build): + if test -z "$CLANGBUILD"; then + CLANGBUILD=/usr + fi AC_LANG_PUSH([C++]) save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $CLANGPLUGIN_CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" + CPPFLAGS="$CPPFLAGS -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -I$CLANGBUILD/include -I$CLANGBUILD/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h, [COMPILER_PLUGINS=TRUE], [ @@ -5318,7 +5328,8 @@ else fi fi AC_SUBST(COMPILER_PLUGINS) -AC_SUBST(CLANGPLUGIN_CPPFLAGS) +AC_SUBST(CLANGDIR) +AC_SUBST(CLANGBUILD) dnl =================================================================== dnl Set the MinGW sys-root |