summaryrefslogtreecommitdiff
path: root/U/Extensions.U
diff options
context:
space:
mode:
Diffstat (limited to 'U/Extensions.U')
-rw-r--r--U/Extensions.U53
1 files changed, 38 insertions, 15 deletions
diff --git a/U/Extensions.U b/U/Extensions.U
index 3e10a38f31..ec14205ac1 100644
--- a/U/Extensions.U
+++ b/U/Extensions.U
@@ -1,12 +1,3 @@
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: Extensions.U,v$
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
@@ -17,31 +8,63 @@
?RCS:
?RCS: $Log: Extensions.U,v $
?RCS:
-?MAKE:extensions : find package
+?MAKE:extensions : find Myread i_dbm i_ndbm i_gdbm i_sdbm
?MAKE: -pick add $@ %<
?S:extensions:
?S: This variable holds a list of extension files we want to
?S: include in perl.
?S:.
+?T:xxx
?INIT:: List of extensions we want:
?INIT:extensions=''
?X:
-echo " "
case "$extensions" in
' '|'') echo "Looking for extensions..."
case "$find" in
*find*)
cd ..
- dflt="`$find ext -type f -name \*.xs -print`"
+ extensions=`$find ext -type f -name \*.xs -print`
+ set X $extensions
+ shift
+ extensions="$*"
cd UU
;;
- *) dflt='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
+ *) extensions='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
;;
esac
;;
-none) dflt='' ;;
-*) dflt="$extensions" ;;
+none) extensions='' ;;
+*) ;;
esac
+: Now see which are supported on this system.
+dflt=""
+for xxx in $extensions ; do
+ case "$xxx" in
+ *ODBM*) case "$i_dbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *NDBM*) case "$i_ndbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *GDBM*) case "$i_gdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *SDBM*) case "$i_sdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *) dflt="$dflt $xxx"
+ ;;
+ esac
+done
+
rp="What extensions do you wish to include?"
. ./myread
extensions="$ans"