Hello @jsulm I have looked deeper into my problem and found some things. Could you help me by confirming as far as you can? Or recommend someone that may know the answer?
I found a new documentation page I hadn't read: https://doc.qt.io/qt-5/ssl.html#enabling-and-disabling-ssl-support
When I launched the configure program with the openssl-linked option, I finally got a QtNetwork/qtnetwork-config.h file without the definition that caused trouble (see above). However, when I tried to save the new qmake version and its Android kit, I get an error saying that the Android Clang compiler "can't produce code for the Qt version "Qt 5.15.13 (Qt-5.15.13)" (x86-linux-generic-elf-64bit)."
What I understand is that I didn't activate the target for cross-compilation in the initial configuration step.
So I went back and launched this
OPENSSL_LIBS='-L~/android-sdk/android_openssl/ssl_1.1/arm64-v8a/include -lssl -lcrypto' \
~/qt5/configure -openssl-linked -prefix /opt/Qt5.15 -xplatform android-clang \
-disable-rpath -nomake tests -nomake examples -android-ndk ~/android-sdk/ndk/21.3.6528147 \
-android-sdk ~/android-sdk -no-warnings-are-errors -opensource -confirm-license
But I got the following error:
ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && !features.schannel && libs.openssl' failed.
Check config.log for details.
Please note that when I launch the mentioned command without -xplatform android-clang, it seems to work and I am asked to launch gmake. So for the time being I have found myself in an incompatibility of installing an SSL-supported Qt and cross-compiling for Android.
Regarding the config log file that the error indicates me, I don't know what exactly to look at.
What I find interesting is that at some point there is this SSL-related error (with the -xplatform option):
+ cd /home/diego/qt-build/config.tests/openssl && MAKEFLAGS= /usr/bin/gmake clean && MAKEFLAGS= /usr/bin/gmake
> rm -rf /home/diego/qt-build/config.tests/openssl/android-build
> rm -f main.o
> rm -f *~ core *.core
> /home/diego/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -O2 -fPIC -I. -I/home/diego/qt5/qtbase/mkspecs/android-clang -o main.o main.cpp
> main.cpp:2:10: fatal error: 'openssl/ssl.h' file not found
> #include <openssl/ssl.h>
> ^~~~~~~~~~~~~~~
> 1 error generated.
> gmake: *** [Makefile:193 : main.o] Erreur 1
The weird thing is that without the -xplatform option, I don't see this error, and yet the two command lines are otherwise the same one.
Apart from that, there are many other errors, but as I said I don't know exactly what to look at.