This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Regularize the use* questions, and replace
[metaconfig.git] / U / perl / useperlio.U
1 ?RCS: $Id: d_perlio.U,v $
2 ?RCS:
3 ?RCS: Copyright (c) 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_perlio.U,v $
9 ?RCS:
10 ?MAKE:useperlio: Myread Oldconfig Setvar package
11 ?MAKE:  -pick add $@ %<
12 ?Y:TOP
13 ?S:useperlio:
14 ?S:     This variable conditionally defines the USE_PERLIO symbol,
15 ?S:     and indicates that the PerlIO abstraction should be
16 ?S:     used throughout.
17 ?S:.
18 ?C:USE_PERLIO:
19 ?C:     This symbol, if defined, indicates that the PerlIO abstraction should
20 ?C:     be used throughout.  If not defined, stdio should be
21 ?C:     used in a fully backward compatible manner.
22 ?C:.
23 ?H:?%<:#ifndef USE_PERLIO
24 ?H:?%<:#$useperlio      USE_PERLIO              /**/
25 ?H:?%<:#endif
26 ?H:.
27 ?LINT:set useperlio
28 case "$useperlio" in
29 $define|true|[yY]*)     dflt='y';;
30 *) dflt='n';;
31 esac
32 cat <<EOM
33
34 Previous version of $package used the standard IO mechanisms as defined
35 in <stdio.h>.  Versions 5.003_02 and later of perl allow alternate IO
36 mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still
37 the default.  This abstraction layer can use AT&T's sfio (if you already
38 have sfio installed) or regular stdio.  Using PerlIO with sfio may cause
39 problems with some extension modules.  Using PerlIO with stdio is safe,
40 but it is slower than plain stdio and therefore is not the default.
41
42 If this doesn't make any sense to you, just accept the default '$dflt'.
43 EOM
44 rp='Use the experimental PerlIO abstraction layer?'
45 . ./myread
46 case "$ans" in
47 y|Y) 
48         val="$define"
49         ;;     
50 *)      
51         echo "Ok, doing things the stdio way"
52         val="$undef"
53         ;;
54 esac
55 set useperlio
56 eval $setvar 
57