Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 260806 | Differences between
and this patch

Collapse All | Expand All

(-)autoconf/configure.in (-9 / +15 lines)
Lines 393-398 Link Here
393
AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
393
AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
394
	AC_DEFINE(OPEROVERRIDE_VERIFY))
394
	AC_DEFINE(OPEROVERRIDE_VERIFY))
395
AC_ARG_WITH(system-tre, [AC_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no ])
395
AC_ARG_WITH(system-tre, [AC_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no ])
396
AC_ARG_WITH(system-cares, [AC_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.5.3) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no ])
396
CHECK_SSL
397
CHECK_SSL
397
CHECK_ZLIB
398
CHECK_ZLIB
398
CHECK_LIBCURL
399
CHECK_LIBCURL
Lines 462-467 Link Here
462
PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
463
PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
463
])
464
])
464
465
466
AS_IF([test "x$with_system_cares" = "xno"],[
465
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
467
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
466
cares_version="1.6.0"
468
cares_version="1.6.0"
467
AC_MSG_RESULT(extracting c-ares resolver library)
469
AC_MSG_RESULT(extracting c-ares resolver library)
Lines 484-493 Link Here
484
$ac_cv_prog_MAKER || exit 1
486
$ac_cv_prog_MAKER || exit 1
485
AC_MSG_RESULT(installing c-ares resolver library)
487
AC_MSG_RESULT(installing c-ares resolver library)
486
$ac_cv_prog_MAKER install || exit 1
488
$ac_cv_prog_MAKER install || exit 1
487
CARESINCDIR="$cur_dir/extras/c-ares/include"
489
CARES_CFLAGS="$cur_dir/extras/c-ares/include"
488
AC_SUBST(CARESINCDIR)
490
AC_SUBST(CARES_CFLAGS)
489
CARESLIBDIR="-L../extras/c-ares/lib"
491
CARES_LIBS="-L../extras/c-ares/lib"
490
AC_SUBST(CARESLIBDIR)
491
dnl Set default library parameters for when pkg-config is not available
492
dnl Set default library parameters for when pkg-config is not available
492
CARESLIBSALT="-lcares"
493
CARESLIBSALT="-lcares"
Lines 504-518 Link Here
504
dnl from above. Also, if pkg-config returns an empty result (ex: on fbsd
505
dnl from above. Also, if pkg-config returns an empty result (ex: on fbsd
505
dnl or older versions it might be missing --static) then also use defaults.
506
dnl or older versions it might be missing --static) then also use defaults.
506
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
507
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
507
	CARESLIBS="$CARESLIBSALT"
508
	CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
508
else
509
else
509
	CARESLIBS="`$ac_cv_path_PKGCONFIG --static --libs libcares.pc`"
510
	CARES_LIBSPRE="$CARES_LIBS"
510
	if test "x$CARESLIBS" = "x" ; then
511
	CARES_LIBS="$CARES_LIBS `$ac_cv_path_PKGCONFIG --static --libs libcares.pc`"
511
		CARESLIBS="$CARESLIBSALT"
512
	if test "$CARES_LIBS" = "$CARES_LIBSPRE " ; then
513
		CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
512
	fi
514
	fi
513
fi
515
fi
514
AC_SUBST(CARESLIBS)
516
AC_SUBST(CARES_LIBS)
515
cd $cur_dir
517
cd $cur_dir
518
],[
519
dnl use pkg-config for system c-ares:
520
PKG_CHECK_MODULES([CARES], libcares >= 1.5.3)
521
])
516
522
517
523
518
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
524
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
(-)Makefile.in (-2 / +2 lines)
Lines 34-44 Link Here
34
#
34
#
35
35
36
#XCFLAGS=-O -g -export-dynamic
36
#XCFLAGS=-O -g -export-dynamic
37
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARESLIBS@
37
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARES_LIBS@
38
CRYPTOLIB=@CRYPTOLIB@
38
CRYPTOLIB=@CRYPTOLIB@
39
OPENSSLINCLUDES=
39
OPENSSLINCLUDES=
40
40
41
XCFLAGS=@TRE_CFLAGS@ -I@CARESINCDIR@ @CARESLIBDIR@ @CFLAGS@
41
XCFLAGS=@TRE_CFLAGS@ -I@CARES_CFLAGS@ @CFLAGS@
42
#
42
#
43
# use the following on MIPS:
43
# use the following on MIPS:
44
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
44
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
(-)src/res.c (-9 / +23 lines)
Lines 49-55 Link Here
49
#include <res.h>
49
#include <res.h>
50
50
51
/* Prevent crashes due to invalid prototype/ABI */
51
/* Prevent crashes due to invalid prototype/ABI */
52
#if ARES_VERSION < 0x010600
52
#if ARES_VERSION < 0x010503
53
 #error "You have an old c-ares version on your system and/or Unreals c-ares failed to compile!"
