X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=537e720b37e392f170bcf0a43565dba48a232bc5;hb=acba97b36b6aacc3ea34a6ccf9e9ec4d375b24c6;hp=aae2a75a2179c79192db2522d13dbaa7feba6885;hpb=791b56d401c69e32221ba40b8d1114801e96b834;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index aae2a75a2..537e720b3 100755 --- a/configure +++ b/configure @@ -1,5 +1,4 @@ #!/usr/bin/perl - # InspIRCd Configuration Script # # Copyright 2003 The ChatSpike Development Team @@ -12,11 +11,6 @@ # ######################################## -if (!$>) { - print "Cannot configure/build InspIRCd as root.\n"; - exit(666); -} - chomp($topdir = `pwd`); $this = resolve_directory($topdir); # PWD, Regardless. @modlist = (); # Declare for Module List.. @@ -61,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 "")){ @@ -109,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(); @@ -199,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"; } @@ -783,6 +785,13 @@ sub getosflags { $config{LDLIBS} = ""; $config{MAKEPROG} = "/usr/bin/make"; $config{MAKEORDER} = "ircd mods config bininst"; + } elsif ($config{OSNAME} eq "CYG-STATIC") { + $config{FLAGS} = "-frtti $OPTIMISATI -Wall -Woverloaded-virtual $config{OPTIMISATI}"; + $config{LDLIBS} = ""; + $config{MAKEPROG} = "/usr/bin/make"; + $config{MAKEORDER} = "mods ircd config bininst"; + $config{STATICLIBS} = "modules/mods.a"; + $config{STATIC_LINK} = "yes"; } } if ($config{OSNAME} =~ /SunOS/) { @@ -864,6 +873,10 @@ EOF print FILEHANDLE "#define IS_CYGWIN\n"; print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n"; } + if ($config{OSNAME} eq "CYG-STATIC") { + print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n"; + } + if ($config{STATIC_LINK} eq "yes") { print FILEHANDLE "#define STATIC_LINK\n"; } @@ -1099,10 +1112,10 @@ foreach $i (@modlist) $cmflags = getcompilerflags("src/modules/m_".$i.".cpp"); $liflags = getlinkerflags("src/modules/m_".$i.".cpp"); - print FILEHANDLE <