diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-08 10:44:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-08 10:44:15 +0000 |
commit | 62fda57bdcc0003a14bbcefa133bf0db4c20c3af (patch) | |
tree | b7b684d9575efe2204b7eb4a1821bfe73f4871a7 /configure | |
parent | 1ed9b7e024aab2c6cfb929be4642375e4e8458b3 (diff) |
Fixed more crap indenting!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3136 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 296 |
1 files changed, 147 insertions, 149 deletions
@@ -810,42 +810,42 @@ sub getosflags { } sub is_dir { - my ($path) = @_; - if (chdir($path)) { - chdir($this); - return 1; - } else { - # Just in case.. - chdir($this); - return 0; - } + my ($path) = @_; + if (chdir($path)) { + chdir($this); + return 1; + } else { + # Just in case.. + chdir($this); + return 0; + } } sub getmodules { - my $i = 0; - opendir(DIRHANDLE, "src/modules"); - foreach $name (sort readdir(DIRHANDLE)) { - if ($name =~ /^m_(.+)\.cpp$/) - { - $mod = $1; - if ($mod !~ /_static$/) { - $modlist[$i++] = $mod; - } - } - } - closedir(DIRHANDLE); + my $i = 0; + opendir(DIRHANDLE, "src/modules"); + foreach $name (sort readdir(DIRHANDLE)) { + if ($name =~ /^m_(.+)\.cpp$/) + { + $mod = $1; + if ($mod !~ /_static$/) { + $modlist[$i++] = $mod; + } + } + } + closedir(DIRHANDLE); } sub writefiles { - print "Writing \033[1;32minspircd_config.h\033[0m\n"; - # First File.. inspircd_config.h - chomp(my $incos = `uname -n -s -r`); - chomp(my $version = `sh ./src/version.sh`); - open(FILEHANDLE, ">include/inspircd_config.h"); - my $NL = $config{NICK_LENGT}+1; - my $CL = $config{CHAN_LENGT}+1; - print FILEHANDLE <<EOF; + print "Writing \033[1;32minspircd_config.h\033[0m\n"; + # First File.. inspircd_config.h + chomp(my $incos = `uname -n -s -r`); + chomp(my $version = `sh ./src/version.sh`); + open(FILEHANDLE, ">include/inspircd_config.h"); + my $NL = $config{NICK_LENGT}+1; + my $CL = $config{CHAN_LENGT}+1; + print FILEHANDLE <<EOF; /* Auto generated by configure, do not modify! */ #ifndef __CONFIGURATION_AUTO__ #define __CONFIGURATION_AUTO__ @@ -870,133 +870,131 @@ sub writefiles { #define SYSTEM "$incos" #define MAXBUF 514 EOF + if ($config{OSNAME} =~ /SunOS/) { + print FILEHANDLE "#define IS_SOLARIS\n"; + } + if ($config{OSNAME} =~ /CYGWIN/) { + 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{OSNAME} =~ /SunOS/) { - print FILEHANDLE "#define IS_SOLARIS\n"; - } - if ($config{OSNAME} =~ /CYGWIN/) { - 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"; + } + if ($config{GCCVER} > 3) { + print FILEHANDLE "#define GCC3\n"; + print FILEHANDLE "#define GCC34\n"; + } + else + { + if ($config{GCCVER} == 3) { + print FILEHANDLE "#define GCC3\n"; + if ($config{GCC34} > 3) { + print FILEHANDLE "#define GCC34\n"; + } + } + } + if ($config{HAS_STRLCPY} eq "true") { + print FILEHANDLE "#define HAS_STRLCPY\n"; + } + if ($config{THREADED_DNS} =~ /y/i) { + print FILEHANDLE "#define THREADED_DNS\n"; + } + my $use_hiperf = 0; + if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) { + print FILEHANDLE "#define USE_KQUEUE\n"; + $use_hiperf = 1; + } + if (($has_epoll) && ($config{USE_EPOLL} eq "y")) { + print FILEHANDLE "#define USE_EPOLL\n"; + $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"; + } + print FILEHANDLE "\n#endif\n"; + close(FILEHANDLE); - if ($config{STATIC_LINK} eq "yes") { - print FILEHANDLE "#define STATIC_LINK\n"; - } - if ($config{GCCVER} > 3) { - print FILEHANDLE "#define GCC3\n"; - print FILEHANDLE "#define GCC34\n"; - } - else - { - if ($config{GCCVER} == 3) { - print FILEHANDLE "#define GCC3\n"; - if ($config{GCC34} > 3) { - print FILEHANDLE "#define GCC34\n"; - } - } - } - if ($config{HAS_STRLCPY} eq "true") { - print FILEHANDLE "#define HAS_STRLCPY\n"; - } - if ($config{THREADED_DNS} =~ /y/i) { - print FILEHANDLE "#define THREADED_DNS\n"; - } - my $use_hiperf = 0; - if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) { - print FILEHANDLE "#define USE_KQUEUE\n"; - $use_hiperf = 1; - } - if (($has_epoll) && ($config{USE_EPOLL} eq "y")) { - print FILEHANDLE "#define USE_EPOLL\n"; - $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"; - } - print FILEHANDLE "\n#endif\n"; - close(FILEHANDLE); + # Create a Modules List.. + my $modules = ""; + foreach $i (@modlist) + { + if ($config{STATIC_LINK} eq "yes") { + $modules .= "m_".$i.".o "; + } + else { + $modules .= "m_".$i.".so "; + } + } + chomp($modules); # Remove Redundant whitespace.. - # Create a Modules List.. - my $modules = ""; - foreach $i (@modlist) - { - if ($config{STATIC_LINK} eq "yes") { - $modules .= "m_".$i.".o "; - } - else { - $modules .= "m_".$i.".so "; - } - } - chomp($modules); # Remove Redundant whitespace.. + # Write all .in files. + my $tmp = ""; + my $file = ""; + my $exe = "inspircd"; - # Write all .in files. - my $tmp = ""; - my $file = ""; - my $exe = "inspircd"; + if ($config{OSNAME} =~ /CYGWIN/) { + $exe = "inspircd.exe"; + } - if ($config{OSNAME} =~ /CYGWIN/) { - $exe = "inspircd.exe"; - } + opendir(DIRHANDLE, $this); + if ($config{THREADED_DNS} =~ /y/i) { + $config{LDLIBS} = $config{LDLIBS} . " -pthread"; + } + foreach $name (sort readdir(DIRHANDLE)) { + if ($name =~ /^\.(.+)\.inc$/) { + $file = $1; + # All .name.inc files need parsing! + $tmp = ""; + open(FILEHANDLE, ".$file.inc"); + while (<FILEHANDLE>) { + $tmp .= $_; + } + close(FILEHANDLE); + + $tmp =~ s/\@CC\@/$config{CC}/; + $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/; + $tmp =~ s/\@FLAGS\@/$config{FLAGS}/; + $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/; + $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/; + $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/; + $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/; + $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/; + $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/; + $tmp =~ s/\@MODULES\@/$modules/; + $tmp =~ s/\@EXECUTABLE\@/$exe/; + $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/; + $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/; + + print "Writing \033[1;32m$file\033[0m\n"; + open(FILEHANDLE, ">$file"); + print FILEHANDLE $tmp; + } + } + closedir(DIRHANDLE); - opendir(DIRHANDLE, $this); - if ($config{THREADED_DNS} =~ /y/i) { - $config{LDLIBS} = $config{LDLIBS} . " -pthread"; - } - foreach $name (sort readdir(DIRHANDLE)) { - if ($name =~ /^\.(.+)\.inc$/) - { - $file = $1; - # All .name.inc files need parsing! - $tmp = ""; - open(FILEHANDLE, ".$file.inc"); - while (<FILEHANDLE>) { - $tmp .= $_; - } - close(FILEHANDLE); - - $tmp =~ s/\@CC\@/$config{CC}/; - $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/; - $tmp =~ s/\@FLAGS\@/$config{FLAGS}/; - $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/; - $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/; - $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/; - $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/; - $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/; - $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/; - $tmp =~ s/\@MODULES\@/$modules/; - $tmp =~ s/\@EXECUTABLE\@/$exe/; - $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/; - $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/; - - print "Writing \033[1;32m$file\033[0m\n"; - open(FILEHANDLE, ">$file"); - print FILEHANDLE $tmp; - } - } - closedir(DIRHANDLE); - - # Make inspircd executable! - chmod 0744, 'inspircd'; - - if ($config{STATIC_LINK} eq "yes") { - print "Writing static-build \033[1;32msrc/Makefile\033[0m\n"; - write_static_makefile(); - write_static_modules_makefile(); - } elsif ($config{OSNAME} =~ /CYGWIN/) { - print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n"; - write_static_makefile(); - write_dynamic_modules_makefile(); - } else { - print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n"; - write_dynamic_makefile(); - write_dynamic_modules_makefile(); - } + # Make inspircd executable! + chmod 0744, 'inspircd'; + + if ($config{STATIC_LINK} eq "yes") { + print "Writing static-build \033[1;32msrc/Makefile\033[0m\n"; + write_static_makefile(); + write_static_modules_makefile(); + } elsif ($config{OSNAME} =~ /CYGWIN/) { + print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n"; + write_static_makefile(); + write_dynamic_modules_makefile(); + } else { + print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n"; + write_dynamic_makefile(); + write_dynamic_modules_makefile(); + } } sub getcompilerflags { |