1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 05:13:13 +02:00

- Fix invalid use of 'wc -l' when detecting the AsynchDNS feature of

libcurl which breaks compilation on FreeBSD; instead use 'grep
  -q'. Reported by Jobe (#3981), solution proposed by satmd.
This commit is contained in:
binki
2010-12-22 16:02:39 +00:00
parent 9f710925f8
commit df37d83f8b
4 changed files with 22 additions and 10 deletions
+3
View File
@@ -2249,3 +2249,6 @@
- Fix typo 'alias::spampfilter' in German docs, reported by seraphim (#3978).
- Fix missing #include <stdint.h>. Fixes compile error on OpenBSD
reported by CuleX (#3977).
- Fix invalid use of 'wc -l' when detecting the AsynchDNS feature of
libcurl which breaks compilation on FreeBSD; instead use 'grep
-q'. Reported by Jobe (#3981), solution proposed by satmd.
+9 -7
View File
@@ -673,9 +673,11 @@ if [ "$REMOTEINC" = "1" ] ; then
GOTASYNC=0
if [ "x$CURLDIR" != "x" ]; then
# Check if it's of any use: a curl without async dns (cares) hangs the entire ircd..
# normally this is done in ./configure but now we're forced to do it also here..
GOTASYNC="`$CURLDIR/bin/curl-config --features|grep AsynchDNS|wc -l`"
# Check if it's of any use: a curl without async dns (cares) hangs the entire ircd..
# normally this is done in ./configure but now we're forced to do it also here..
if "$CURLDIR"/bin/curl-config --features | grep -q -e AsynchDNS; then
GOTASYNC="1"
fi
if [ "$GOTASYNC" != "1" ]; then
PREVCURLDIR="$CURLDIR"
CURLDIR=""
@@ -691,7 +693,7 @@ if [ "$REMOTEINC" = "1" ] ; then
# on 'bc' for some reason and not all systems have that installed!
echo "1+1"|bc 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
$CURLDIR/bin/curl-config --checkfor 7.21.0
"$CURLDIR"/bin/curl-config --checkfor 7.21.0
if [ "$?" != 0 ]; then
echo ""
echo "Your self-compiled CURL library in $CURLDIR is slightly outdated."
@@ -712,8 +714,8 @@ if [ "$REMOTEINC" = "1" ] ; then
fi
case "$cc" in
[Yy]*)
rm -rf $CURLDIR.old
mv $CURLDIR $CURLDIR.old
rm -rf "$CURLDIR".old
mv "$CURLDIR" "$CURLDIR".old
CURLDIR=""
GOTASYNC=1
# wow the GOTASYNC=1 is hackish, but we need to prevent the error from later on
@@ -949,7 +951,7 @@ TEST="$EXTRAPARA"
echo ""
echo "Would you like to pass any custom parameters to configure?"
echo "See \`./configure --help' and write them here:"
echo $n "[$TEST]-> $c"
echo $n "[$TEST] -> $c"
read EXTRAPARA
if [ -z "$EXTRAPARA" ]; then
EXTRAPARA="$TEST"
+5 -2
View File
@@ -63,8 +63,11 @@ AC_DEFUN([CHECK_LIBCURL],
CURLCFLAG="`$CURLCONFIG --cflags`"
CURLLIBS="`$CURLCONFIG --libs`"
CURLUSESCARES="`$CURLCONFIG --features|grep AsynchDNS|wc -l`"
dnl This test must be this way because of #3981
AS_IF([$CURLCONFIG --features | grep -q -e AsynchDNS],
[CURLUSESCARES="1"],
[CURLUSESCARES="0"])
AS_IF([test "$CURLUSESCARES" = "0"],
[AC_MSG_WARN([cURL seems compiled without c-ares support. Your IRCd will possibly stall when REHASHing!])])
Vendored
+5 -1
View File
@@ -6982,7 +6982,11 @@ fi
CURLCFLAG="`$CURLCONFIG --cflags`"
CURLLIBS="`$CURLCONFIG --libs`"
CURLUSESCARES="`$CURLCONFIG --features|grep AsynchDNS|wc -l`"
if $CURLCONFIG --features | grep -q -e AsynchDNS; then :
CURLUSESCARES="1"
else
CURLUSESCARES="0"
fi
if test "$CURLUSESCARES" = "0"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cURL seems compiled without c-ares support. Your IRCd will possibly stall when REHASHing!" >&5
$as_echo "$as_me: WARNING: cURL seems compiled without c-ares support. Your IRCd will possibly stall when REHASHing!" >&2;}