diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4.pm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4.pm b/source4/pidl/lib/Parse/Pidl/Samba4.pm new file mode 100644 index 0000000000..0a284aa85b --- /dev/null +++ b/source4/pidl/lib/Parse/Pidl/Samba4.pm @@ -0,0 +1,32 @@ +################################################### +# Common Samba4 functions +# Copyright jelmer@samba.org 2006 +# released under the GNU GPL + +package Parse::Pidl::Samba4; + +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(is_intree choose_header); + +use Parse::Pidl::Util qw(has_property); +use strict; + +use vars qw($VERSION); +$VERSION = '0.01'; + +sub is_intree() +{ + return -f "include/smb.h"; +} + +# Return an #include line depending on whether this build is an in-tree +# build or not. +sub choose_header($$) +{ + my ($in,$out) = @_; + return "#include \"$in\"" if (is_intree()); + return "#include <$out>"; +} + +1; |