53
 #error "You have an old c-ares version on your system and/or Unreals c-ares failed to compile!"
54
#endif
54
#endif
Lines 736-756 Link Here
736
	} else
736
	} else
737
	if (*param == 'i') /* INFORMATION */
737
	if (*param == 'i') /* INFORMATION */
738
	{
738
	{
739
		struct ares_config_info inf;
739
		struct ares_options inf;
740
		int i;
740
		int i;
741
		int optmask;
741
		
742
		
742
		ares_get_config(&inf, resolver_channel);
743
		ares_save_options(resolver_channel, &inf, &optmask);
743
744
744
		sendtxtnumeric(sptr, "****** DNS Configuration Information ******");
745
		sendtxtnumeric(sptr, "****** DNS Configuration Information ******");
745
		sendtxtnumeric(sptr, " c-ares version: %s",ares_version(NULL));
746
		sendtxtnumeric(sptr, " c-ares version: %s",ares_version(NULL));
746
		sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
747
747
		sendtxtnumeric(sptr, "          tries: %d", inf.tries);
748
		if(optmask & ARES_OPT_TIMEOUTMS)
748
		sendtxtnumeric(sptr, "   # of servers: %d", inf.numservers);
749
			sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
749
		for (i = 0; i < inf.numservers; i++)
750
		if(optmask & ARES_OPT_TRIES)
750
			sendtxtnumeric(sptr, "      server #%d: %s", i+1, inf.servers[i] ? inf.servers[i] : "[???]");
751
			sendtxtnumeric(sptr, "          tries: %d", inf.tries);
751
			
752
		if(optmask & ARES_OPT_SERVERS)
753
		{
754
			sendtxtnumeric(sptr, "   # of servers: %d", inf.nservers);
755
			for (i = 0; i < inf.nservers; i++)
756
				sendtxtnumeric(sptr, "      server #%d: %s", i+1, inet_ntoa(inf.servers[i]));	
757
		}
758
		if(optmask & ARES_OPT_DOMAINS)
759
		{
760
			sendtxtnumeric(sptr, "   # of search domains: %d", inf.ndomains);
761
			for (i = 0; i < inf.ndomains; i++)
762
				sendtxtnumeric(sptr, "      domain #%d: %s", i+1, inf.domains[i]);
763
		}
752
		/* TODO: free or get memleak ! */
764
		/* TODO: free or get memleak ! */
753
		sendtxtnumeric(sptr, "****** End of DNS Configuration Info ******");
765
		sendtxtnumeric(sptr, "****** End of DNS Configuration Info ******");
766
		
767
		ares_destroy_options(&inf);
754
	} else /* STATISTICS */
768
	} else /* STATISTICS */
755
	{
769
	{
756
		sendtxtnumeric(sptr, "DNS CACHE Stats:");
770
		sendtxtnumeric(sptr, "DNS CACHE Stats:");

Return to bug 260806