Patch by Robert Scheck <robert@fedoraproject.org> for Zarafa >= 6.30.3, which
replaces the hardcoded perl directories by correct ones (in a dynamic way). Only
Debian and Ubuntu have ExtUtils in /usr/share, openSUSE, Fedora and RHEL/CentOS
use /usr/lib. So let us use the correct way to detect the directory.
This patch should be an advantage to OSS users on non-Debian distributions when
using Perl API, as the correct directory will get picked up.
--- zarafa-6.30.0/configure.ac 2009-07-20 18:41:07.000000000 +0200
+++ zarafa-6.30.0/configure.ac.perl 2009-10-16 00:23:52.000000000 +0200
@@ -127,6 +127,22 @@
# build perl stuff
AC_ARG_ENABLE(perl, AC_HELP_STRING([--enable-perl], [enable building perl bindings]), [want_perl=${enableval}], [want_perl=no])
AM_CONDITIONAL(WITH_PERL, test "$want_perl" = "yes")
+if test "x$want_perl" = "xyes"; then
+ AC_PATH_PROG([PERL], [perl], [no])
+ if test "x$PERL" = "xno"; then
+ AC_MSG_ERROR([perl is required for building perl bindings])
+ fi
+
+ AC_MSG_CHECKING([for perl installarchlib])
+ PERL_ARCHLIB=`$PERL -V:installarchlib | sed -e "s/^.*='//" -e "s/';$//"`
+ AC_MSG_RESULT([$PERL_ARCHLIB])
+ AC_SUBST(PERL_ARCHLIB)
+
+ AC_MSG_CHECKING([for perl privlib])
+ PERL_PRIVLIB=`$PERL -V:privlib | sed -e "s/^.*='//" -e "s/';$//"`
+ AC_MSG_RESULT([$PERL_PRIVLIB])
+ AC_SUBST(PERL_PRIVLIB)
+fi
# testtools require ncurses
if test "$want_tests" = "yes"; then
--- zarafa-6.30.0/perl/Makefile.am 2009-07-20 18:41:06.000000000 +0200
+++ zarafa-6.30.0/perl/Makefile.am.perl 2009-10-16 00:24:51.000000000 +0200
@@ -1,7 +1,6 @@
lib_LTLIBRARIES = libperlmapi.la
-PVERSION=5.8.8
-AM_CPPFLAGS = $(DEBUGFLAGS) -DLINUX -I$(top_srcdir)/mapi4linux/include -I$(top_srcdir)/provider/common -I${top_srcdir}/common -I/usr/lib/perl/$(PVERSION)/CORE
+AM_CPPFLAGS = $(DEBUGFLAGS) -DLINUX -I$(top_srcdir)/mapi4linux/include -I$(top_srcdir)/provider/common -I${top_srcdir}/common -I$(PERL_ARCHLIB)/CORE
libperlmapi_la_LIBADD = ${top_builddir}/mapi4linux/src/libmapi.la \
${top_builddir}/common/libcommon_mapi.la \
@@ -12,7 +11,7 @@
CLEANFILES = MAPI.cpp
.xs.cpp: typemap
- xsubpp -noprototypes -nolinenumbers -C++ -typemap /usr/share/perl/$(PVERSION)/ExtUtils/typemap $< > $@; \
+ xsubpp -noprototypes -nolinenumbers -C++ -typemap $(PERL_PRIVLIB)/ExtUtils/typemap $< > $@; \
if [ $$? -ne 0 ]; then rm $@; fi
check-syntax: