From 7a8675bc7c355f062650f283996d25b47996007d Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 17 Apr 2003 17:09:16 +0000 Subject: Implement -Dnoextensions=... and -Donlyextensions=... p4raw-id: //depot/perl@19253 --- Configure | 42 +++++++++++++++++++++++++++++++++++++++++- INSTALL | 16 ++++++++++++++-- 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$$ <&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 are removed from the list of extensions to build, +while the C 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 (if present), then C (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) -- cgit v1.2.1