- skip "no samba environment available, skipping compilation", 3
- if (system("pkg-config --exists ndr") != 0);
+ my $flags;
+ if (system("pkg-config --exists ndr") == 0 and !is_intree()) {
+ $flags = `pkg-config --libs --cflags ndr`;
+ } else {
+ skip "no samba environment available, skipping compilation", 3;
+ }