Perl lib path
Posted: Sun Nov 15, 2009 4:59 pm
I tried to install under /usr/local/zoneminder-1.24.2 using the ./configure --prefix option. However, the perl 'use lib' paths are not correct when I do this. It installs to /usr/local/zoneminder-1.24.2/share/perl/5.10.0/ but the scripts in /usr/local/zoneminder-1.24.2/bin/*.pl all have 'use lib /usr/local/zoneminder-1.24.2/local/share/perl/5.10.2/', they have an extra '/local' after the prefix.
From the looks of it, I'm guessing my system's (Ubuntu 9.10) perl installation siteprefix != prefix, which the zoneminder configure script assumes. From looking at the generated scripts/Zoneminder/Makefile, it appears INSTALLSITELIB uses SITEPREFIX which defaults to PREFIX, but could be overridden.
I patched the configure.ac script to strip siteprefix from sitelib instead of installprefix.
You'll need to re-run `autoconfigure` after applying the patch.
Josh
From the looks of it, I'm guessing my system's (Ubuntu 9.10) perl installation siteprefix != prefix, which the zoneminder configure script assumes. From looking at the generated scripts/Zoneminder/Makefile, it appears INSTALLSITELIB uses SITEPREFIX which defaults to PREFIX, but could be overridden.
I patched the configure.ac script to strip siteprefix from sitelib instead of installprefix.
You'll need to re-run `autoconfigure` after applying the patch.
Josh
Code: Select all
diff -ur orig/ZoneMinder-1.24.2/configure.ac ZoneMinder-1.24.2/configure.ac
--- orig/ZoneMinder-1.24.2/configure.ac 2009-06-24 06:22:23.000000000 -0400
+++ ZoneMinder-1.24.2/configure.ac 2009-11-15 11:43:00.972748480 -0500
@@ -327,9 +327,9 @@
# Slight hack for non-standard perl install paths
if test "$prefix" != "NONE"; then
- PERL_PREFIX=`perl -V:installprefix | sed -e "s/.*='\(.*\)';/\1/"`
+ PERL_SITE_PREFIX=`perl -V:siteprefix | sed -e "s/.*='\(.*\)';/\1/"`
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
- PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_PREFIX||"`
+ PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
PERL_MM_PARMS="PREFIX=$prefix"
else