summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-17 17:09:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-17 17:09:16 +0000
commit7a8675bc7c355f062650f283996d25b47996007d (patch)
treed9d812f1046a6a8fe5e955aa425273e71c9f21fa
parentd2e84f4c6d50974396b5eb49a584da41841a6138 (diff)
downloadperl-7a8675bc7c355f062650f283996d25b47996007d.tar.gz
Implement -Dnoextensions=... and -Donlyextensions=...
p4raw-id: //depot/perl@19253
-rwxr-xr-xConfigure42
-rw-r--r--INSTALL16
2 files changed, 55 insertions, 3 deletions
diff --git a/Configure b/Configure
index 14bba08a6a..5099566284 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Apr 17 18:50:57 EET DST 2003 [metaconfig 3.0 PL70]
+# Generated on Thu Apr 17 20:57:08 EET DST 2003 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -20200,6 +20200,46 @@ set X $dynamic_ext $static_ext $nonxs_ext
shift
extensions="$*"
+case "$onlyextensions" in
+'') ;;
+*) keepextensions=''
+ echo "You have requested that only certains extensions be included..." >&4
+ for i in $onlyextensions; do
+ case " $extensions " in
+ *" $i "*)
+ echo "Keeping extension $i."
+ keepextensions="$keepextensions $i"
+ ;;
+ *) echo "Ignoring extension $i." ;;
+ esac
+ done
+ extensions="$keepextensions"
+ ;;
+esac
+
+case "$noextensions" in
+'') ;;
+*) keepextensions=''
+ echo "You have requested that certain extensions be ignored..." >&4
+ for i in $extensions; do
+ case " $i " in
+ " $noextensions ") echo "Ignoring extension $i." ;;
+ *) echo "Keeping extension $i.";
+ keepextensions="$keepextensions $i"
+ ;;
+ esac
+ done
+ extensions="$keepextensions"
+ ;;
+esac
+
+case "$extensions" in
+*"_File "*" Fcntl "*" IO "*) ;;
+*) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4
+ echo "WARNING: The Perl you are building will be quite crippled." >& 4
+ ;;
+esac
+
: Remove libraries needed only for extensions
: The appropriate ext/Foo/Makefile.PL will add them back in, if necessary.
: The exception is SunOS 4.x, which needs them.
diff --git a/INSTALL b/INSTALL
index 9a661fde30..bebc24f86d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1049,8 +1049,20 @@ Even if you do not have dynamic loading, you must still build the
DynaLoader extension; you should just build the stub dl_none.xs
version. (Configure will suggest this as the default.)
-In summary, here are the Configure command-line variables you can set
-to turn off various extensions. All others are included by default.
+To disable certain extensions so that they are not built, use
+the -Dnoextensions=... and -Donlyextensions=... options. They both
+accept a space-separated list of extensions. The extensions listed
+in C<noextensions> are removed from the list of extensions to build,
+while the C<onlyextensions> is rather more severe and builds only
+the listed extensions. The latter should be used with extreme caution
+since certain extensions are used by many other extensions and modules:
+such modules include Fcntl and IO. The order of processing these
+options is first C<only> (if present), then C<no> (if present).
+
+Another, older way to turn off various extensions (which is still good
+to know if you have to work with older Perl) exists. Here are the
+Configure command-line variables you can set to turn off various
+extensions. All others are included by default.
DB_File i_db
DynaLoader (Must always be included as a static extension)