wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.
authorMichael Adam <obnox@samba.org>
Mon, 25 Aug 2014 23:29:57 +0000 (01:29 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 5 Sep 2014 17:47:06 +0000 (19:47 +0200)
commit75c3e240e0703be8c86596e689e466b4dee5e85e
tree48c6e7ed35131ad78c4dfa107c93b8c82652cb17
parent6ad678166c85f0eb90b76ccf842d1aa8dcb6b41a
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>
buildtools/wafsamba/samba_perl.py [new file with mode: 0644]
buildtools/wafsamba/wafsamba.py