? .hg
? aclocal.m4
? autom4te.cache
? bcn.ircd.motd
? cache
? ircd.pid
? ircd.tune
? location.conf
? motd.txt
? robots.txt
? server.cert.pem
? server.key.pem
? server.req.pem
? smotd.txt
? tmp
? unrealircd.conf
? valgrind.unreal.suppress
? autoconf/acinclude.m4
? extras/c-ares
? extras/c-ares-1.6.0
? extras/c-ares.tar
? src/modules/callerid.c
? src/modules/m_soper.c
? src/modules/testchanmodehook.c
Index: configure
===================================================================
RCS file: /cvs/unreal/Attic/configure,v
retrieving revision 1.1.2.96.2.42
diff -u -B -r1.1.2.96.2.42 configure
===================================================================
RCS file: /cvs/unreal/Attic/configure.ac,v
retrieving revision 1.1.2.3
diff -u -B -r1.1.2.3 configure.ac
--- configure.ac	15 Jul 2010 21:33:54 -0000	1.1.2.3
+++ configure.ac	16 Jul 2010 00:15:27 -0000
@@ -496,7 +496,6 @@
 AC_ARG_WITH(system-cares, [AS_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.6.0) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no])
 CHECK_SSL
 CHECK_ZLIB
-CHECK_LIBCURL
 AC_ARG_ENABLE(dynamic-linking, [AS_HELP_STRING([--disable-dynamic-linking], [Make the IRCd statically link with shared objects rather than dynamically (noone knows if disabling dynamic linking actually does anything or not)])],
 	[enable_dynamic_linking=$enableval], [enable_dynamic_linking="yes"])
 AS_IF([test $enable_dynamic_linking = "yes"],
@@ -638,6 +637,7 @@
 PKG_CHECK_MODULES([CARES], libcares >= 1.6.0)
 ])
 
+CHECK_LIBCURL
 
 AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
 chmod 0700 unreal
Index: autoconf/m4/unreal.m4
===================================================================
RCS file: /cvs/unreal/autoconf/m4/Attic/unreal.m4,v
retrieving revision 1.1.2.1
diff -u -B -r1.1.2.1 unreal.m4
--- autoconf/m4/unreal.m4	8 Jul 2010 02:51:43 -0000	1.1.2.1
+++ autoconf/m4/unreal.m4	16 Jul 2010 00:15:27 -0000
@@ -107,7 +107,7 @@
 		[
 			dnl Attempt one: Linux sed
 			XCURLLIBS="`echo "$CURLLIBS"|sed -r 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
-			AS_IF([test x"$XCURLLIBS" = x],
+			AS_IF([test "x$XCURLLIBS" = "x"],
 			[
 				dnl Attempt two: FreeBSD (and others?) sed
 				XCURLLIBS="`echo "$CURLLIBS"|sed -E 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
@@ -117,6 +117,9 @@
 				])
 			])
 			CURLLIBS="$XCURLLIBS"
+
+			IRCDLIBS_CURL_CARES="$CARES_LIBS"
+			CFLAGS_CURL_CARES="$CARES_CFLAGS"
 		])
 		
 		dnl Make sure that linking against cURL works rather than letting the user
@@ -126,7 +129,10 @@
 
 		AC_MSG_CHECKING([curl_easy_init() in $CURLLIBS])
 		LIBS_SAVEDA="$LIBS"
-		LIBS="$IRCDLIBS"
+		CFLAGS_SAVEDA="$CFLAGS"
+
+		LIBS="$IRCDLIBS $IRCDLIBS_CURL_CARES"
+		CFLAGS="$CFLAGS $CFLAGS_CURL_CARES"
 		AC_LINK_IFELSE(
 		    [
 			AC_LANG_PROGRAM(
@@ -138,6 +144,7 @@
 			AC_MSG_FAILURE([You asked for libcURL (remote includes) support, but it can't be found at $enable_curl])
 		])
 		LIBS="$LIBS_SAVEDA"
+		CFLAGS="$CFLAGS_SAVEDA"
 
 		URL="url.o"
 		AC_SUBST(URL)
