summaryrefslogtreecommitdiff
path: root/configure.com
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2017-03-14 13:03:05 -0500
committerCraig A. Berry <craigberry@mac.com>2017-03-14 13:03:05 -0500
commitc61597183215b0dad8f01e5b9d60419ce3768b41 (patch)
tree0e8d364c65303cc1bb742c4a154cdc4b9286b332 /configure.com
parent2a0461a3212270dfe46563589edb8c721911bf57 (diff)
downloadperl-c61597183215b0dad8f01e5b9d60419ce3768b41.tar.gz
configure.com: default_inc_excludes_dot catch-up
This makes it configurable rather than hard-wired, and switches the default to "define" following 458ea8f78a2917, which did so on Windows, and 4634f4819b15eb18, which did so for platforms using Configure.
Diffstat (limited to 'configure.com')
-rw-r--r--configure.com25
1 files changed, 23 insertions, 2 deletions
diff --git a/configure.com b/configure.com
index 2cc41e167f..f54722eab8 100644
--- a/configure.com
+++ b/configure.com
@@ -927,7 +927,7 @@ $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitel
$ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|usecxx|use64bitall|use64bitint|"
$ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
$ config_symbols4 ="|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
-$ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|useshortenedsymbols|useversionedarchname"
+$ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|useshortenedsymbols|useversionedarchname|default_inc_excludes_dot"
$!
$ open/read CONFIG 'config_sh'
$ rd_conf_loop:
@@ -3019,6 +3019,27 @@ $ rp="What pager is used on your system? [''dflt'] "
$ GOSUB myread
$ pager = ans
$!
+$ bool_dflt = "y"
+$ IF F$TYPE(default_inc_excludes_dot) .NES. ""
+$ THEN
+$ IF .not. default_inc_excludes_dot .or. default_inc_excludes_dot .eqs. "undef" THEN bool_dflt = "n"
+$ ENDIF
+$ echo ""
+$ echo "Historically Perl has provided a final fallback of the current working"
+$ echo "directory '.' when searching for a library. This, however, can lead to"
+$ echo "problems when a Perl program which loads optional modules is called from"
+$ echo "a shared directory. This can lead to executing unexpected code."
+$ echo ""
+$ rp = "Exclude '.' from @INC by default? [''bool_dflt'] "
+$ GOSUB myread
+$ default_inc_excludes_dot = ans
+$ IF default_inc_excludes_dot
+$ THEN
+$ default_inc_excludes_dot = "define"
+$ ELSE
+$ default_inc_excludes_dot = "undef"
+$ ENDIF
+$!
$! update makefile here
$! echo4 "Updating makefile..."
$!
@@ -6449,7 +6470,7 @@ $ WC "db_version_minor='" + "'"
$ WC "db_version_patch='" + "'"
$ WC "dbgprefix='" + dbgprefix + "'"
$ WC "devtype='" + devtype + "'"
-$ WC "default_inc_excludes_dot='undef'"
+$ WC "default_inc_excludes_dot='" + default_inc_excludes_dot + "'"
$ WC "direntrytype='struct dirent'"
$ WC "dlext='" + dlext + "'"
$ WC "dlobj='" + dlobj + "'"