mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-29 20:26:38 +02:00
8fe44698df
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.
80 lines
1.7 KiB
Bash
Executable File
80 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
URL="https://www.unrealircd.org/files/curl-latest.tar.gz"
|
|
OUTF="curl-latest.tar.gz"
|
|
OUTD="curl-latest"
|
|
UNREALDIR="`pwd`"
|
|
PRIVATELIBDIR="$1"
|
|
|
|
if [ "x$1" = "x" ]; then
|
|
echo "You should (no longer) run this program directly."
|
|
echo "It will be invoked by ./Config"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f src/parse.c ]; then
|
|
if [ -f ../src/parse.c ]; then
|
|
cd ..
|
|
else
|
|
echo "Please run this program from your UnrealIRCd directory"
|
|
echo "(usually $HOME/unrealircd-5.0.X or something like that)"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
wget --version 1>/dev/null 2>&1
|
|
if [ "$?" = 0 ]; then
|
|
FETCHER="wget"
|
|
else
|
|
fetch --version 1>/dev/null 2>&1
|
|
if [ "$?" = 0 ]; then
|
|
FETCHER="fetch"
|
|
else
|
|
lynx --version 1>/dev/null 2>&1
|
|
if [ "$?" = 0 ]; then
|
|
FETCHER="lynx"
|
|
else
|
|
echo "ERROR: unable to find wget/fetch/lynx, please install at least one of these programs"
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
if [ ! -d tmp ]; then
|
|
mkdir tmp || exit 1
|
|
fi
|
|
|
|
cd tmp || exit 1
|
|
|
|
rm -f "$OUTF"
|
|
|
|
if [ "$FETCHER" = "wget" ]; then
|
|
wget -O "$OUTF" "$URL"
|
|
elif [ "$FETCHER" = "lynx" ]; then
|
|
lynx -dump "$URL" >"$OUTF"
|
|
elif [ "$FETCHER" = "fetch" ]; then
|
|
cd tmp #todo: find out the cmd line parameter ;)
|
|
fetch "$URL"
|
|
fi
|
|
|
|
if [ "$?" != 0 ]; then
|
|
echo "ERROR: Something went wrong while trying to download $URL"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf "$OUTD" # remove old directory prior to extracting
|
|
tar xzf "$OUTF" || exit 1
|
|
|
|
|
|
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
|
|
c="\c"
|
|
else
|
|
n="-n"
|
|
fi
|
|
|
|
# We assume curl has been packaged in a way it will extract to "$OUTD"/
|
|
cd "$OUTD" || exit 1
|
|
|
|
echo "Building and installing libcurl"
|
|
./configure --prefix=$UNREALDIR/extras/curl --libdir=$PRIVATELIBDIR --enable-shared --with-openssl
|
|
make && make install
|