summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-04-28 18:44:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-04-28 18:44:15 +0000
commit3b777bb48ecd6a599e86393b690784822a7a696f (patch)
tree116536d1a09aa36f161654b95c270e6c6c52e6a5
parentdf0deb90068dea6e06bd6632928a2926975901ce (diff)
downloadperl-3b777bb48ecd6a599e86393b690784822a7a696f.tar.gz
support additional library locations via $Config{otherlibdirs}
(from Andy Dougherty) p4raw-id: //depot/perl@6001
-rwxr-xr-xConfigure39
-rw-r--r--INSTALL6
-rw-r--r--Porting/Glossary15
-rw-r--r--Porting/config.sh2
-rw-r--r--Porting/config_H10
-rw-r--r--config_h.SH10
-rw-r--r--epoc/config.sh2
-rw-r--r--perl.c4
-rw-r--r--vms/subconfigure.com4
-rw-r--r--vos/config.def2
-rwxr-xr-xvos/config_h.SH_orig10
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
14 files changed, 107 insertions, 3 deletions
diff --git a/Configure b/Configure
index 7c5c134069..a271f8c904 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 <<EOM
+
+Lastly, you can have perl look in other directories for extensions and
+modules in addition to those already specified.
+These directories will be searched after
+ $sitearch
+ $sitelib
+EOM
+test X"$vendorlib" != "X" && echo ' ' $vendorlib
+test X"$vendorarch" != "X" && echo ' ' $vendorarch
+echo ' '
+case "$otherlibdirs" in
+''|' ') dflt='none' ;;
+*) dflt="$otherlibdirs" ;;
+esac
+$cat <<EOM
+Enter a colon-separated set of extra paths to include in perl's @INC
+search path, or enter 'none' for no extra paths.
+
+EOM
+
+rp='Colon-separated list of additional directories for perl to search?'
+. ./myread
+case "$ans" in
+' '|''|none) otherlibdirs=' ' ;;
+*) otherlibdirs="$ans" ;;
+esac
+case "$otherlibdirs" in
+' ') val=$undef ;;
+*) val=$define ;;
+esac
+set d_perl_otherlibdirs
+eval $setvar
+
: Cruising for prototypes
echo " "
echo "Checking out function prototypes..." >&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 712c04f590..2b21edbea6 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 d60a168ca3..f5ac6da3fb 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 a658cc21e5..15d7893a06 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 130a613529..8657341118 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 08a1cf5ad1..cc35077c79 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2732,6 +2732,16 @@ sed <<!GROK!THIS! >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 b1fee71e06..714185a1e2 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 f81648c80d..dce558f362 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 479d3152ac..3e3a82837b 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 e66c87ac14..092d76ad3d 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 08a1cf5ad1..cc35077c79 100755
--- a/vos/config_h.SH_orig
+++ b/vos/config_h.SH_orig
@@ -2732,6 +2732,16 @@ sed <<!GROK!THIS! >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 e737ae7c5e..ae854b46f9 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 a926ac500a..f63813ed42 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 2437be2f85..db52680dcb 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=''