X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Futilities.pm;h=fdc4c4c7bdc1932e2bfc2452ab4854fb5e092be2;hb=fe9c0cfc2a146d62967ad611682e7bc464ef1dfd;hp=fc7ce13d29a3acff955a40a351e06d72121e1348;hpb=2d7e463111c208c9ec8f3f406ddb3c035d4f737a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/utilities.pm b/make/utilities.pm index fc7ce13d2..fdc4c4c7b 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -114,7 +114,6 @@ sub pkgconfig_get_include_dirs($$$;$) my $v = `pkg-config --modversion $packagename 2>/dev/null`; my $ret = `pkg-config --cflags $packagename 2>/dev/null`; my $foo = ""; - if ((!defined $v) || ($v eq "")) { $foo = `locate "$headername" | head -n 1`; @@ -350,12 +349,36 @@ sub translate_functions($$) { if (defined $main::config{$1}) { - return "" if (($main::config{$1} !~ /y/i) and ($main::config{$1} ne "1")) + if (($main::config{$1} !~ /y/i) and ($main::config{$1} ne "1")) + { + $line = ""; + return ""; + } } $line =~ s/if\("(.+?)"\)//; } + if ($line =~ /if\(\!"(\w+)"\)/) + { + if (!exists $main::config{$1}) + { + $line = ""; + return ""; + } + else + { + if (defined $1) + { + if (exists ($main::config{$1}) and (($main::config{$1} =~ /y/i) or ($main::config{$1} eq "1"))) + { + $line = ""; + return ""; + } + } + } + $line =~ s/if\(\!"(.+?)"\)//; + } while ($line =~ /exec\("(.+?)"\)/) { print "Executing program for module \e[1;32m$module\e[0m ... \e[1;32m$1\e[0m\n"; @@ -422,7 +445,7 @@ sub translate_functions($$) if ($@) { my $err = $@; - $err =~ s/at .+? line \d+.*//g; + #$err =~ s/at .+? line \d+.*//g; print "\n\nConfiguration failed. The following error occured:\n\n$err\n"; exit; }