Skip to content

Commit 8dbc98b

Browse files
Patch libcurl configure.ac to work with later versions of autoconf
Changes: 1. deps/patches now includes a patch to libcurl configure.ac script which fixes badly generated scripts 2. the dependencies included in deps have been updated via ./update_deps.sh 3. the update_deps script will now apply the libcurl patch in the same way we patch cpp-ric. Testing the patch works: 1. Install autoconf at 2.72 via brew 2. Run ./scripts/preinstall.sh
1 parent a287869 commit 8dbc98b

File tree

5 files changed

+149
-1
lines changed

5 files changed

+149
-1
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,8 @@ cython_debug/
148148

149149
# Test files generated
150150
tmp*.py
151+
152+
# dependencies
153+
deps/artifacts/
154+
deps/aws-lambda-cpp-*/
155+
deps/curl-*/

Diff for: deps/aws-lambda-cpp-0.2.6.tar.gz

-2.9 KB
Binary file not shown.

Diff for: deps/curl-7.83.1.tar.gz

1010 KB
Binary file not shown.

Diff for: deps/patches/libcurl-strip-ssl-backends.patch

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index d24daea..64aca7f 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -193,87 +193,96 @@ AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
6+
7+
OPT_SECURETRANSPORT=no
8+
AC_ARG_WITH(secure-transport,dnl
9+
-AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),
10+
+AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[
11+
OPT_SECURETRANSPORT=$withval
12+
test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
13+
-)
14+
+])
15+
16+
OPT_AMISSL=no
17+
AC_ARG_WITH(amissl,dnl
18+
-AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),
19+
+AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
20+
OPT_AMISSL=$withval
21+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL")
22+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
23+
+])
24+
+
25+
26+
OPT_OPENSSL=no
27+
dnl Default to no CA bundle
28+
ca="no"
29+
AC_ARG_WITH(ssl,dnl
30+
AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
31+
-AS_HELP_STRING([--without-ssl], [build without any TLS library]),
32+
+AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
33+
OPT_SSL=$withval
34+
OPT_OPENSSL=$withval
35+
if test X"$withval" != Xno; then
36+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
37+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
38+
fi
39+
+])
40+
41+
AC_ARG_WITH(openssl,dnl
42+
-AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),
43+
+AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),[
44+
OPT_OPENSSL=$withval
45+
if test X"$withval" != Xno; then
46+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
47+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
48+
fi
49+
+])
50+
51+
OPT_GNUTLS=no
52+
AC_ARG_WITH(gnutls,dnl
53+
-AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),
54+
+AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
55+
OPT_GNUTLS=$withval
56+
if test X"$withval" != Xno; then
57+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS")
58+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
59+
fi
60+
+])
61+
62+
OPT_MBEDTLS=no
63+
AC_ARG_WITH(mbedtls,dnl
64+
-AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),
65+
+AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
66+
OPT_MBEDTLS=$withval
67+
if test X"$withval" != Xno; then
68+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS")
69+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
70+
fi
71+
+])
72+
73+
OPT_WOLFSSL=no
74+
AC_ARG_WITH(wolfssl,dnl
75+
-AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),
76+
+AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),[
77+
OPT_WOLFSSL=$withval
78+
if test X"$withval" != Xno; then
79+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL")
80+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
81+
fi
82+
+])
83+
84+
OPT_BEARSSL=no
85+
AC_ARG_WITH(bearssl,dnl
86+
-AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),
87+
+AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[
88+
OPT_BEARSSL=$withval
89+
if test X"$withval" != Xno; then
90+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL")
91+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
92+
fi
93+
+])
94+
95+
OPT_RUSTLS=no
96+
AC_ARG_WITH(rustls,dnl
97+
-AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),
98+
+AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),[
99+
OPT_RUSTLS=$withval
100+
if test X"$withval" != Xno; then
101+
- test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls")
102+
+ test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
103+
fi
104+
+])
105+
106+
OPT_NSS_AWARE=no
107+
AC_ARG_WITH(nss-deprecated,dnl
108+
-AS_HELP_STRING([--with-nss-deprecated],[confirm you realize NSS is going away]),
109+
+AS_HELP_STRING([--with-nss-deprecated],[confirm you realize NSS is going away]),[
110+
if test X"$withval" != Xno; then
111+
OPT_NSS_AWARE=$withval
112+
fi
113+
-)
114+
+])
115+
116+
OPT_NSS=no
117+
AC_ARG_WITH(nss,dnl
118+
-AS_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]),
119+
+AS_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]),[
120+
OPT_NSS=$withval
121+
if test X"$withval" != Xno; then
122+
123+
@@ -283,7 +292,7 @@ AS_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the inst
124+
125+
test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }NSS"
126+
fi
127+
-)
128+
+])
129+
130+
dnl If no TLS choice has been made, check if it was explicitly disabled or
131+
dnl error out to force the user to decide.

Diff for: scripts/update_deps.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ set -e
44

55
cd deps
66
source versions
7+
set +x
78

89
# Clean up old files
910
rm -f aws-lambda-cpp-*.tar.gz && rm -f curl-*.tar.gz
1011

1112
# Grab Curl
12-
wget -c "https://github.com./curl/curl/releases/download/curl-${CURL_MAJOR_VERSION}_${CURL_MINOR_VERSION}_${CURL_PATCH_VERSION}/curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}.tar.gz"
13+
wget -c "https://github.com./curl/curl/releases/download/curl-${CURL_MAJOR_VERSION}_${CURL_MINOR_VERSION}_${CURL_PATCH_VERSION}/curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}.tar.gz" -O - | tar -xz
14+
15+
(
16+
cd curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION} && \
17+
# we strip useless SSL backends (mac os and amiga). Only linux is supported.
18+
# At the time of writing, autoconf was breaking because the autogenerated script was messy. :upsidedown:
19+
# so we instead removing those backends.
20+
patch -p1 < ../patches/libcurl-strip-ssl-backends.patch
21+
)
22+
23+
tar -czvf curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}.tar.gz curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION} --no-same-owner &&
24+
rm -rf curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}
1325

1426
# Grab aws-lambda-cpp
1527
wget -c https://github.com./awslabs/aws-lambda-cpp/archive/v$AWS_LAMBDA_CPP_RELEASE.tar.gz -O - | tar -xz

0 commit comments

Comments
 (0)