@@ -8,25 +8,27 @@ SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
88INSTALL_DIR=" $SCRIPT_DIR /../../pginst"
99PSP_DIR=" $SCRIPT_DIR /../../postgres"
1010
11+ PG_VERSION=$( pg_config --version | sed -n ' s/PostgreSQL \([0-9]*\).*/\1/p' )
12+
1113INSTALL_INJECTION_POINTS=0
1214
1315case " $1 " in
1416 debug)
1517 echo " Building with debug option"
16- ARGS+=" --enable-cassert --enable-injection-points "
18+ ARGS+=" --enable-cassert"
1719 INSTALL_INJECTION_POINTS=1
1820 ;;
1921
2022 debugoptimized)
2123 echo " Building with debugoptimized option"
2224 export CFLAGS=" -O2"
23- ARGS+=" --enable-cassert --enable-injection-points "
25+ ARGS+=" --enable-cassert"
2426 INSTALL_INJECTION_POINTS=1
2527 ;;
2628
2729 coverage)
2830 echo " Building with coverage option"
29- ARGS+=" --enable-injection-points --enable- coverage"
31+ ARGS+=" --enable-coverage"
3032 INSTALL_INJECTION_POINTS=1
3133 ;;
3234
@@ -42,8 +44,16 @@ case "$1" in
4244 ;;
4345esac
4446
47+ if [ " $INSTALL_INJECTION_POINTS " = 1 ]; then
48+ if [ " $PG_VERSION " -ge 17 ]; then
49+ ARGS+=" --enable-injection-points"
50+ fi
51+ fi
52+
4553if [[ " $OSTYPE " == " linux-gnu" * ]]; then
46- ARGS+=" --with-liburing"
54+ if [ " $PG_VERSION " -ge 17 ]; then
55+ ARGS+=" --with-liburing"
56+ fi
4757 NCPU=$( nproc)
4858elif [[ " $OSTYPE " == " darwin" * ]]; then
4959 NCPU=$( sysctl -n hw.ncpu)
0 commit comments