wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.
commitdff2c03b038b8bf1514b1cf80474a4272e64eefd
authorMichael Adam <obnox@samba.org>
Mon, 25 Aug 2014 23:29:57 +0000 (26 01:29 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 17 Nov 2014 20:21:12 +0000 (17 21:21 +0100)
treee6bc34fe60194f056460b5017e8d0f75d1c41589
parent78cb744682c13c6f7674db097cde4d897878b171
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