This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Backport crosscompile changes (sysroot + target*)
[metaconfig.git] / U / perl / d_sfio.U
CommitLineData
959f3c4c
JH
1?RCS: $Id: d_sfio.U,v $
2?RCS:
3?RCS: Copyright (c) 1996-1998 Andy Dougherty
4?RCS:
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.
7?RCS:
8?RCS: $Log: d_sfio.U,v $
9?RCS:
10?MAKE:usesfio d_sfio: i_sfio Inlibc Myread Oldconfig sed libs \
02f3b9d4 11 Setvar package
959f3c4c
JH
12?MAKE: -pick add $@ %<
13?S:usesfio:
14?S: This variable is set to true when the user agrees to use sfio.
15?S: It is set to false when sfio is not available or when the user
70e7365a 16?S: explicitly requests not to use sfio. It is here primarily so
959f3c4c
JH
17?S: that command-line settings can override the auto-detection of
18?S: d_sfio without running into a "WHOA THERE".
19?S:.
20?S:d_sfio:
21?S: This variable conditionally defines the USE_SFIO symbol,
22?S: and indicates whether sfio is available (and should be used).
23?S:.
24?C:USE_SFIO:
25?C: This symbol, if defined, indicates that sfio should
26?C: be used.
27?C:.
28?H:#$d_sfio USE_SFIO /**/
29?H:.
30?LINT:set d_sfio
31?LINT:change libs
959f3c4c
JH
32: see if sfio library is available
33case "$i_sfio" in
34$define)
35 val=''
36 set sfreserve val
37 eval $inlibc
38 ;;
39*)
40 val="$undef"
41 ;;
42esac
43: Ok, but do we want to use it.
44case "$val" in
45$define)
46 case "$usesfio" in
47 true|$define|[yY]*) dflt='y';;
48 *) dflt='n';;
49 esac
50 echo "$package can use the sfio library, but it is experimental."
51 rp="You seem to have sfio available, do you want to try using it?"
52 . ./myread
53 case "$ans" in
02f3b9d4 54 y|Y) echo "Ok, turning on sfio then."
e28629b7
NC
55 val="$define"
56 ;;
959f3c4c
JH
57 *) echo "Ok, avoiding sfio this time. I'll use stdio instead."
58 val="$undef"
959f3c4c
JH
59 ;;
60 esac
61 ;;
62*) case "$usesfio" in
63 true|$define|[yY]*)
e28629b7
NC
64 echo "Sorry, cannot find sfio on this machine." >&4
65 echo "Ignoring your setting of usesfio=$usesfio." >&4
66 val="$undef"
959f3c4c
JH
67 ;;
68 esac
69 ;;
70esac
71?X:
65a32477 72?X: Only set d_sfio when final value is known to avoid spurious Whoa's
959f3c4c
JH
73?X: Then set usesfio accordingly to the current value, for next run
74?X:
75set d_sfio
76eval $setvar
77case "$d_sfio" in
78$define) usesfio='true';;
79*) usesfio='false';;
80esac
6070dd0f
JH
81case "$d_sfio" in
82$define) ;;
83*) : Remove sfio from list of libraries to use
d04c6fa0
JH
84 case "$libs" in
85 *-lsfio*)
86 echo "Removing unneeded -lsfio from library list" >&4
87 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
88 shift
89 libs="$*"
90 echo "libs = $libs" >&4
91 ;;
92 esac
6070dd0f
JH
93;;
94esac
95
959f3c4c 96