1 ?RCS: $Id: Extensions.U,v$
3 ?RCS: Copyright (c) 1996-1998, Andy Dougherty
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?RCS: $Log: Extensions.U,v $
10 ?MAKE:known_extensions extensions dynamic_ext static_ext nonxs_ext \
11 useposix useopcode : \
12 Myread hint usedl d_sem d_socket i_db i_dbm i_rpcsvcdbm i_gdbm \
13 i_ndbm usethreads package test cat rsrc d_msg d_shm osname use64bits \
15 ?MAKE: -pick add $@ %<
18 ?S: This variable holds a list of all XS extensions included in
22 ?S: This variable holds a list of XS extension files we want to
23 ?S: link dynamically into the package. It is used by Makefile.
26 ?S: This variable holds a list of XS extension files we want to
27 ?S: link statically into the package. It is used by Makefile.
30 ?S: This variable holds a list of all non-xs extensions included
31 ?S: in the package. All of them will be built.
34 ?S: This variable holds a list of all extension files (both XS and
35 ?S: non-xs linked into the package. It is propagated to Config.pm
36 ?S: and is typically used to test whether a particular extesion
40 ?S: This variable holds either 'true' or 'false' to indicate
41 ?S: whether the POSIX extension should be used. The sole
42 ?S: use for this currently is to allow an easy mechanism
43 ?S: for hints files to indicate that POSIX will not compile
44 ?S: on a particular system.
47 ?S: This variable holds either 'true' or 'false' to indicate
48 ?S: whether the Opcode extension should be used. The sole
49 ?S: use for this currently is to allow an easy mechanism
50 ?S: for users to skip the Opcode extension from the Configure
53 ?T:xxx avail_ext tdir nonxs_extensions find_extensions
54 ?INIT:: set useposix=false in your hint file to disable the POSIX extension.
56 ?INIT:: set useopcode=false in your hint file to disable the Opcode extension.
59 echo "Looking for extensions..." >&4
60 : If we are using the old config.sh, known_extensions may contain
61 : old or inaccurate or duplicate values.
64 : We do not use find because it might not be available.
65 : We do not just use MANIFEST because the user may have dropped
66 : some additional extensions into the source tree and expect them
69 : Function to recursively find available extensions, ignoring DynaLoader
70 : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
74 DynaLoader|dynaload) ;;
76 if $test -f $xxx/$xxx.xs; then
77 known_extensions="$known_extensions $1$xxx";
78 elif $test -f $xxx/Makefile.PL; then
79 nonxs_extensions="$nonxs_extensions $1$xxx";
81 if $test -d $xxx -a $# -lt 10; then
84 eval $find_extensions;
97 set X $nonxs_extensions
100 set X $known_extensions
102 known_extensions="$*"
105 : Now see which are supported on this system.
106 ?X: avail_ext lists available XS extensions.
108 for xxx in $known_extensions ; do
110 ?X: Handle possible DOS 8.3 filename and case alterations
113 $define) avail_ext="$avail_ext $xxx" ;;
118 $define) avail_ext="$avail_ext $xxx" ;;
124 case "$osname-$use64bits" in
127 *-lndbm*) avail_ext="$avail_ext $xxx" ;;
130 *) avail_ext="$avail_ext $xxx" ;;
136 case "${i_dbm}${i_rpcsvcdbm}" in
138 case "$osname-$use64bits" in
141 *-ldbm*) avail_ext="$avail_ext $xxx" ;;
144 *) avail_ext="$avail_ext $xxx" ;;
151 true|define|y) avail_ext="$avail_ext $xxx" ;;
156 true|define|y) avail_ext="$avail_ext $xxx" ;;
161 true|$define|y) avail_ext="$avail_ext $xxx" ;;
165 case "$usethreads" in
166 true|$define|y) avail_ext="$avail_ext $xxx" ;;
170 : XXX Do we need a useipcsysv variable here
171 case "${d_msg}${d_sem}${d_shm}" in
172 *"${define}"*) avail_ext="$avail_ext $xxx" ;;
175 *) avail_ext="$avail_ext $xxx"
184 : Now see which nonxs extensions are supported on this system.
185 : For now assume all are.
187 for xxx in $nonxs_extensions ; do
189 *) nonxs_ext="$nonxs_ext $xxx"
201 A number of extensions are supplied with $package. You may choose to
202 compile these extensions for dynamic loading (the default), compile
203 them into the $package executable (static loading), or not include
204 them at all. Answer "none" to include no extensions.
205 Note that DynaLoader is always built and need not be mentioned here.
208 case "$dynamic_ext" in
209 '') dflt="$avail_ext" ;;
210 *) dflt="$dynamic_ext"
211 # Perhaps we are reusing an old out-of-date config.sh.
214 if test X"$dynamic_ext" != X"$avail_ext"; then
216 NOTICE: Your previous config.sh list may be incorrect.
217 The extensions now available to you are
219 but the default list from your previous config.sh is
231 rp="What extensions do you wish to load dynamically?"
234 ?X: Use ' ' so a subsequent Configure will preserve that value.
235 none) dynamic_ext=' ' ;;
236 *) dynamic_ext="$ans" ;;
239 case "$static_ext" in
241 : Exclude those already listed in dynamic linking
243 for xxx in $avail_ext; do
244 case " $dynamic_ext " in
246 *) dflt="$dflt $xxx" ;;
253 *) dflt="$static_ext"
260 rp="What extensions do you wish to load statically?"
263 ?X: Use ' ' so a subsequent Configure will preserve that value.
264 none) static_ext=' ' ;;
265 *) static_ext="$ans" ;;
270 A number of extensions are supplied with $package. Answer "none"
271 to include no extensions.
272 Note that DynaLoader is always built and need not be mentioned here.
275 case "$static_ext" in
276 '') dflt="$avail_ext" ;;
277 *) dflt="$static_ext"
278 # Perhaps we are reusing an old out-of-date config.sh.
281 if test X"$static_ext" != X"$avail_ext"; then
283 NOTICE: Your previous config.sh list may be incorrect.
284 The extensions now available to you are
286 but the default list from your previous config.sh is
295 : Exclude those that are not xs extensions
299 rp="What extensions do you wish to include?"
302 ?X: Use ' ' so a subsequent Configure will preserve that value.
303 none) static_ext=' ' ;;
304 *) static_ext="$ans" ;;
309 set X $dynamic_ext $static_ext $nonxs_ext