diff options
author | Tom Lane | 2018-11-18 04:16:00 +0000 |
---|---|---|
committer | Tom Lane | 2018-11-18 04:16:09 +0000 |
commit | 0b59b0e8bcc9e85bad6fffa7828344db1a36f20a (patch) | |
tree | fdcd8e2d119d4ccc4e4c6b29bb7c8ae4b1a6e8c8 /configure.in | |
parent | d3bbc4b96a5b4d055cf636596c6865913a099929 (diff) |
Fix AC_REQUIRES breakage in LLVM autoconf tests.
Any Autoconf macro that uses AC_REQUIRES -- directly or indirectly --
must not be inside a plain shell "if" test; if it is, whatever code
gets pulled in by the AC_REQUIRES will also be inside that "if".
Instead of "if" we can use AS_IF, which knows how to get this right
(cf commit 01051a987).
The only immediate problem from getting this wrong was that AC_PROG_AWK
had to be run twice, once inside the "if llvm" block and once in the
main line. However, it broke a different patch I'm about to submit
more thoroughly.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 30e19097e42..feaf2aa682c 100644 --- a/configure.in +++ b/configure.in @@ -391,9 +391,8 @@ AC_SUBST(SUN_STUDIO_CC) PGAC_ARG_BOOL(with, llvm, no, [build with LLVM based JIT support], [AC_DEFINE([USE_LLVM], 1, [Define to 1 to build with LLVM based JIT support. (--with-llvm)])]) AC_SUBST(with_llvm) -if test "$with_llvm" = yes ; then - PGAC_LLVM_SUPPORT() -fi +dnl must use AS_IF here, else AC_REQUIRES inside PGAC_LLVM_SUPPORT malfunctions +AS_IF([test "$with_llvm" = yes], [PGAC_LLVM_SUPPORT()]) unset CFLAGS @@ -1020,7 +1019,6 @@ AC_SUBST(install_bin) PGAC_PATH_PROGS(TAR, tar) AC_PROG_LN_S -AC_PROG_AWK AC_PROG_MKDIR_P # When Autoconf chooses install-sh as mkdir -p program it tries to generate # a relative path to it in each makefile where it substitutes it. This clashes |