@@ -269,9 +269,10 @@ jobs:
269
269
export LDFLAGS="$LDFLAGS -L$(brew --prefix readline)/lib"
270
270
export LIBS="$LIBS -lreadline"
271
271
272
- # Set PostgreSQL environment variables
272
+ # Set PostgreSQL environment variables and PATH
273
273
export PGSQL_CFLAGS="-I$(brew --prefix postgresql@15)/include"
274
274
export PGSQL_LIBS="-L$(brew --prefix postgresql@15)/lib -lpq"
275
+ export PATH="$(brew --prefix postgresql@15)/bin:$PATH"
275
276
276
277
# Set bzip2 environment variables
277
278
export BZIP2_CFLAGS="-I$(brew --prefix bzip2)/include"
@@ -286,6 +287,16 @@ jobs:
286
287
echo "readline.h not found, disabling readline support"
287
288
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv) --disable-readline"
288
289
fi
290
+
291
+ # Check if PostgreSQL is available and working
292
+ if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@15)/include/libpq-fe.h" ]]; then
293
+ echo "PostgreSQL found and working"
294
+ else
295
+ echo "PostgreSQL not found or not working, will disable PostgreSQL support"
296
+ # Remove PostgreSQL extensions from CONFIGURE_EXTENSIONS
297
+ export CONFIGURE_EXTENSIONS=$(echo "$CONFIGURE_EXTENSIONS" | sed 's/--with-pdo-pgsql//g' | sed 's/--with-pgsql//g' | sed 's/ */ /g')
298
+ echo "Updated CONFIGURE_EXTENSIONS: $CONFIGURE_EXTENSIONS"
299
+ fi
289
300
else
290
301
# On Linux, use system-installed libraries
291
302
# System libraries should be available via apt-get installation
@@ -307,6 +318,16 @@ jobs:
307
318
echo " LDFLAGS: $LDFLAGS"
308
319
echo " Checking if readline.h exists:"
309
320
find $(brew --prefix) -name "readline.h" 2>/dev/null || echo " No readline.h found"
321
+
322
+ echo "Debug: Checking PostgreSQL installation on macOS:"
323
+ echo " PGSQL_CFLAGS: $PGSQL_CFLAGS"
324
+ echo " PGSQL_LIBS: $PGSQL_LIBS"
325
+ echo " PATH: $PATH"
326
+ echo " Checking if pg_config is available:"
327
+ which pg_config || echo " pg_config not found in PATH"
328
+ pg_config --version 2>/dev/null || echo " pg_config version check failed"
329
+ echo " Checking if libpq-fe.h exists:"
330
+ find $(brew --prefix) -name "libpq-fe.h" 2>/dev/null || echo " No libpq-fe.h found"
310
331
fi
311
332
312
333
# Check if libcurl is found via pkg-config
0 commit comments