Skip to content

Commit e6df12e

Browse files
committed
Revert "curl patch"
This reverts commit 6eeb7b5.
1 parent 6eeb7b5 commit e6df12e

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

ext/curl/config.m4

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,31 @@ if test "$PHP_CURL" != "no"; then
1010
CURL_DIR=$PHP_CURL
1111
else
1212
AC_MSG_CHECKING(for cURL in default path)
13-
for i in /usr/local /usr /system; do
14-
if test -r $i/develop/headers/curl/easy.h; then
13+
for i in /usr/local /usr; do
14+
if test -r $i/include/curl/easy.h; then
1515
CURL_DIR=$i
1616
AC_MSG_RESULT(found in $i)
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 -
25-
easy.h should be in <curl-dir>/develop/headers/curl/)
36+
AC_MSG_ERROR(Could not find cURL, please reinstall the libcurl distribution -
37+
easy.h should be in <curl-dir>/include/curl/)
2638
fi
2739

2840
CURL_CONFIG="curl-config"
@@ -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

@@ -57,10 +73,13 @@ if test "$PHP_CURL" != "no"; then
5773

5874
save_CFLAGS="$CFLAGS"
5975
CFLAGS="`$CURL_CONFIG --cflags`"
76+
save_LDFLAGS="$LDFLAGS"
77+
LDFLAGS="`$CURL_CONFIG --libs`"
6078

6179
AC_PROG_CPP
6280
AC_MSG_CHECKING([for openssl support in libcurl])
6381
AC_TRY_RUN([
82+
#include <strings.h>
6483
#include <curl/curl.h>
6584
6685
int main(int argc, char *argv[])
@@ -88,6 +107,7 @@ int main(int argc, char *argv[])
88107

89108
AC_MSG_CHECKING([for gnutls support in libcurl])
90109
AC_TRY_RUN([
110+
#include <strings.h>
91111
#include <curl/curl.h>
92112
93113
int main(int argc, char *argv[])
@@ -114,6 +134,7 @@ int main(int argc, char *argv[])
114134
])
115135

116136
CFLAGS="$save_CFLAGS"
137+
LDFLAGS="$save_LDFLAGS"
117138
else
118139
AC_MSG_RESULT([no])
119140
fi

0 commit comments

Comments
 (0)