mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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.
This commit is contained in:
parent
d3bbc4b96a
commit
0b59b0e8bc
46
configure
vendored
46
configure
vendored
@ -4948,8 +4948,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "$with_llvm" = yes ; then
|
for ac_prog in gawk mawk nawk awk
|
||||||
for ac_prog in gawk mawk nawk awk
|
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
@ -4991,6 +4990,7 @@ fi
|
|||||||
test -n "$AWK" && break
|
test -n "$AWK" && break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test "$with_llvm" = yes; then :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -9400,48 +9400,6 @@ else
|
|||||||
$as_echo "no, using $LN_S" >&6; }
|
$as_echo "no, using $LN_S" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ac_prog in gawk mawk nawk awk
|
|
||||||
do
|
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
||||||
set dummy $ac_prog; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_AWK+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$AWK"; then
|
|
||||||
ac_cv_prog_AWK="$AWK" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_AWK="$ac_prog"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AWK=$ac_cv_prog_AWK
|
|
||||||
if test -n "$AWK"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
|
|
||||||
$as_echo "$AWK" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
test -n "$AWK" && break
|
|
||||||
done
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
|
||||||
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
|
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
|
||||||
if test -z "$MKDIR_P"; then
|
if test -z "$MKDIR_P"; then
|
||||||
|
@ -391,9 +391,8 @@ AC_SUBST(SUN_STUDIO_CC)
|
|||||||
PGAC_ARG_BOOL(with, llvm, no, [build with LLVM based JIT support],
|
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_DEFINE([USE_LLVM], 1, [Define to 1 to build with LLVM based JIT support. (--with-llvm)])])
|
||||||
AC_SUBST(with_llvm)
|
AC_SUBST(with_llvm)
|
||||||
if test "$with_llvm" = yes ; then
|
dnl must use AS_IF here, else AC_REQUIRES inside PGAC_LLVM_SUPPORT malfunctions
|
||||||
PGAC_LLVM_SUPPORT()
|
AS_IF([test "$with_llvm" = yes], [PGAC_LLVM_SUPPORT()])
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
unset CFLAGS
|
unset CFLAGS
|
||||||
@ -1020,7 +1019,6 @@ AC_SUBST(install_bin)
|
|||||||
|
|
||||||
PGAC_PATH_PROGS(TAR, tar)
|
PGAC_PATH_PROGS(TAR, tar)
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_AWK
|
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
# When Autoconf chooses install-sh as mkdir -p program it tries to generate
|
# 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
|
# a relative path to it in each makefile where it substitutes it. This clashes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user