1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 01:43:12 +02:00

When using the "let unrealircd compile cURL" option, now no longer use c-ares,

as it complicates things too much. The c-ares build options that we use in
UnrealIRCd cause curl not to recongize c-ares, and the other way around is not
good either. Also, self-compiled ("unrealircd shipped") c-ares may not be
used/required by main unrealircd (thus rm'd) while it is still needed by
self-compiled curled. Blehh, what a mess.

Now we simply don't compile curl with c-ares and rely on cURL to enable async
DNS support via system c-ares or via the another way, with the use of threads,
which is standard in curl now for many years and should work on most, if not
all platforms.
If this is somehow problematic for you then install libcurl/libcurl-dev(el)
on your system itself, via your package manager or other means.
This commit is contained in:
Bram Matthys
2022-01-30 08:01:38 +01:00
parent fa15ea2567
commit 8fe44698df
+1 -20
View File
@@ -2,9 +2,7 @@
URL="https://www.unrealircd.org/files/curl-latest.tar.gz"
OUTF="curl-latest.tar.gz"
OUTD="curl-latest"
ARESPATH="`pwd`/extras/c-ares"
UNREALDIR="`pwd`"
CARESVERSION="1.18.1"
PRIVATELIBDIR="$1"
if [ "x$1" = "x" ]; then
@@ -73,26 +71,9 @@ else
n="-n"
fi
if [ ! -d "$ARESPATH/lib" ]; then
echo "c-ares has not been build yet, let's do that now..."
cd ../extras/
tar xzf c-ares.tar.gz || exit 1
cd c-ares-$CARESVERSION || exit 1
./configure --prefix=$ARESPATH --libdir=$PRIVATELIBDIR --enable-shared --disable-tests || exit 1
(make && make install) || exit 1
cd ../../tmp/
echo "c-ares built."
echo ""
fi
# We assume curl has been packaged in a way it will extract to "$OUTD"/
cd "$OUTD" || exit 1
echo "Building and installing libcurl"
CPPFLAGS="-I$ARESPATH/include" ./configure --prefix=$UNREALDIR/extras/curl --libdir=$PRIVATELIBDIR --enable-shared \
--enable-ares=$ARESPATH --with-openssl
cp -R $ARESPATH/lib ares
./configure --prefix=$UNREALDIR/extras/curl --libdir=$PRIVATELIBDIR --enable-shared --with-openssl
make && make install
#cp $ARESPATH/lib/libcares.a $HOME/curl/lib
# that isn't needed anymore as the lib is already in unreal...