diff options
-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 */ |