diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-27 14:23:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-27 14:23:27 +0000 |
commit | 2d7e463111c208c9ec8f3f406ddb3c035d4f737a (patch) | |
tree | 7b60856f4f39df0a1ce530d313f6201863d52ac1 | |
parent | 1b8b477efcececa6adcc12c34c891657aaef806c (diff) |
and make it work right...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9587 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | make/utilities.pm | 49 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 10 |
2 files changed, 18 insertions, 41 deletions
diff --git a/make/utilities.pm b/make/utilities.pm index 8b8241e04..fc7ce13d2 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -322,57 +322,38 @@ 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 ($line =~ /ifuname\(\!"(\w+)"\)/) { - 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 + my $uname = $1; + if ($uname eq $^O) { - $if_skip_lines = 0; + $line = ""; + return ""; } - return; - } - if ($if_skip_lines == 1) - { - return; + $line =~ s/ifuname\(\!"(.+?)"\)//; } - if ($line =~ /\$IfUname\s+(\w+)/) + if ($line =~ /ifuname\("(\w+)"\)/) { my $uname = $1; if ($uname ne $^O) { - $if_skip_lines = 1; - return; + $line = ""; + return ""; } + + $line =~ s/ifuname\("(.+?)"\)//; } - if ($line =~ /\$If:\s+(\w+)/) + if ($line =~ /if\("(\w+)"\)/) { if (defined $main::config{$1}) { - if (($main::config{$1} !~ /y/i) and ($main::config{$1} ne "1")) - { - $if_skip_lines = 1; - return; - } + return "" if (($main::config{$1} !~ /y/i) and ($main::config{$1} ne "1")) } + + $line =~ s/if\("(.+?)"\)//; } while ($line =~ /exec\("(.+?)"\)/) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index d3927eac5..cea32b8fa 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -35,13 +35,9 @@ /* $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 */ +/* $LinkerFlags: ifuname("freebsd") -lssl -lcrypto */ +/* $CompileFlags: ifuname(!"freebsd") pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */ +/* $LinkerFlags: ifuname(!"freebsd") rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto -ldl") */ /* $ModDep: transport.h */ /* $NoPedantic */ |