diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-27 14:02:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-27 14:02:30 +0000 |
commit | 1b8b477efcececa6adcc12c34c891657aaef806c (patch) | |
tree | 7671e41cce3bc06c9de118dc488735b1d659f161 /make | |
parent | e6a76f838a204e4e6e7333ce66345831cc65799d (diff) |
Add some stuff from the freebsd port based on ideas by Matthew Seaman which allow inspircd to use the base version of openssl on freebsd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9586 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make')
-rw-r--r-- | make/utilities.pm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/make/utilities.pm b/make/utilities.pm index 9b52e4e94..8b8241e04 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -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"; |