summaryrefslogtreecommitdiffstats
path: root/0001-fix-lib-name-for-PHP-8.patch
blob: 45c647993ba664abece06de45660f0e76f8f1f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 9d99f33602237f7ee189efc7056ba4c6205699b3 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 17 Apr 2020 09:14:43 +0200
Subject: [PATCH 1/2] fix lib name for PHP 8

---
 auto/modules/php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/auto/modules/php b/auto/modules/php
index e2e5498..dd31a52 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -100,7 +100,11 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
                          `${NXT_PHP_CONFIG} --libs`"
 
     else
-        NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
+        if [ ${NXT_PHP_MAJOR_VERSION} -ge 8 ]; then
+            NXT_PHP_LIB="-lphp"
+        else
+            NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
+        fi
 
         if [ "$NXT_PHP_LIB_PATH" != "" ]; then
             # "php-config --ldflags" does not contain path to libphp, but
-- 
2.25.2