On Tue, Jul 18, 2006 at 02:09:26AM -0700, Joshua Hoblitt wrote: > # New Ticket Created by Joshua Hoblitt > # Please include the string: [perl #39860] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39860 > > > > LIB_DIR gets setup as part of the configure process which is then passed > to the install script as --libdir=$(LIB_DIR). The solution is to make > Configure.pl more autotools like in that it can accept --libdir, > --datadir, etc. > > -J > > --
Attached is a patch to implement autoconf compatible installation path options. Keep in mind that this more or less just implements the options. While all option values are stored in Parrot::Config only a few of the values are currently used in the build process (prefix, libdir, etc.). I'd like to get back several reports that this patch works OK for people and actually resolves their installation issues before applying it (please, nobody get trigger happy). I suspect changes to root.in and the install script will be necessary to make everyone happy. The new options will also need to be documented in Configure.pl Cheers, -J --
Index: Configure.pl =================================================================== --- Configure.pl (revision 13980) +++ Configure.pl (working copy) @@ -385,6 +385,7 @@ my @steps = qw( init::manifest init::defaults + init::install init::miniparrot init::hints init::headers Index: config/init/install.pm =================================================================== --- config/init/install.pm (revision 0) +++ config/init/install.pm (revision 0) @@ -0,0 +1,121 @@ +# Copyright (C) 2001-2005, The Perl Foundation. +# $Id: defaults.pm 13597 2006-07-27 16:31:35Z leo $ + +=head1 NAME + +config/init/install.pm - autoconf compatabile installation paths + +=head1 DESCRIPTION + +Sets up the installation paths + +=cut + +# taken from: +# +# autoconf (GNU Autoconf) 2.59 +# Written by David J. MacKenzie and Akim Demaille. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# Installation directories: +# --prefix=PREFIX install architecture-independent files in PREFIX +# [/usr/local] +# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +# [PREFIX] +# +# By default, `make install' will install all the files in +# `/usr/local/bin', `/usr/local/lib' etc. You can specify +# an installation prefix other than `/usr/local' using `--prefix', +# for instance `--prefix=$HOME'. +# +# For better control, use the options below. +# +# Fine tuning of the installation directories: +# --bindir=DIR user executables [EPREFIX/bin] +# --sbindir=DIR system admin executables [EPREFIX/sbin] +# --libexecdir=DIR program executables [EPREFIX/libexec] +# --datadir=DIR read-only architecture-independent data [PREFIX/share] +# --sysconfdir=DIR read-only single-machine data [PREFIX/etc] +# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] +# --localstatedir=DIR modifiable single-machine data [PREFIX/var] +# --libdir=DIR object code libraries [EPREFIX/lib] +# --includedir=DIR C header files [PREFIX/include] +# --oldincludedir=DIR C header files for non-gcc [/usr/include] +# --infodir=DIR info documentation [PREFIX/info] +# --mandir=DIR man documentation [PREFIX/man] + +package init::install; + +use strict; +use vars qw($description @args); + +use base qw(Parrot::Configure::Step::Base); + +use Parrot::Configure::Step; + +$description = q{Setting up installation paths}; + [EMAIL PROTECTED] = qw( prefix exec-prefix bindir sbindir libexecdir datadir sysconfdir + sharedstatedir localstatedir libdir includedir oldincludedir infodir + mandir ); + +sub runstep +{ + my ($self, $conf) = @_; + + my $prefix = $conf->options->get('prefix') || "/usr/local"; + my $eprefix = $conf->options->get('exec-prefix') || $prefix; +# --bindir=DIR user executables [EPREFIX/bin] + my $bindir = $conf->options->get('bindir') || $eprefix . "/bin"; +# --sbindir=DIR system admin executables [EPREFIX/sbin] + my $sbindir = $conf->options->get('sbindir') || $eprefix . "/sbin"; +# --libexecdir=DIR program executables [EPREFIX/libexec] + my $sbindir = $conf->options->get('sbindir') || $eprefix . "/libexec"; +# --datadir=DIR read-only architecture-independent data [PREFIX/share] + my $datadir = $conf->options->get('datadir') || $prefix . "/share"; +# --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + my $sysconfdir = $conf->options->get('sysconfdir') || $prefix . "/etc"; +# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + my $sharedstatedir = $conf->options->get('sharedstatedir') + || $prefix . "/com"; +# --localstatedir=DIR modifiable single-machine data [PREFIX/var] + my $localstatedir = $conf->options->get('localstatedir') + || $prefix . "/var"; +# --libdir=DIR object code libraries [EPREFIX/lib] + my $libdir = $conf->options->get('libdir') || $eprefix . "/lib"; +# --includedir=DIR C header files [PREFIX/include] + my $includedir = $conf->options->get('includedir') || $prefix . "/include"; +# --oldincludedir=DIR C header files f|| non-gcc [/usr/include] + my $oldincludedir = $conf->options->get('oldincludedir') || "/usr/include"; +# --infodir=DIR info documentation [PREFIX/info] + my $infodir = $conf->options->get('infodir') || $prefix . "/info"; +# --mandir=DIR man documentation [PREFIX/man] + my $mandir = $conf->options->get('mandir') || $prefix . "/man"; + + $conf->data->set( + prefix => $prefix, + exec_prefix => $eprefix, + bin_dir => $bindir, # deprecated + bindir => $bindir, + sbindir => $sbindir, + datadir => $datadir, + sysconfdir => $sysconfdir, + sharedstatedir => $sharedstatedir, + localstatedir => $localstatedir, + libdir => $libdir, + lib_dir => $libdir, # deprecated + includedir => $includedir, + include_dir => $includedir, # deprecated + oldincludedir => $oldincludedir, + infodir => $infodir, + mandir => $mandir, + # parrot internal use only + doc_dir => $datadir . "/doc/parrot", + ); + + return $self; +} + +1; Index: config/init/defaults.pm =================================================================== --- config/init/defaults.pm (revision 13980) +++ config/init/defaults.pm (working copy) @@ -24,7 +24,7 @@ $description = q{Setting up Configure's default values}; [EMAIL PROTECTED] = qw(debugging optimize profile verbose prefix m); [EMAIL PROTECTED] = qw(debugging optimize profile verbose m); sub runstep { @@ -187,21 +187,6 @@ ); - my $prefix = $conf->options->get('prefix'); - unless (defined $prefix) { - my $VERSION = $conf->data->get('VERSION'); - my $DEVEL = $conf->data->get('DEVEL'); - $prefix = "/usr/local"; - } - $conf->data->set( - prefix => $prefix, - exec_prefix => $prefix, - bin_dir => $prefix . "/bin", - lib_dir => $prefix . "/lib", - include_dir => $prefix . "/include", - doc_dir => $prefix . "/share/doc/parrot", - ); - # add profiling if needed # FIXME gcc syntax # we should have this in the hints files e.g. cc_profile
pgp0QHinrwiKl.pgp
Description: PGP signature