Skip to content

Commit 64a3932

Browse files
authored
Fixed finding CURL on systems with multiarch support
fixes https://bugs.php.net/bug.php?id=74125
1 parent 674b11d commit 64a3932

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ext/curl/config.m4

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ if test "$PHP_CURL" != "no"; then
1717
break
1818
fi
1919
done
20+
if which dpkg-architecture; then
21+
AC_MSG_CHECKING(for cURL in multiarch path)
22+
CURL_MULTIARCH_INCLUDE=/usr/include/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
23+
if test -r $CURL_MULTIARCH_INCLUDE/curl/easy.h; then
24+
CURL_DIR=/usr
25+
AC_MSG_RESULT(found in $CURL_MULTIARCH_INCLUDE)
26+
fi
27+
fi
2028
fi
2129

2230
if test -z "$CURL_DIR"; then
@@ -45,7 +53,11 @@ if test "$PHP_CURL" != "no"; then
4553
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
4654
fi
4755

48-
PHP_ADD_INCLUDE($CURL_DIR/include)
56+
if test -z "$CURL_MULTIARCH_INCLUDE"; then
57+
PHP_ADD_INCLUDE($CURL_DIR/include)
58+
else
59+
PHP_ADD_INCLUDE($CURL_MULTIARCH_INCLUDE)
60+
fi
4961
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
5062
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
5163

0 commit comments

Comments
 (0)