mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
docs: fix/tidy code fences
- INSTALL.md: fence code to avoid wrong rendering. Reported-by: rinsuki on github Fixes: https://github.com/curl/curl-www/issues/480 - use `sh` instead of `bash` as fence language, for less visual noise. - INSTALL.md: drop stray shebang. - ECH.md: drop indent from fenced code. - minor tidy-ups. Ref: https://curl.se/docs/install.html Closes #18707
This commit is contained in:
parent
470611d76c
commit
acd0aa2c9d
2 changed files with 191 additions and 178 deletions
135
docs/INSTALL.md
135
docs/INSTALL.md
|
|
@ -275,28 +275,32 @@ If any error occurs during curl installation, try:
|
|||
|
||||
You can use either autotools or cmake:
|
||||
|
||||
./configure \
|
||||
CC=/path/to/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
AR=/path/to/djgpp/bin/i586-pc-msdosdjgpp-ar \
|
||||
RANLIB=/path/to/djgpp/bin/i586-pc-msdosdjgpp-ranlib \
|
||||
WATT_ROOT=/path/to/djgpp/net/watt \
|
||||
--host=i586-pc-msdosdjgpp \
|
||||
--with-openssl=/path/to/djgpp \
|
||||
--with-zlib=/path/to/djgpp \
|
||||
--without-libpsl \
|
||||
--disable-shared
|
||||
```sh
|
||||
./configure \
|
||||
CC=/path/to/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
AR=/path/to/djgpp/bin/i586-pc-msdosdjgpp-ar \
|
||||
RANLIB=/path/to/djgpp/bin/i586-pc-msdosdjgpp-ranlib \
|
||||
WATT_ROOT=/path/to/djgpp/net/watt \
|
||||
--host=i586-pc-msdosdjgpp \
|
||||
--with-openssl=/path/to/djgpp \
|
||||
--with-zlib=/path/to/djgpp \
|
||||
--without-libpsl \
|
||||
--disable-shared
|
||||
```
|
||||
|
||||
cmake . \
|
||||
-DCMAKE_SYSTEM_NAME=DOS \
|
||||
-DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \
|
||||
-DCMAKE_C_COMPILER=/path/to/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
-DWATT_ROOT=/path/to/djgpp/net/watt \
|
||||
-DOPENSSL_INCLUDE_DIR=/path/to/djgpp/include \
|
||||
-DOPENSSL_SSL_LIBRARY=/path/to/djgpp/lib/libssl.a \
|
||||
-DOPENSSL_CRYPTO_LIBRARY=/path/to/djgpp/lib/libcrypto.a \
|
||||
-DZLIB_INCLUDE_DIR=/path/to/djgpp/include \
|
||||
-DZLIB_LIBRARY=/path/to/djgpp/lib/libz.a \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```sh
|
||||
cmake . \
|
||||
-DCMAKE_SYSTEM_NAME=DOS \
|
||||
-DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \
|
||||
-DCMAKE_C_COMPILER=/path/to/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
-DWATT_ROOT=/path/to/djgpp/net/watt \
|
||||
-DOPENSSL_INCLUDE_DIR=/path/to/djgpp/include \
|
||||
-DOPENSSL_SSL_LIBRARY=/path/to/djgpp/lib/libssl.a \
|
||||
-DOPENSSL_CRYPTO_LIBRARY=/path/to/djgpp/lib/libcrypto.a \
|
||||
-DZLIB_INCLUDE_DIR=/path/to/djgpp/include \
|
||||
-DZLIB_LIBRARY=/path/to/djgpp/lib/libz.a \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
|
|
@ -310,29 +314,33 @@ Notes:
|
|||
|
||||
You can use either autotools or cmake:
|
||||
|
||||
./configure \
|
||||
CC=/opt/amiga/bin/m68k-amigaos-gcc \
|
||||
AR=/opt/amiga/bin/m68k-amigaos-ar \
|
||||
RANLIB=/opt/amiga/bin/m68k-amigaos-ranlib \
|
||||
--host=m68k-amigaos \
|
||||
--with-amissl \
|
||||
CFLAGS='-O0 -msoft-float -mcrt=clib2' \
|
||||
CPPFLAGS=-I/path/to/AmiSSL/Developer/include \
|
||||
LDFLAGS=-L/path/to/AmiSSL/Developer/lib/AmigaOS3 \
|
||||
LIBS='-lnet -lm -latomic' \
|
||||
--without-libpsl \
|
||||
--disable-shared
|
||||
```sh
|
||||
./configure \
|
||||
CC=/opt/amiga/bin/m68k-amigaos-gcc \
|
||||
AR=/opt/amiga/bin/m68k-amigaos-ar \
|
||||
RANLIB=/opt/amiga/bin/m68k-amigaos-ranlib \
|
||||
--host=m68k-amigaos \
|
||||
--with-amissl \
|
||||
CFLAGS='-O0 -msoft-float -mcrt=clib2' \
|
||||
CPPFLAGS=-I/path/to/AmiSSL/Developer/include \
|
||||
LDFLAGS=-L/path/to/AmiSSL/Developer/lib/AmigaOS3 \
|
||||
LIBS='-lnet -lm -latomic' \
|
||||
--without-libpsl \
|
||||
--disable-shared
|
||||
```
|
||||
|
||||
cmake . \
|
||||
-DAMIGA=1 \
|
||||
-DCMAKE_SYSTEM_NAME=Generic \
|
||||
-DCMAKE_C_COMPILER_TARGET=m68k-unknown-amigaos \
|
||||
-DCMAKE_C_COMPILER=/opt/amiga/bin/m68k-amigaos-gcc \
|
||||
-DCMAKE_C_FLAGS='-O0 -msoft-float -mcrt=clib2' \
|
||||
-DAMISSL_INCLUDE_DIR=/path/to/AmiSSL/Developer/include \
|
||||
-DAMISSL_STUBS_LIBRARY=/path/to/AmiSSL/Developer/lib/AmigaOS3/libamisslstubs.a \
|
||||
-DAMISSL_AUTO_LIBRARY=/path/to/AmiSSL/Developer/lib/AmigaOS3/libamisslauto.a \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```sh
|
||||
cmake . \
|
||||
-DAMIGA=1 \
|
||||
-DCMAKE_SYSTEM_NAME=Generic \
|
||||
-DCMAKE_C_COMPILER_TARGET=m68k-unknown-amigaos \
|
||||
-DCMAKE_C_COMPILER=/opt/amiga/bin/m68k-amigaos-gcc \
|
||||
-DCMAKE_C_FLAGS='-O0 -msoft-float -mcrt=clib2' \
|
||||
-DAMISSL_INCLUDE_DIR=/path/to/AmiSSL/Developer/include \
|
||||
-DAMISSL_STUBS_LIBRARY=/path/to/AmiSSL/Developer/lib/AmigaOS3/libamisslstubs.a \
|
||||
-DAMISSL_AUTO_LIBRARY=/path/to/AmiSSL/Developer/lib/AmigaOS3/libamisslauto.a \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```
|
||||
|
||||
## Disabling Specific Protocols in Windows builds
|
||||
|
||||
|
|
@ -408,18 +416,22 @@ Examples to compile for `aarch64` and API level 29:
|
|||
|
||||
with CMake, where `ANDROID_NDK_HOME` points into your NDK:
|
||||
|
||||
cmake . \
|
||||
-DANDROID_ABI=arm64-v8a \
|
||||
-DANDROID_PLATFORM=android-29 \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" \
|
||||
-DCURL_ENABLE_SSL=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```sh
|
||||
cmake . \
|
||||
-DANDROID_ABI=arm64-v8a \
|
||||
-DANDROID_PLATFORM=android-29 \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" \
|
||||
-DCURL_ENABLE_SSL=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF
|
||||
```
|
||||
|
||||
with `configure`, on macOS:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
export ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/25.1.8937393 # Point into your NDK.
|
||||
export HOST_TAG=darwin-x86_64 # Same tag for Apple Silicon. Other OS values here: https://developer.android.com/ndk/guides/other_build_systems#overview
|
||||
# Same tag for Apple Silicon. Other OS values here:
|
||||
# https://developer.android.com/ndk/guides/other_build_systems#overview
|
||||
export HOST_TAG=darwin-x86_64
|
||||
export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$HOST_TAG
|
||||
export AR=$TOOLCHAIN/bin/llvm-ar
|
||||
export AS=$TOOLCHAIN/bin/llvm-as
|
||||
|
|
@ -443,8 +455,10 @@ install `libssl.a` and `libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy
|
|||
`include/openssl` to `$TOOLCHAIN/sysroot/usr/include`. Now you can build curl
|
||||
for Android using OpenSSL like this:
|
||||
|
||||
```bash
|
||||
LIBS="-lssl -lcrypto -lc++" # For OpenSSL/BoringSSL. In general, you need to the SSL/TLS layer's transitive dependencies if you are linking statically.
|
||||
```sh
|
||||
# For OpenSSL/BoringSSL. In general, you need to the SSL/TLS layer's transitive
|
||||
# dependencies if you are linking statically.
|
||||
LIBS='-lssl -lcrypto -lc++'
|
||||
./configure --host aarch64-linux-android --with-pic --disable-shared --with-openssl="$TOOLCHAIN/sysroot/usr"
|
||||
```
|
||||
|
||||
|
|
@ -493,9 +507,7 @@ configure with any options you need. Be sure and specify the `--host` and
|
|||
of cross-compiling for the IBM 405GP PowerPC processor using the toolchain on
|
||||
Linux.
|
||||
|
||||
```bash
|
||||
#! /bin/sh
|
||||
|
||||
```sh
|
||||
export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
|
||||
export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
|
||||
export AR=ppc_405-ar
|
||||
|
|
@ -505,11 +517,12 @@ export RANLIB=ppc_405-ranlib
|
|||
export CC=ppc_405-gcc
|
||||
export NM=ppc_405-nm
|
||||
|
||||
./configure --target=powerpc-hardhat-linux
|
||||
--host=powerpc-hardhat-linux
|
||||
--build=i586-pc-linux-gnu
|
||||
--prefix=/opt/hardhat/devkit/ppc/405/target/usr/local
|
||||
--exec-prefix=/usr/local
|
||||
./configure \
|
||||
--target=powerpc-hardhat-linux
|
||||
--host=powerpc-hardhat-linux
|
||||
--build=i586-pc-linux-gnu
|
||||
--prefix=/opt/hardhat/devkit/ppc/405/target/usr/local
|
||||
--exec-prefix=/usr/local
|
||||
```
|
||||
|
||||
The `--prefix` parameter specifies where curl gets installed. If `configure`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue