]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add some stuff from the freebsd port based on ideas by Matthew Seaman which allow...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 27 Apr 2008 14:02:30 +0000 (14:02 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 27 Apr 2008 14:02:30 +0000 (14:02 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9586 e03df62e-2008-0410-955e-edbf42e46eb7

make/utilities.pm
src/modules/extra/m_ssl_openssl.cpp

index 9b52e4e944ae1b81d6249ff9f961f8ddc95ce339..8b8241e048b8f1d3d4d38f9b7a84c10caeb6eade 100644 (file)
@@ -30,6 +30,7 @@ our @EXPORT = qw(make_rpath pkgconfig_get_include_dirs pkgconfig_get_lib_dirs pk
 # \e[1;32msrc/Makefile\e[0m
 
 my %already_added = ();
+my $if_skip_lines = 0;
 
 sub promptstring($$$$$)
 {
@@ -320,6 +321,60 @@ sub translate_functions($$)
                {
                        die "Developers should no longer use backticks in configuration macros. Please use exec() and eval() macros instead. Offending line: $line (In module: $module)";
                }
+
+               if ($line =~ /\$EndIf/)
+               {
+                       if ($if_skip_lines == 1)
+                       {
+                               $if_skip_lines = 0;
+                               return;
+                       }
+                       else
+                       {
+                               die "\$EndIf found when not in \$If/\$IfUname in $module";
+                       }
+               }
+
+               if ($line =~ /\$Else/)
+               {
+                       if ($if_skip_lines == 0)
+                       {
+                               $if_skip_lines = 1;
+                       }
+                       else
+                       {
+                               $if_skip_lines = 0;
+                       }
+                       return;
+               }
+
+               if ($if_skip_lines == 1)
+               {
+                       return;
+               }
+
+               if ($line =~ /\$IfUname\s+(\w+)/)
+               {
+                       my $uname = $1;
+                       if ($uname ne $^O)
+                       {
+                               $if_skip_lines = 1;
+                               return;
+                       }
+               }
+
+               if ($line =~ /\$If:\s+(\w+)/)
+               {
+                       if (defined $main::config{$1})
+                       {
+                               if (($main::config{$1} !~ /y/i) and ($main::config{$1} ne "1"))
+                               {
+                                       $if_skip_lines = 1;
+                                       return;
+                               }
+                       }
+               }
+
                while ($line =~ /exec\("(.+?)"\)/)
                {
                        print "Executing program for module \e[1;32m$module\e[0m ... \e[1;32m$1\e[0m\n";
index b80bef840743c48f3006e47816080b955b033f6a..d3927eac5e54c4d0b9d4fc1b97c1cca01fa8bed4 100644 (file)
 #endif
 
 /* $ModDesc: Provides SSL support for clients */
+
+
+/* $IfUname freebsd */
+/* $LinkerFlags: -lssl -lcrypto */
+/* $Else */
 /* $CompileFlags: pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */
 /* $LinkerFlags: rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto -ldl") */
+/* $EndIf */
+
 /* $ModDep: transport.h */
 /* $NoPedantic */
 /* $CopyInstall: conf/key.pem $(CONPATH) */
 /* $CopyInstall: conf/cert.pem $(CONPATH) */
 
+
 enum issl_status { ISSL_NONE, ISSL_HANDSHAKING, ISSL_OPEN };
 enum issl_io_status { ISSL_WRITE, ISSL_READ };