This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Even better use64bitall logic.
[metaconfig.git] / U / perl / d_sfio.U
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 \
11         Setvar package
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
16 ?S:     explicitely requests not to use sfio.  It is here primarily so
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
32
33 : see if sfio library is available
34 case "$i_sfio" in
35 $define)
36         val=''
37         set sfreserve val
38         eval $inlibc
39         ;;
40 *)
41         val="$undef"
42         ;;
43 esac
44 : Ok, but do we want to use it.
45 case "$val" in
46 $define)
47         case "$usesfio" in
48         true|$define|[yY]*) dflt='y';;
49         *) dflt='n';;
50         esac
51         echo "$package can use the sfio library, but it is experimental."
52         rp="You seem to have sfio available, do you want to try using it?"
53         . ./myread
54         case "$ans" in
55         y|Y) ;;
56         *)      echo "Ok, avoiding sfio this time.  I'll use stdio instead."
57                 val="$undef"
58                 : Remove sfio from list of libraries to use
59                 set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
60                 shift
61                 libs="$*"
62                 echo "libs = $libs" >&4
63                 ;;
64         esac
65         ;;
66 *)      case "$usesfio" in
67         true|$define|[yY]*)
68                 echo "Sorry, cannot find sfio on this machine" >&4
69                 echo "Ignoring your setting of usesfio=$usesfio" >&4
70                 ;;
71         esac
72         ;;
73 esac
74 ?X:
75 ?X: Only set d_sfio when final value is known to avoid spurious Whoas
76 ?X: Then set usesfio accordingly to the current value, for next run
77 ?X:
78 set d_sfio
79 eval $setvar
80 case "$d_sfio" in
81 $define) usesfio='true';;
82 *) usesfio='false';;
83 esac
84