Skip to content

Commit a5c8070

Browse files
committed
Merge branch 'PHP-7.2'
* PHP-7.2: Fixed finding CURL on systems with multiarch support
2 parents 2b5886a + 4ddb063 commit a5c8070

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ PHP NEWS
77
'php ext_skel.php' for all options. This means there is no dependencies
88
thrus making it work on Windows out of the box. (Kalle)
99

10+
- cURL:
11+
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
12+
(cebe)
13+
1014
- LDAP:
1115
. Added ldap_exop_refresh helper for EXOP REFRESH operation with dds overlay.
1216
(Come)

ext/curl/config.m4

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,23 @@ if test "$PHP_CURL" != "no"; then
1717
break
1818
fi
1919
done
20+
if test -z "$CURL_DIR"; then
21+
AC_MSG_RESULT(not found)
22+
if which dpkg-architecture>/dev/null; then
23+
AC_MSG_CHECKING(for cURL in multiarch path)
24+
CURL_MULTIARCH_INCLUDE=/usr/include/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
25+
if test -r $CURL_MULTIARCH_INCLUDE/curl/easy.h; then
26+
CURL_DIR=/usr
27+
AC_MSG_RESULT(found in $CURL_MULTIARCH_INCLUDE)
28+
else
29+
AC_MSG_RESULT(not found)
30+
fi
31+
fi
32+
fi
2033
fi
2134

2235
if test -z "$CURL_DIR"; then
23-
AC_MSG_RESULT(not found)
24-
AC_MSG_ERROR(Please reinstall the libcurl distribution -
36+
AC_MSG_ERROR(Could not find cURL, please reinstall the libcurl distribution -
2537
easy.h should be in <curl-dir>/include/curl/)
2638
fi
2739

@@ -45,7 +57,11 @@ if test "$PHP_CURL" != "no"; then
4557
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
4658
fi
4759

48-
PHP_ADD_INCLUDE($CURL_DIR/include)
60+
if test -z "$CURL_MULTIARCH_INCLUDE"; then
61+
PHP_ADD_INCLUDE($CURL_DIR/include)
62+
else
63+
PHP_ADD_INCLUDE($CURL_MULTIARCH_INCLUDE)
64+
fi
4965
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
5066
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
5167

0 commit comments

Comments
 (0)