From 3a6885d6a1d30f6e2eb9b1fcd20e949768267318 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 19 Jul 2006 12:51:21 +0000 Subject: * Seperate out socket engines into derived classes of SocketEngine. * Add a classfactory SocketEngineFactory to create a new socketengine of the configured type * Implement configure hax to compile only the required socketengine and the base class * Eliminates ugly defines, and is more in line with C++ ways git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4439 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d13a07852..22855727f 100755 --- a/configure +++ b/configure @@ -1022,21 +1022,37 @@ EOF my $use_hiperf = 0; if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) { print FILEHANDLE "#define USE_KQUEUE\n"; + $se = "socketengine_kqueue"; $use_hiperf = 1; } if (($has_epoll) && ($config{USE_EPOLL} eq "y")) { print FILEHANDLE "#define USE_EPOLL\n"; + $se = "socketengine_epoll"; $use_hiperf = 1; } # user didn't choose either epoll or select for their OS. # default them to USE_SELECT (ewwy puke puke) if (!$use_hiperf) { print FILEHANDLE "#define USE_SELECT\n"; + $se = "socketengine_select"; } print FILEHANDLE "\n#endif\n"; close(FILEHANDLE); } +open(FILEHANDLE, ">include/inspircd_se_config.h"); + print FILEHANDLE <src/Makefile") or die("Could not write src/Makefile"); print FH <