X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=537e720b37e392f170bcf0a43565dba48a232bc5;hb=acba97b36b6aacc3ea34a6ccf9e9ec4d375b24c6;hp=a63f031ed1435e3c856925eb5f3170f6a76682a2;hpb=90ec171ba00f3fd969a8398b7ee990c8581c70ec;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index a63f031ed..537e720b3 100755 --- a/configure +++ b/configure @@ -1,5 +1,4 @@ #!/usr/bin/perl - # InspIRCd Configuration Script # # Copyright 2003 The ChatSpike Development Team @@ -56,6 +55,14 @@ $config{MAX_AWAY} = "200"; # max AWAY size $config{HAS_OPENSSL} =~ /OpenSSL (\S+) \d+ \S+ \d{4}/; $config{HAS_OPENSSL} = $1; +# Minihack! Convert Cygwin to 'Cyg-Static' so i can +# Keep my dynamic module experiments here for later +# concideration! + +if ($config{OSNAME} =~ /CYGWIN/) { + $config{OSNAME} = "CYG-STATIC"; +} + if ((!$config{OSNAME}) || ($config{OSNAME} eq "")) { chomp($config{OSNAME} = `/usr/bin/uname`); if ((!$config{OSNAME}) || ($config{OSNAME} eq "")){ @@ -104,7 +111,7 @@ if ($arg eq "-modupdate") { getosflags(); $has_epoll = $config{HAS_EPOLL}; $has_kqueue = $config{HAS_KQUEUE}; - if ($config{OSNAME} =~ /CYGWIN/) { + if ($config{STATIC_LINK} == "yes") { write_static_modules_makefile(); } else { write_dynamic_modules_makefile(); @@ -194,7 +201,7 @@ if ($has_epoll) { print "yes\n" if $has_epoll == 1; print "no\n" if $has_epoll == 0; -if ($config{OSNAME} =~ /CYGWIN/) { +if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) { $config{HAS_STRLCPY} = "true"; } @@ -661,15 +668,6 @@ print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) { print "\033[1;32mWARNING!\033[0m You are running OpenBSD but you are using the base gcc package\nrather than eg++. This compile will most likely fail, but i'm letting you\ngo ahead with it anyway, just in case i'm wrong :-)\n"; } -if ($config{OSNAME} =~ /CYGWIN/) { - print <src/modules/Makefile"); + my $extra = ""; + + if ($config{OSNAME} =~ /CYGWIN/) { + $extra = "../inspircd.dll.a"; + } ### # Module Makefile Header @@ -1172,7 +1187,7 @@ foreach $i (@modlist) { print FILEHANDLE < -# Makefile version 2 (dynamically linked core) by +# Makefile version 2 (statically linked core) by # CC = im a cheezeball CXXFLAGS = -I../include \${FLAGS} +EOM +### +# This next section is for cygwin dynamic module builds. +# Basically, what we do, is build the inspircd core as a library +# then the main executable uses that. the library is capable of +# loading / unloading the modules dynamically :) +# Massive thanks to the guys on #cygwin @ irc.freenode.net for helping +# make this work :) +### + +if ($config{OSNAME} =~ /CYGWIN/) { + print FH <