From: Gurusamy Sarathy Date: Fri, 28 Apr 2000 18:44:15 +0000 (+0000) Subject: support additional library locations via $Config{otherlibdirs} X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b777bb48ecd6a599e86393b690784822a7a696f;p=p5sagit%2Fp5-mst-13.2.git support additional library locations via $Config{otherlibdirs} (from Andy Dougherty) p4raw-id: //depot/perl@6001 --- diff --git a/Configure b/Configure index 7c5c134..a271f8c 100755 --- a/Configure +++ b/Configure @@ -779,6 +779,8 @@ hostcat='' passcat='' orderlib='' ranlib='' +d_perl_otherlibdirs='' +otherlibdirs='' package='' spackage='' pager='' @@ -5370,6 +5372,41 @@ else installvendorarch="$vendorarchexp" fi +: Final catch-all directories to search +$cat <&4 @@ -15303,6 +15340,7 @@ d_oldsock='$d_oldsock' d_open3='$d_open3' d_pathconf='$d_pathconf' d_pause='$d_pause' +d_perl_otherlibdirs='$d_perl_otherlibdirs' d_phostname='$d_phostname' d_pipe='$d_pipe' d_poll='$d_poll' @@ -15661,6 +15699,7 @@ optimize='$optimize' orderlib='$orderlib' osname='$osname' osvers='$osvers' +otherlibdirs='$otherlibdirs' package='$package' pager='$pager' passcat='$passcat' diff --git a/INSTALL b/INSTALL index 712c04f..2b21edb 100644 --- a/INSTALL +++ b/INSTALL @@ -497,9 +497,9 @@ network. One way to do that would be something like As a final catch-all, Configure also offers an $otherlibdirs variable. This variable contains a colon-separated list of additional -directories to add to @INC. By default, it will be set to -$prefix/site_perl if Configure detects that you have 5.004-era modules -installed there. However, you can set it to anything you like. +directories to add to @INC. By default, it will be empty. +Perl will search these directories (including architecture and +version-specific subdirectories) for add-on modules and extensions. =item Man Pages diff --git a/Porting/Glossary b/Porting/Glossary index d60a168..f5ac6da 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1052,6 +1052,11 @@ d_pause (d_pause.U): indicates to the C program that the pause() routine is available to suspend a process until a signal is received. +d_perl_otherlibdirs (otherlibdirs.U): + This variable conditionally defines PERL_OTHERLIBDIRS, which + contains a colon-separated set of paths for the perl binary to + include in @INC. See also otherlibdirs. + d_phostname (d_gethname.U): This variable conditionally defines the HAS_PHOSTNAME symbol, which contains the shell command which, when fed to popen(), may be @@ -2757,6 +2762,16 @@ osvers (Oldconfig.U): same for this package, hints files might just be os_4.0 or os_4.1, etc., not keeping separate files for each little release. +otherlibdirs (otherlibdirs.U): + This variable contains a colon-separated set of paths for the perl + binary to search for additional library files or modules. + These directories will be tacked to the end of @INC. + Perl will automatically search below each path for version- + and architecture-specific directories. See inc_version_list + for more details. + A value of ' ' means 'none' and is used to preserve this value + for the next run through Configure. + package (package.U): This variable contains the name of the package being constructed. It is primarily intended for the use of later Configure units. diff --git a/Porting/config.sh b/Porting/config.sh index a658cc2..15d7893 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -253,6 +253,7 @@ d_oldsock='undef' d_open3='define' d_pathconf='define' d_pause='define' +d_perl_otherlibdirs='undef' d_phostname='undef' d_pipe='define' d_poll='define' @@ -611,6 +612,7 @@ optimize='-O' orderlib='false' osname='dec_osf' osvers='4.0' +otherlibdirs=' ' package='perl5' pager='/c/bin/less' passcat='cat /etc/passwd' diff --git a/Porting/config_H b/Porting/config_H index 130a613..8657341 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -2495,6 +2495,16 @@ */ #define INSTALL_USR_BIN_PERL /**/ +/* PERL_OTHERLIBDIRS: + * This variable contains a colon-separated set of paths for the perl + * binary to search for additional library files or modules. + * These directories will be tacked to the end of @INC. + * Perl will automatically search below each path for version- + * and architecture-specific directories. See PERL_INC_VERSION_LIST + * for more details. + */ +/*#define PERL_OTHERLIBDIRS " " / **/ + /* PERL_PRIfldbl: * This symbol, if defined, contains the string used by stdio to * format long doubles (format 'f') for output. diff --git a/config_h.SH b/config_h.SH index 08a1cf5..cc35077 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2732,6 +2732,16 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define Pid_t $pidtype /* PID type */ +/* PERL_OTHERLIBDIRS: + * This variable contains a colon-separated set of paths for the perl + * binary to search for additional library files or modules. + * These directories will be tacked to the end of @INC. + * Perl will automatically search below each path for version- + * and architecture-specific directories. See PERL_INC_VERSION_LIST + * for more details. + */ +#$d_perl_otherlibdirs PERL_OTHERLIBDIRS "$otherlibdirs" /**/ + /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's diff --git a/epoc/config.sh b/epoc/config.sh index b1fee71..714185a 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -247,6 +247,7 @@ d_oldsock='undef' d_open3='define' d_pathconf='undef' d_pause='undef' +d_perl_otherlibdirs='undef' d_phostname='undef' d_pipe='undef' d_poll='undef' @@ -569,6 +570,7 @@ optimize='-fomit-frame-pointer -DNDEBUG -O' orderlib='' osname='epoc' osvers='' +otherlibdirs='' package='' pager='' passcat='' diff --git a/perl.c b/perl.c index f81648c..dce558f 100644 --- a/perl.c +++ b/perl.c @@ -3324,6 +3324,10 @@ S_init_perllib(pTHX) incpush(PERL_VENDORLIB_STEM, FALSE, TRUE); #endif +#ifdef PERL_OTHERLIBDIRS + incpush(PERL_OTHERLIBDIRS, TRUE, TRUE); +#endif + if (!PL_tainting) incpush(".", FALSE, FALSE); } diff --git a/vms/subconfigure.com b/vms/subconfigure.com index 479d315..3e3a828 100644 --- a/vms/subconfigure.com +++ b/vms/subconfigure.com @@ -401,6 +401,8 @@ $ perl_lseektype="int" $ perl_i_values="undef" $ perl_malloctype="void *" $ perl_freetype="void" +$ perl_d_perl_otherlibdirs="undef" +$ perl_otherlibdirs="" $ IF mymalloc $ THEN $ perl_d_mymalloc="define" @@ -3820,6 +3822,8 @@ $ WC "d_mkdir='" + perl_d_mkdir + "'" $ WC "d_msg='" + perl_d_msg + "'" $ WC "d_open3='" + perl_d_open3 + "'" $ WC "d_poll='" + perl_d_poll + "'" +$ WC "d_perl_otherlibdirs='" + perl_d_perl_otherlibdirs + "'" +$ WC "otherlibdirs='" + perl_otherlibdirs + "'" $ WC "d_readdir='" + perl_d_readdir + "'" $ WC "d_seekdir='" + perl_d_seekdir + "'" $ WC "d_telldir='" + perl_d_telldir + "'" diff --git a/vos/config.def b/vos/config.def index e66c87a..092d76a 100644 --- a/vos/config.def +++ b/vos/config.def @@ -161,6 +161,7 @@ $d_old_pthread_create_joinable='undef' $d_oldpthreads='undef' $d_open3='define' $d_pathconf='define' +$d_perl_otherlibdirs='undef' $d_pause='define' $d_phostname='undef' $d_pipe='define' @@ -392,6 +393,7 @@ $nvtype='double' $o_nonblock='O_NONBLOCK' $old_pthread_create_joinable='' $osname='VOS' +$otherlibdirs='' $package='perl5' $pidtype='pid_t' $pm_apiversion='5.00563' diff --git a/vos/config_h.SH_orig b/vos/config_h.SH_orig index 08a1cf5..cc35077 100755 --- a/vos/config_h.SH_orig +++ b/vos/config_h.SH_orig @@ -2732,6 +2732,16 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define Pid_t $pidtype /* PID type */ +/* PERL_OTHERLIBDIRS: + * This variable contains a colon-separated set of paths for the perl + * binary to search for additional library files or modules. + * These directories will be tacked to the end of @INC. + * Perl will automatically search below each path for version- + * and architecture-specific directories. See PERL_INC_VERSION_LIST + * for more details. + */ +#$d_perl_otherlibdirs PERL_OTHERLIBDIRS "$otherlibdirs" /**/ + /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's diff --git a/win32/config.bc b/win32/config.bc index e737ae7..ae854b4 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -242,6 +242,7 @@ d_oldsock='undef' d_open3='undef' d_pathconf='undef' d_pause='define' +d_perl_otherlibdirs='undef' d_phostname='undef' d_pipe='define' d_poll='undef' @@ -602,6 +603,7 @@ optimize='-O2' orderlib='false' osname='MSWin32' osvers='4.0' +otherlibdirs='' package='perl5' pager='more /e' passcat='' diff --git a/win32/config.gc b/win32/config.gc index a926ac5..f63813e 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -242,6 +242,7 @@ d_oldsock='undef' d_open3='undef' d_pathconf='undef' d_pause='define' +d_perl_otherlibdirs='undef' d_phostname='undef' d_pipe='define' d_poll='undef' @@ -602,6 +603,7 @@ optimize='-O2' orderlib='false' osname='MSWin32' osvers='4.0' +otherlibdirs='' package='perl5' pager='more /e' passcat='' diff --git a/win32/config.vc b/win32/config.vc index 2437be2..db52680 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -242,6 +242,7 @@ d_oldsock='undef' d_open3='undef' d_pathconf='undef' d_pause='define' +d_perl_otherlibdirs='undef' d_phostname='undef' d_pipe='define' d_poll='undef' @@ -602,6 +603,7 @@ optimize='-O' orderlib='false' osname='MSWin32' osvers='4.0' +otherlibdirs='' package='perl5' pager='more /e' passcat=''