@@ -263,7 +263,7 @@ jobs:
263
263
# On macOS, point to Homebrew iconv installation
264
264
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv)"
265
265
else
266
- # On Linux, use launchpad-installed iconv
266
+ # On Linux, use launchpad-installed iconv and readline
267
267
# Find the launchpad iconv installation
268
268
LAUNCHPAD_ICONV_DIR="$HOME/.local/share/launchpad/global/gnu.org/libiconv"
269
269
if [[ -d "$LAUNCHPAD_ICONV_DIR" ]]; then
@@ -281,6 +281,22 @@ jobs:
281
281
echo "Launchpad iconv not found, using system iconv"
282
282
EXTRA_CONFIG="--with-iconv"
283
283
fi
284
+
285
+ # Find the launchpad readline installation
286
+ LAUNCHPAD_READLINE_DIR="$HOME/.local/share/launchpad/global/gnu.org/readline"
287
+ if [[ -d "$LAUNCHPAD_READLINE_DIR" ]]; then
288
+ # Find the latest version
289
+ READLINE_VERSION=$(ls "$LAUNCHPAD_READLINE_DIR" | grep "^v" | sort -V | tail -1)
290
+ if [[ -n "$READLINE_VERSION" ]]; then
291
+ READLINE_PATH="$LAUNCHPAD_READLINE_DIR/$READLINE_VERSION"
292
+ echo "Found launchpad readline at: $READLINE_PATH"
293
+ EXTRA_CONFIG="$EXTRA_CONFIG --with-readline=$READLINE_PATH"
294
+ else
295
+ echo "No readline version found in $LAUNCHPAD_READLINE_DIR"
296
+ fi
297
+ else
298
+ echo "Launchpad readline not found, using system readline"
299
+ fi
284
300
fi
285
301
286
302
echo "Configuring PHP with:"
@@ -317,16 +333,36 @@ jobs:
317
333
pkg-config --exists libxml-2.0 && echo "✓ libxml-2.0 found" || echo "✗ libxml-2.0 not found"
318
334
pkg-config --exists sqlite3 && echo "✓ sqlite3 found" || echo "✗ sqlite3 not found"
319
335
320
- # Ensure launchpad iconv is properly linked and available
336
+ # Ensure launchpad iconv and readline are properly linked and available
321
337
if [[ "${{ matrix.platform }}" != "darwin" ]]; then
322
- echo "Ensuring launchpad iconv is properly configured..."
338
+ echo "Ensuring launchpad iconv and readline are properly configured..."
323
339
# Check if launchpad iconv is available and working
324
340
if command -v iconv >/dev/null 2>&1; then
325
341
echo "✓ iconv found in PATH"
326
342
iconv --version 2>/dev/null | head -1 || echo "iconv version check failed"
327
343
else
328
344
echo "⚠️ iconv not found in PATH"
329
345
fi
346
+
347
+ # Check if readline headers are available
348
+ if [[ -f "/usr/include/readline/readline.h" ]] || [[ -f "/usr/local/include/readline/readline.h" ]]; then
349
+ echo "✓ readline.h found in system include paths"
350
+ else
351
+ echo "⚠️ readline.h not found in system include paths"
352
+ # Check if we can find it in launchpad paths
353
+ LAUNCHPAD_READLINE_DIR="$HOME/.local/share/launchpad/global/gnu.org/readline"
354
+ if [[ -d "$LAUNCHPAD_READLINE_DIR" ]]; then
355
+ READLINE_VERSION=$(ls "$LAUNCHPAD_READLINE_DIR" | grep "^v" | sort -V | tail -1)
356
+ if [[ -n "$READLINE_VERSION" ]]; then
357
+ READLINE_INCLUDE="$LAUNCHPAD_READLINE_DIR/$READLINE_VERSION/include"
358
+ if [[ -f "$READLINE_INCLUDE/readline/readline.h" ]]; then
359
+ echo "✓ readline.h found in launchpad: $READLINE_INCLUDE/readline/readline.h"
360
+ else
361
+ echo "⚠️ readline.h not found in launchpad include path"
362
+ fi
363
+ fi
364
+ fi
365
+ fi
330
366
fi
331
367
332
368
./configure \
0 commit comments