wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.
commit0a7eb79f8435ab0ded1b562f1e07921c01312416
authorMichael Adam <obnox@samba.org>
Mon, 25 Aug 2014 23:29:57 +0000 (26 01:29 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 18 Nov 2014 20:09:04 +0000 (18 21:09 +0100)
treeda38a4f54a5b488a8e2ddc3bab28da0ee835da3e
parent8e22d028f6ecd5d1f3328b2a29bf8bc4db6fee7e
wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.

This checks for the perl binary, sets PERL and PERL_SPECIFIED
as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR.

We want to avoid installing the perl modules outside the prefix.
I.e. generally,the perl modules should be installed
under "$prefix/share/perl5".

This improves the fixes for bug #10472.

The new strategy for automatically setting the paths is this:

- if the prefix equals perl's vendorprefix, then
  - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir
  - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir
- otherwise:
  - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5
    (usually ${PREFIX}/share/perl5)
  - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5
    (usually ${PREFIX}/lib/perl5)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 75c3e240e0703be8c86596e689e466b4dee5e85e)
buildtools/wafsamba/samba_perl.py [new file with mode: 0644]
buildtools/wafsamba/wafsamba.py